From: Nick Piggin <npiggin@suse.de>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: lockless pagecache Cassini regression
Date: Fri, 4 Jan 2008 15:27:33 +0100 [thread overview]
Message-ID: <20080104142733.GA31052@wotan.suse.de> (raw)
In-Reply-To: <20080104.035831.52071724.davem@davemloft.net>
On Fri, Jan 04, 2008 at 03:58:31AM -0800, David Miller wrote:
> From: Nick Piggin <npiggin@suse.de>
> Date: Fri, 4 Jan 2008 12:33:52 +0100
>
> > Just for interest, the lockless pagecache actually makes
> > page->_count unstable for all pages that _have ever_ been pagecache
> > pages (since the last quiescent rcu state, anyway). Basically, it
> > looks up and takes a ref on the struct page without ever having a
> > prior pin or reference on that page. It can do this because it knows
> > the struct page won't actually get freed. After taking the ref, it
> > rechecks that it has got the right page...
>
> Ok, I understand the needs now.
>
> I think the way the drivers/net/niu.c driver handles things
> would work better. It only performs get_page(), atomic
> increments on compound_head(page)->_count, and __free_page().
> Is that all legal with the lockless pagecache?
Yes, you can use the regular refcounting and freeing operations. If the
lockless pagecache has got a speculative reference on the page after the
driver drops all "real" references, it will take care of freeing the page.
> If so I can likely rework the Cassini page management to
> behave similarly.
If you got the chance, that would be very nice.
Thanks,
Nick
prev parent reply other threads:[~2008-01-04 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 3:32 lockless pagecache Cassini regression David Miller
2008-01-04 11:33 ` Nick Piggin
2008-01-04 11:58 ` David Miller
2008-01-04 14:27 ` Nick Piggin [this message]
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=20080104142733.GA31052@wotan.suse.de \
--to=npiggin@suse.de \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).