Thread (6 messages) flat view 6 messages, 4 authors, 2015-07-17

Re: [RFC PATCH] thread_local_abi system call: caching current CPU number (x86)

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2015-07-17 16:12:57
Also in: lkml

----- On Jul 17, 2015, at 6:49 AM, Ben Maurer bmaurer@fb.com wrote:
Mathieu Desnoyers wrote:
quoted
Expose a new system call allowing threads to register a userspace memory
area where to store the current CPU number. Scheduler migration sets the
I really like that this approach makes it easier to add a per-thread interaction
between userspace and the kernel in the future.
quoted
+       if (!tlap || t->thread_local_abi_len <
+                       offsetof(struct thread_local_abi, cpu)
+                       + sizeof(tlap->cpu))
Could you save a branch here by enforcing that thread_local_abi_len = 0 if
thread_local_abi = null?
Yes, good idea! Will do.

Thanks!

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help