Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262986

Re: [PATCH 1/5] mm, page_owner: print migratetype of a page, not pageblock

From Joonsoo Kim <iamjoonsoo.kim@lge.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] mm, page_owner: print migratetype of a page, not pageblock
Date 2015-11-05 09:10 +0100
Message-ID <qrnMm-3ZY-9@gated-at.bofh.it> (permalink)
References <qr7Rf-24F-3@gated-at.bofh.it> <qr7Rg-24F-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Nov 04, 2015 at 04:00:57PM +0100, Vlastimil Babka wrote:
> The information in /sys/kernel/debug/page_owner includes the migratetype
> declared during the page allocation via gfp_flags. This is also checked against
> the pageblock's migratetype, and reported as Fallback allocation if these two
> differ (although in fact fallback allocation is not the only reason why they
> can differ).
> 
> However, the migratetype actually printed is the one of the pageblock, not of
> the page itself, so it's the same for all pages in the pageblock. This is
> apparently a bug, noticed when working on other page_owner improvements. Fixed.

We can guess page migratetype through gfp_mask output although it isn't
easy task for now. But, there is no way to know pageblock migratetype.
I used this to know how memory is fragmented.

Thanks.

> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
>  mm/page_owner.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 983c3a1..a9f16b8 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -113,7 +113,7 @@ print_page_owner(char __user *buf, size_t count, unsigned long pfn,
>  			"PFN %lu Block %lu type %d %s Flags %s%s%s%s%s%s%s%s%s%s%s%s\n",
>  			pfn,
>  			pfn >> pageblock_order,
> -			pageblock_mt,
> +			page_mt,
>  			pageblock_mt != page_mt ? "Fallback" : "        ",
>  			PageLocked(page)	? "K" : " ",
>  			PageError(page)		? "E" : " ",
> -- 
> 2.6.2
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] page_owner improvements for debugging Vlastimil Babka <vbabka@suse.cz> - 2015-11-04 16:10 +0100
  [PATCH 4/5] mm, page_owner: track last migrate reason Vlastimil Babka <vbabka@suse.cz> - 2015-11-04 16:10 +0100
  [PATCH 5/5] mm, page_owner: dump page owner info from dump_page() Vlastimil Babka <vbabka@suse.cz> - 2015-11-04 16:10 +0100
    Re: [PATCH 5/5] mm, page_owner: dump page owner info from dump_page() "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-04 20:50 +0100
      Re: [PATCH 5/5] mm, page_owner: dump page owner info from dump_page() Sasha Levin <sasha.levin@oracle.com> - 2015-11-04 21:20 +0100
        Re: [PATCH 5/5] mm, page_owner: dump page owner info from dump_page() "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-04 21:50 +0100
  [PATCH 1/5] mm, page_owner: print migratetype of a page, not pageblock Vlastimil Babka <vbabka@suse.cz> - 2015-11-04 16:10 +0100
    Re: [PATCH 1/5] mm, page_owner: print migratetype of a page, not  pageblock Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-11-05 09:10 +0100
      Re: [PATCH 1/5] mm, page_owner: print migratetype of a page, not  pageblock Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-11-05 09:20 +0100
      Re: [PATCH 1/5] mm, page_owner: print migratetype of a page, not  pageblock Vlastimil Babka <vbabka@suse.cz> - 2015-11-05 09:20 +0100
  [PATCH 2/5] mm, page_owner: convert page_owner_inited to static key Vlastimil Babka <vbabka@suse.cz> - 2015-11-04 16:10 +0100

csiph-web