exec: remove page_table_lock for mm counters in acct_arg_size()
Subsystems (2)
PATCH 1/1 exec: remove page_table_lock for mm counters in acct_arg_size()
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.
--- fs/exec.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
fs/exec.c +0 -6
@@ -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,
Signature · 1 line
1.7.4.4
Quoted 16 lines · Frantisek Hrbata
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_lockforadd_mm_counter()when the splitted page table locks are not used. This patch removes the locking.Signed-off-by Frantisek Hrbata <[email protected]>--- fs/exec.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)fs/exec.c +0
-0
fs/exec.c static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) · line 191
Quoted 10 lines
fs/exec.c +0
-6@@ -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
Heh. Thanks Frantisek, you are right. But this patch is already in mm-tree, fs-execc-acct_arg_size-ptl-is-no-longer-needed-for-add_mm_counter.patch
Oleg.
Quoted 31 lines · Oleg Nesterov
Quoted 16 lines · Frantisek Hrbata
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_lockforadd_mm_counter()when the splitted page table locks are not used. This patch removes the locking.Signed-off-by Frantisek Hrbata <[email protected]>--- fs/exec.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)fs/exec.c +0
-0fs/exec.c static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) · line 191
Quoted 10 lines
fs/exec.c +0
-6@@ -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 Heh. Thanks Frantisek, you are right. But this patch is already in mm-tree, fs-execc-acct_arg_size-ptl-is-no-longer-needed-for-add_mm_counter.patch
Quoted 2 lines
Oleg.
:) thanks. Sorry I should check that first.
Signature · 1 line
Frantisek Hrbata