linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Nick Piggin <npiggin@suse.de>, linux-mm@kvack.org, dgc@sgi.com
Subject: Re: [RFC] Free up page->private for compound pages
Date: Thu, 5 Apr 2007 15:30:06 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0704051522510.24160@blonde.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0704042132170.14005@schroedinger.engr.sgi.com>

On Wed, 4 Apr 2007, Christoph Lameter wrote:
> 
> V1->V2
> 	- Use alias to PG_reclaim
> 
> +static inline struct page *compound_head(struct page *page)
> +{
> +	if (unlikely(PageTail(page)))
> +		return page->first_page;
> +	return page;
> +}
> +
>  static inline int page_count(struct page *page)
>  {
> -	if (unlikely(PageCompound(page)))
> -		page = (struct page *)page_private(page);
> -	return atomic_read(&page->_count);
> +	return atomic_read(&compound_head(page)->_count);
>  }

No, you don't want anyone looking at the page_count of a page
currently under reclaim, or doing a get_page on it, to go veering
off through its page->private (page->first_page comes from another
of your patches, not in -mm).  Looks like you need to add a test for
PageCompound in compound_head (what a surprise!), unfortunately.

Hugh

--
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:[~2007-04-05 14:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05  3:19 Christoph Lameter
2007-04-05  3:36 ` Nick Piggin
2007-04-05  3:38   ` Christoph Lameter
2007-04-05  3:57     ` Nick Piggin
2007-04-05  4:04       ` Christoph Lameter
2007-04-05  4:25         ` Nick Piggin
2007-04-05  4:34           ` Christoph Lameter
2007-04-05 14:30             ` Hugh Dickins [this message]
2007-04-05 18:17               ` Christoph Lameter
2007-04-05 18:40                 ` Hugh Dickins
2007-04-05 18:58                   ` Christoph Lameter
2007-04-05 19:50                     ` Hugh Dickins
2007-04-05 20:07                       ` Christoph Lameter
2007-04-05 15:13 ` Dave Kleikamp

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=Pine.LNX.4.64.0704051522510.24160@blonde.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=clameter@sgi.com \
    --cc=dgc@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    /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