mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] Optimize sys_times for a single thread process
Avoid taking the tasklist_lock in sys_times if the process is single threaded. In a NUMA system taking the tasklist_lock may cause a bouncing cacheline if multiple independent processes continually call sys_times to measure their performance. Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Shai Fultheim <shai@scalex86.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
b030a4dd60
commit
71a2224d7d
2 changed files with 64 additions and 25 deletions
|
@ -72,6 +72,11 @@ repeat:
|
|||
BUG_ON(!list_empty(&p->ptrace_list) || !list_empty(&p->ptrace_children));
|
||||
__exit_signal(p);
|
||||
__exit_sighand(p);
|
||||
/*
|
||||
* Note that the fastpath in sys_times depends on __exit_signal having
|
||||
* updated the counters before a task is removed from the tasklist of
|
||||
* the process by __unhash_process.
|
||||
*/
|
||||
__unhash_process(p);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue