linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Jungsoo Son <jungsoo.son@lge.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH] page owners: correct page->order when to free page
Date: Wed, 12 Mar 2014 16:06:21 +0900	[thread overview]
Message-ID: <20140312070621.GI17828@bbox> (raw)
In-Reply-To: <1394607486-31493-1-git-send-email-jungsoo.son@lge.com>

On Wed, Mar 12, 2014 at 03:58:06PM +0900, Jungsoo Son wrote:
> When I use PAGE_OWNER in mmotm tree, I found a problem that mismatches
> the number of allocated pages. When I investigate, the problem is that
> set_page_order is called for only a head page if freed page is merged to
> a higher order page in the buddy allocator so tail pages of the higher
> order page couldn't be reset to page->order = -1.
> 
> It means when we do 'cat /proc/page-owner', it could show wrong
> information.

We could make read_page_owner more smart so that it could check
PageBuddy at head page of high order page and skip tail pages but
it needs zone->lock which is already heavy contention lock.
Additionally, it could make wrong information on pcp pages, too.
So, I like this simple approach.

> 
> So page->order should be set to -1 for all the tail pages as well as the
> first page before buddy allocator merges them.
> 
> This patch is for clearing page->order of all the tail pages in
> free_pages_prepare() when to free page.
> 
> Signed-off-by: Jungsoo Son <jungsoo.son@lge.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Acked-by: Minchan Kim <minchan@kernel.org>

Thanks.

-- 
Kind regards,
Minchan Kim

--
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:[~2014-03-12  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12  6:58 [PATCH] page owners: correct page->order when to free page Jungsoo Son
2014-03-12  7:06 ` Minchan Kim [this message]

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=20140312070621.GI17828@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jungsoo.son@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).