linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [patch] mm: unlockless reclaim
Date: Tue, 19 Aug 2008 12:05:30 +0200	[thread overview]
Message-ID: <20080819100529.GD10447@wotan.suse.de> (raw)
In-Reply-To: <20080819135424.60DA.KOSAKI.MOTOHIRO@jp.fujitsu.com>

On Tue, Aug 19, 2008 at 02:09:07PM +0900, KOSAKI Motohiro wrote:
> > -		unlock_page(page);
> > +		/*
> > +		 * At this point, we have no other references and there is
> > +		 * no way to pick any more up (removed from LRU, removed
> > +		 * from pagecache). Can use non-atomic bitops now (and
> > +		 * we obviously don't have to worry about waking up a process
> > +		 * waiting on the page lock, because there are no references.
> > +		 */
> > +		__clear_page_locked(page);
> >  free_it:
> >  		nr_reclaimed++;
> >  		if (!pagevec_add(&freed_pvec, page)) {
> > 
> 
> To insert VM_BUG_ON(page_count(page) != 1) is better?
> Otherthing, looks good to me.

That is a very good idea, except that now with lockless pagecache, we're
not so well placed to do this type of check. Actually at this point,
the refcount will be 0 because of page_freeze_refs, and then if anybody
else tries to do a get_page, they should hit the VM_BUG_ON in get_page.

 
> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

Thanks for looking at it.

--
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:[~2008-08-19 10:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18 12:24 [patch] mm: pagecache insertion fewer atomics Nick Piggin
2008-08-18 12:25 ` [patch] mm: unlockless reclaim Nick Piggin
2008-08-19  5:09   ` KOSAKI Motohiro
2008-08-19 10:05     ` Nick Piggin [this message]
2008-08-19 10:20       ` KOSAKI Motohiro
2008-08-18 12:28 ` [patch] mm: page lock use lock bitops Nick Piggin
2008-08-18 12:29 ` [patch] fs: buffer " Nick Piggin
2008-08-18 12:29 ` [patch] mm: page allocator minor speedup Nick Piggin
2008-08-18 13:57   ` Pekka Enberg
2008-08-19  7:49     ` Nick Piggin
2008-08-19  7:51       ` Pekka Enberg
2008-08-19 10:25         ` Nick Piggin
2008-08-18 23:29   ` Andrew Morton
2008-08-19  7:51     ` Nick Piggin
2008-10-14 15:52   ` Hugh Dickins
2008-10-15  4:37     ` Nick Piggin
2008-08-19  5:41 ` [patch] mm: pagecache insertion fewer atomics KOSAKI Motohiro
2008-08-19  5:50   ` Andrew Morton
2008-08-19 10:07   ` Nick Piggin
  -- strict thread matches above, loose matches on Subject: below --
2007-11-10  5:12 [patch 1/2] mm: page trylock rename Nick Piggin
2007-11-10  5:43 ` Nick Piggin
2007-11-10 11:51   ` Peter Zijlstra
2007-11-11  8:40     ` [patch] mm: unlockless reclaim Nick Piggin
2007-07-12  4:11 Nick Piggin
2007-07-12  7:43 ` Andrew Morton
2007-07-12  7:55   ` Nick Piggin
2007-07-12  8:00     ` Andrew Morton
2007-07-12  8:18       ` Nick Piggin
2007-07-12 19:20 ` Andrew Morton
2007-07-14  8:35   ` Nick Piggin

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=20080819100529.GD10447@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --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