From: Linus Torvalds <torvalds@osdl.org>
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Memory Management <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 5/6] mm: simplify vmscan vs release refcounting
Date: Thu, 19 Jan 2006 11:35:29 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0601191130590.3240@g5.osdl.org> (raw)
In-Reply-To: <20060119192219.11913.30071.sendpatchset@linux.site>
On Thu, 19 Jan 2006, Nick Piggin wrote:
>
> The VM has an interesting race where a page refcount can drop to zero, but
> it is still on the LRU lists for a short time. This was solved by testing
> a 0->1 refcount transition when picking up pages from the LRU, and dropping
> the refcount in that case.
Heh. Now you keep the count offset, but you also end up removing all the
comments about it (still) being -1 for free.
And your changelog talks about "atomic_inc_not_zero()" even though the
code actually does
atomic_add_unless(&page->_count, 1, -1);
which makes it pretty confusing ;)
I also think it's wrong - you've changed put_page_testzero() to use
"atomic_dec_and_test()", even though the count is based on -1.
So this patch _only_ works together with the next one, and is invalid in
many ways on its own. You should re-split the de-skew part correctly..
Linus
next prev parent reply other threads:[~2006-01-19 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-19 19:22 [patch 0/6] mm: optimisations and page ref simplifications Nick Piggin
2006-01-19 19:22 ` [patch 1/6] mm: never ClearPageLRU released pages Nick Piggin
2006-01-19 19:23 ` [patch 2/6] mm: PageLRU no testset Nick Piggin
2006-01-19 19:23 ` [patch 3/6] mm: PageActive " Nick Piggin
2006-01-19 19:23 ` [patch 4/6] mm: less atomic ops Nick Piggin
2006-01-19 19:23 ` [patch 5/6] mm: simplify vmscan vs release refcounting Nick Piggin
2006-01-19 19:35 ` Linus Torvalds [this message]
2006-01-19 19:53 ` Nick Piggin
2006-01-19 19:23 ` [patch 6/6] mm: de-skew page refcounting 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=Pine.LNX.4.64.0601191130590.3240@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).