mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] exec: remove page_table_lock for mm counters in acct_arg_size()
@ 2011-07-14 13:16 Frantisek Hrbata
  2011-07-14 13:18 ` Oleg Nesterov
  0 siblings, 1 reply; 3+ messages in thread
From: Frantisek Hrbata @ 2011-07-14 13:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: oleg, matt.fleming, hughd

Commit 172703b mm: delete non-atomic mm counter implementation
removed non-atomic mm counters implementation. I think there is no need to hold
page_table_lock for add_mm_counter() when the splitted page table locks are not
used. This patch removes the locking.

Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
---
 fs/exec.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 6075a1e..e6fc5e1 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -182,13 +182,7 @@ static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages)
 
 	bprm->vma_pages = pages;
 
-#ifdef SPLIT_RSS_COUNTING
 	add_mm_counter(mm, MM_ANONPAGES, diff);
-#else
-	spin_lock(&mm->page_table_lock);
-	add_mm_counter(mm, MM_ANONPAGES, diff);
-	spin_unlock(&mm->page_table_lock);
-#endif
 }
 
 static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
-- 
1.7.4.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-14 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 13:16 [PATCH] exec: remove page_table_lock for mm counters in acct_arg_size() Frantisek Hrbata
2011-07-14 13:18 ` Oleg Nesterov
2011-07-14 13:23   ` Frantisek Hrbata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®