1. 07 11月, 2009 1 次提交
  2. 04 9月, 2009 1 次提交
  3. 01 9月, 2009 1 次提交
  4. 06 7月, 2009 1 次提交
  5. 13 6月, 2009 1 次提交
  6. 07 4月, 2009 2 次提交
  7. 03 2月, 2009 1 次提交
  8. 22 1月, 2009 1 次提交
  9. 08 1月, 2009 1 次提交
  10. 23 12月, 2008 1 次提交
  11. 26 11月, 2008 1 次提交
  12. 04 11月, 2008 1 次提交
  13. 28 10月, 2008 1 次提交
  14. 23 9月, 2008 1 次提交
  15. 22 9月, 2008 1 次提交
  16. 27 7月, 2008 1 次提交
    • N
      mm: speculative page references · e286781d
      Nick Piggin 提交于
      If we can be sure that elevating the page_count on a pagecache page will
      pin it, we can speculatively run this operation, and subsequently check to
      see if we hit the right page rather than relying on holding a lock or
      otherwise pinning a reference to the page.
      
      This can be done if get_page/put_page behaves consistently throughout the
      whole tree (ie.  if we "get" the page after it has been used for something
      else, we must be able to free it with a put_page).
      
      Actually, there is a period where the count behaves differently: when the
      page is free or if it is a constituent page of a compound page.  We need
      an atomic_inc_not_zero operation to ensure we don't try to grab the page
      in either case.
      
      This patch introduces the core locking protocol to the pagecache (ie.
      adds page_cache_get_speculative, and tweaks some update-side code to make
      it work).
      
      Thanks to Hugh for pointing out an improvement to the algorithm setting
      page_count to zero when we have control of all references, in order to
      hold off speculative getters.
      
      [kamezawa.hiroyu@jp.fujitsu.com: fix migration_entry_wait()]
      [hugh@veritas.com: fix add_to_page_cache]
      [akpm@linux-foundation.org: repair a comment]
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Reviewed-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Acked-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e286781d
  17. 22 5月, 2008 1 次提交
  18. 24 3月, 2008 1 次提交
  19. 29 1月, 2008 2 次提交
  20. 04 1月, 2008 6 次提交
  21. 16 10月, 2007 1 次提交
  22. 11 10月, 2007 4 次提交
  23. 12 7月, 2007 2 次提交
  24. 31 5月, 2007 1 次提交
  25. 25 5月, 2007 1 次提交
  26. 26 4月, 2007 3 次提交
  27. 03 12月, 2006 1 次提交