All of lore.kernel.org
 help / color / mirror / Atom feed
* + kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch added to -mm tree
@ 2014-03-19 23:07 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2014-03-19 23:07 UTC (permalink / raw)
  To: mm-commits, vegard.nossum, penberg, lizefan, qiuxishi

Subject: + kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch added to -mm tree
To: qiuxishi@huawei.com,lizefan@huawei.com,penberg@kernel.org,vegard.nossum@oracle.com
From: akpm@linux-foundation.org
Date: Wed, 19 Mar 2014 16:07:39 -0700


The patch titled
     Subject: kmemcheck: move hook into __alloc_pages_nodemask() for the page allocator
has been added to the -mm tree.  Its filename is
     kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Xishi Qiu <qiuxishi@huawei.com>
Subject: kmemcheck: move hook into __alloc_pages_nodemask() for the page allocator

Now kmemcheck_pagealloc_alloc() is only called by __alloc_pages_slowpath().
__alloc_pages_nodemask()
	__alloc_pages_slowpath()
		kmemcheck_pagealloc_alloc()

And the page will not be tracked by kmemcheck in the following path.
__alloc_pages_nodemask()
	get_page_from_freelist()

So move kmemcheck_pagealloc_alloc() into __alloc_pages_nodemask(),
like this:
__alloc_pages_nodemask()
	...
	get_page_from_freelist()
	if (!page)
		__alloc_pages_slowpath()
	kmemcheck_pagealloc_alloc()
	...

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Cc: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff -puN mm/page_alloc.c~kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator mm/page_alloc.c
--- a/mm/page_alloc.c~kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator
+++ a/mm/page_alloc.c
@@ -2692,11 +2692,7 @@ rebalance:
 
 nopage:
 	warn_alloc_failed(gfp_mask, order, NULL);
-	return page;
 got_pg:
-	if (kmemcheck_enabled)
-		kmemcheck_pagealloc_alloc(page, order, gfp_mask);

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

* + kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch added to -mm tree
@ 2015-01-02 21:45 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2015-01-02 21:45 UTC (permalink / raw)
  To: qiuxishi, lizefan, penberg, vegard.nossum, mm-commits


The patch titled
     Subject: kmemcheck: move hook into __alloc_pages_nodemask() for the page allocator
has been added to the -mm tree.  Its filename is
     kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Xishi Qiu <qiuxishi@huawei.com>
Subject: kmemcheck: move hook into __alloc_pages_nodemask() for the page allocator

Now kmemcheck_pagealloc_alloc() is only called by __alloc_pages_slowpath().
__alloc_pages_nodemask()
	__alloc_pages_slowpath()
		kmemcheck_pagealloc_alloc()

And the page will not be tracked by kmemcheck in the following path.
__alloc_pages_nodemask()
	get_page_from_freelist()

So move kmemcheck_pagealloc_alloc() into __alloc_pages_nodemask(),
like this:
__alloc_pages_nodemask()
	...
	get_page_from_freelist()
	if (!page)
		__alloc_pages_slowpath()
	kmemcheck_pagealloc_alloc()
	...

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Cc: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff -puN mm/page_alloc.c~kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator mm/page_alloc.c
--- a/mm/page_alloc.c~kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator
+++ a/mm/page_alloc.c
@@ -2842,11 +2842,7 @@ retry:
 
 nopage:
 	warn_alloc_failed(gfp_mask, order, NULL);
-	return page;
 got_pg:
-	if (kmemcheck_enabled)
-		kmemcheck_pagealloc_alloc(page, order, gfp_mask);

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

end of thread, other threads:[~2015-01-02 21:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-19 23:07 + kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch added to -mm tree akpm
2015-01-02 21:45 akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.