linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Mel Gorman <mgorman@suse.de>, Michal Hocko <mhocko@suse.cz>
Subject: Re: [PATCH] mm: do not use page_count without a page pin
Date: Tue, 12 Jun 2012 07:49:34 +0900	[thread overview]
Message-ID: <4FD675FE.1060202@kernel.org> (raw)
In-Reply-To: <20120611144132.GT3094@redhat.com>

On 06/11/2012 11:41 PM, Andrea Arcangeli wrote:

> Hi Minchan,
> 
> On Mon, Jun 11, 2012 at 10:30:43PM +0900, Minchan Kim wrote:
>> AFAIUC, you mean we have to increase reference count of head page?
>> If so, it's not in __count_immobile_pages because it is already race-likely function
>> so it shouldn't be critical although race happens.
> 
> I meant, shouldn't we take into account the full size? If it's in the
> lru the whole thing can be moved away.
> 
>   if (!PageLRU(page)) {
>      nr_pages = hpage_nr_pages(page);
>      barrier();


Could you explain why we need barrier?

>      found += nr_pages;
>      iter += nr_pages-1;
>   }
> 


Thanks for the explain.

For the normal pages, the logic accounts it as "non-movable pages" so for the consistency,
it seems you're right. But let's think about a bit.

If THP page isn't LRU and it's still PageTransHuge, I think it's rather rare and
although it happens, it means migration/reclaimer is about to split or isolate/putback
so it ends up making THP page movable pages.

IMHO, it would be better to account it by movable pages.
What do you think about it?

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:[~2012-06-11 22:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11  0:17 [PATCH] mm: do not use page_count without a page pin Minchan Kim
2012-06-11  0:23 ` Wanpeng Li
2012-06-11  2:09   ` Minchan Kim
2012-06-11  7:20 ` Kamezawa Hiroyuki
2012-06-11  7:44   ` Andrea Arcangeli
2012-06-11  8:48     ` Kamezawa Hiroyuki
2012-06-11 13:30     ` Minchan Kim
2012-06-11 14:41       ` Andrea Arcangeli
2012-06-11 22:49         ` Minchan Kim [this message]
2012-06-14  1:21           ` Andrea Arcangeli
2012-06-14  1:49             ` Minchan Kim

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=4FD675FE.1060202@kernel.org \
    --to=minchan@kernel.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    /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).