public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Minchan Kim <minchan@kernel.org>,
	Sasha Levin <sasha.levin@oracle.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH 1/5] mm, page_owner: print migratetype of a page, not pageblock
Date: Thu, 5 Nov 2015 09:15:01 +0100	[thread overview]
Message-ID: <563B1005.3070203@suse.cz> (raw)
In-Reply-To: <20151105080910.GA25938@js1304-P5Q-DELUXE>

On 11/05/2015 09:09 AM, Joonsoo Kim wrote:
> 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.

Ah, I see. How bout just we print both migratetypes then and remove the
"Fallback" part, which can be trivially deduced from them (and as I noted it's
somewhat misleading anyway)?

> 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>
> 


  reply	other threads:[~2015-11-05  8:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 15:00 [PATCH 0/5] page_owner improvements for debugging Vlastimil Babka
2015-11-04 15:00 ` [PATCH 1/5] mm, page_owner: print migratetype of a page, not pageblock Vlastimil Babka
2015-11-05  8:09   ` Joonsoo Kim
2015-11-05  8:15     ` Vlastimil Babka [this message]
2015-11-05  8:19       ` Joonsoo Kim
2015-11-04 15:00 ` [PATCH 2/5] mm, page_owner: convert page_owner_inited to static key Vlastimil Babka
2015-11-04 15:00 ` [PATCH 3/5] mm, page_owner: copy page owner info during migration Vlastimil Babka
2015-11-04 15:10   ` checkpatch false warning. was: " Vlastimil Babka
2015-11-04 15:30     ` Joe Perches
2015-11-05  8:10   ` Joonsoo Kim
2015-11-05  8:17     ` Vlastimil Babka
2015-11-05  8:23       ` Joonsoo Kim
2015-11-08 21:29   ` Hugh Dickins
2015-11-19 16:44     ` Vlastimil Babka
2015-11-04 15:01 ` [PATCH 4/5] mm, page_owner: track last migrate reason Vlastimil Babka
2015-11-04 15:01 ` [PATCH 5/5] mm, page_owner: dump page owner info from dump_page() Vlastimil Babka
2015-11-04 19:41   ` Kirill A. Shutemov
2015-11-04 20:12     ` Sasha Levin
2015-11-04 20:41       ` Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=563B1005.3070203@suse.cz \
    --to=vbabka@suse.cz \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=sasha.levin@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox