diff options
author | Hugh Dickins <hugh.dickins@tiscali.co.uk> | 2009-09-22 02:02:14 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 16:17:32 +0200 |
commit | 6e15838425ac855982f10419558649954a0684a3 (patch) | |
tree | f39e4a9b845e0bdf8f6b222ca718f155437e5b63 /kernel/exec_domain.c | |
parent | ksm: break cow once unshared (diff) | |
download | linux-6e15838425ac855982f10419558649954a0684a3.tar.xz linux-6e15838425ac855982f10419558649954a0684a3.zip |
ksm: keep quiet while list empty
ksm_scan_thread already sleeps in wait_event_interruptible until setting
ksm_run activates it; but if there's nothing on its list to look at, i.e.
nobody has yet said madvise MADV_MERGEABLE, it's a shame to be clocking
up system time and full_scans: ksmd_should_run added to check that too.
And move the mutex_lock out around it: the new counts showed that when
ksm_run is stopped, a little work often got done afterwards, because it
had been read before taking the mutex.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Izik Eidus <ieidus@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/exec_domain.c')
0 files changed, 0 insertions, 0 deletions