From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>,
Paul McKenney <paul.mckenney@us.ibm.com>,
Hugh Dickins <hugh@veritas.com>,
James Bottomley <James.Bottomley@SteelEye.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>, Andi Kleen <ak@suse.de>,
Linux Memory Management <linux-mm@kvack.org>
Subject: lockless pagecache followups
Date: Wed, 26 Jul 2006 15:50:39 +1000 [thread overview]
Message-ID: <44C702AF.7080705@yahoo.com.au> (raw)
Hi,
I'm going to submit my lockless pagecache patch to -mm. So I should
clarify a few questions I didn't have time or thought capacity to
answer in my OLS presentation when they were asked:
- The numbers in the presentation were with !CONFIG_PREEMPT kernels.
- I believe the speculative reference retry mechanism *could* use a
seqlock rather than PG_nonewrefs + pagecache recheck. So that was a
good question :) However, this doesn't fix the "all pages have an
unstable refcount" problem.
Also, it means readers will contend cachelines with writers in
different parts of the file, and does make a finer grained write
side possibly more difficult in some parts. So I prefer the
custom locking protocol.
- The flush_dcache_mmap_lock AFAIKS(?) is logically a different lock
from the pagecache tree_lock. I guess it just uses tree_lock
because it can. So that path should be sped up with the rwlock
-> spinlock conversion, and reduced contention from find_get_page.
If there are any problems in this area, I'd like to know what
they are.
- Comments have been improved.
- I still can't see how the lockless gang lookup could deadlock. If the
radix-tree lookup finds 0 candidates, find_get_pages will return. The
only time it retries is when the radix-tree lookup has found at least
1 page, and the first page found has been moved.
- One question I would have liked asked is "why not use RCU for
freeing the pages", although maybe that's obvious ;) It would solve
the unstable refcount, and the atomic_inc_not_zero problems, however
I think RCU would be too much burden on the pagecache freeing side.
Thanks,
Nick
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
--
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:[~2006-07-26 5:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=44C702AF.7080705@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=James.Bottomley@SteelEye.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=paul.mckenney@us.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.