diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-06-05 01:07:54 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 01:54:03 +0200 |
commit | 39af1765f1255b2bbadc3064e16270781abf24a1 (patch) | |
tree | 55d8a858a7ab136314a397bebbd5bd72f0b0ee2b /init/main.c | |
parent | memcg: mm_update_next_owner() should skip kthreads (diff) | |
download | linux-39af1765f1255b2bbadc3064e16270781abf24a1.tar.xz linux-39af1765f1255b2bbadc3064e16270781abf24a1.zip |
memcg: optimize the "Search everything else" loop in mm_update_next_owner()
for_each_process_thread() is sub-optimal. All threads share the same
->mm, we can swicth to the next process once we found a thread with
->mm != NULL and ->mm != mm.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Peter Chiang <pchiang@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions