linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/7] speculative page references, lockless pagecache, lockless gup
@ 2008-06-05  9:43 npiggin
  2008-06-05  9:43 ` [patch 1/7] mm: readahead scan lockless npiggin
                   ` (9 more replies)
  0 siblings, 10 replies; 31+ messages in thread
From: npiggin @ 2008-06-05  9:43 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linux-mm, linux-kernel, benh, paulus

Hi,

I've decided to submit the speculative page references patch to get merged.
I think I've now got enough reasons to get it merged. Well... I always
thought I did, I just didn't think anyone else thought I did. If you know
what I mean.

cc'ing the powerpc guys specifically because everyone else who probably
cares should be on linux-mm...

So speculative page references are required to support lockless pagecache and
lockless get_user_pages (on architectures that can't use the x86 trick). Other
uses for speculative page references could also pop up, it is a pretty useful
concept. Doesn't need to be pagecache pages either.

Anyway,

lockless pagecache:
- speeds up single threaded pagecache lookup operations significantly, by
  avoiding atomic operations, memory barriers, and interrupts-off sections.
  I just measured again on a few CPUs I have lying around here, and the
  speedup is over 2x reduction in cycles on them all, closer to 3x in some
  cases.

   find_get_page takes:
                ppc970 (g5)     K10             P4 Nocona       Core2
    vanilla     275 (cycles)    85              315             143
    lockless    125             40              127             61

- speeds up single threaded pagecache modification operations, by using
  regular spinlocks rather than rwlocks and avoiding an atomic operation
  on x86 for one. Also, most real paths which involve pagecache modification
  also involve pagecache lookups, so it is hard not to get a net speedup.

- solves the rwlock starvation problem for pagecache operations. This is
  being noticed on big SGI systems, but theoretically could happen on
  relatively small systems (dozens of CPUs) due to the really nasty
  writer starvation problem of rwlocks -- not even hardware fairness can
  solve that.

- improves pagecache scalability to operations on a single file. I
  demonstrated page faults to a single file were improved in throughput
  by 250x on a 64-way Altix several years ago. We now have systems with
  thousands of CPUs in them.

lockless get_user_pages:
- provides a way to operate on user pages which is scalable to many threads,
  and does not get impacted by, or contribute to, mmap_sem contention.

- Alrady shown to speed up DB2 running OLTP by a significant amount.

The speculative page references idea has been out there for quite a few
years now, and never been disproved.

So, that's the jist of my justification. If it were up to me, then I would
have merged the thing solely on the very first point under lockless
pagecache, but...

Review/comments/testing appreciated. I wonder how people feel about merging
this soon?

(the actual patchset must go on top of the fast get_user_pages patches I
posted earlier because I'm adding the powerpc variant of that here)

-- 

--
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>

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2008-06-11 23:20 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-05  9:43 [patch 0/7] speculative page references, lockless pagecache, lockless gup npiggin
2008-06-05  9:43 ` [patch 1/7] mm: readahead scan lockless npiggin
2008-06-05  9:43 ` [patch 2/7] radix-tree: add gang_lookup_slot, gang_lookup_slot_tag npiggin
2008-06-05  9:43 ` [patch 3/7] mm: speculative page references npiggin
2008-06-06 14:20   ` Peter Zijlstra
2008-06-06 16:26     ` Nick Piggin
2008-06-06 16:27     ` Nick Piggin
2008-06-09  4:48   ` Tim Pepper
2008-06-10 19:08   ` Christoph Lameter
2008-06-11  3:19     ` Nick Piggin
2008-06-05  9:43 ` [patch 4/7] mm: lockless pagecache npiggin
2008-06-05  9:43 ` [patch 5/7] mm: spinlock tree_lock npiggin
2008-06-05  9:43 ` [patch 6/7] powerpc: implement pte_special npiggin
2008-06-06  4:04   ` Benjamin Herrenschmidt
2008-06-05  9:43 ` [patch 7/7] powerpc: lockless get_user_pages_fast npiggin
2008-06-09  8:32   ` Andrew Morton
2008-06-10  3:15     ` Nick Piggin
2008-06-10 19:00   ` Christoph Lameter
2008-06-11  3:18     ` Nick Piggin
2008-06-11  4:40       ` Christoph Lameter
2008-06-11  4:41         ` Christoph Lameter
2008-06-11  4:49           ` Nick Piggin
2008-06-11  6:06             ` Andrew Morton
2008-06-11  6:24               ` Nick Piggin
2008-06-11  6:50                 ` Andrew Morton
2008-06-11 23:20               ` Christoph Lameter
2008-06-11  4:47         ` Nick Piggin
2008-06-05 11:53 ` [patch 0/7] speculative page references, lockless pagecache, lockless gup Nick Piggin
2008-06-05 17:33 ` Linus Torvalds
2008-06-06  0:08   ` Nick Piggin
2008-06-06 21:32 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox