mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Shaohua Li <shaohua.li@intel.com>,
	clameter@sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC] some page can't be migrated
Date: Mon, 28 Jan 2008 12:43:08 +1100	[thread overview]
Message-ID: <200801281243.08849.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20080126220351.a04819f9.akpm@linux-foundation.org>

On Sunday 27 January 2008 17:03, Andrew Morton wrote:
> > On Fri, 25 Jan 2008 14:03:25 +0800 Shaohua Li <shaohua.li@intel.com>
> > wrote:
> >
> > -	if (!page->mapping)
> > +	if (!page->mapping) {
> > +		if (!PageAnon(page) && PagePrivate(page))
> > +			try_to_release_page(page, GFP_KERNEL);
> >  		goto rcu_unlock;
> > +	}
>
> We call something(GFP_KERNEL) under rcu_read_lock()?  I've lost track of
> the myriad flavours of rcu which we purport to support, but I don't think
> they'll all like us blocking under rcu_read_lock().
>
> We _won't_ block, because try_to_release_page() will see the NULL ->mapping
> and will call the non-blocking try_to_free_buffers().  But still, it looks
> bad, and will cause problems if someone decides to add a might_sleep_if()
> to try_to_release_page().
>
> So...  I'd suggest that it would be better to add an apologetic comment and
> call direct into try_to_free_buffers().

You're right, but can't we just rcu_read_unlock() before try_to_release_page?

  reply	other threads:[~2008-01-28  1:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23  6:22 Shaohua Li
2008-01-25  3:03 ` Nick Piggin
2008-01-25  3:09   ` Christoph Lameter
2008-01-25  3:09   ` Shaohua Li
2008-01-25  3:12     ` Christoph Lameter
2008-01-25  3:18       ` Shaohua Li
2008-01-25  5:20     ` Nick Piggin
2008-01-25  3:37 ` Christoph Lameter
2008-01-25  3:59   ` Shaohua Li
2008-01-25  4:01     ` Christoph Lameter
2008-01-25  4:17       ` Nick Piggin
2008-01-25  4:42         ` Christoph Lameter
2008-01-25  6:03         ` Shaohua Li
2008-01-27  6:03           ` Andrew Morton
2008-01-28  1:43             ` Nick Piggin [this message]
2008-01-28  1:48               ` Shaohua Li
2008-01-28 19:09             ` Christoph Lameter
2008-01-28 23:17             ` Christoph Lameter

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=200801281243.08849.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.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

Powered by JetHome