1. 27 1月, 2011 1 次提交
    • T
      rwsem: Remove redundant asmregparm annotation · d1233754
      Thomas Gleixner 提交于
      Peter Zijlstra pointed out, that the only user of asmregparm (x86) is
      compiling the kernel already with -mregparm=3. So the annotation of
      the rwsem functions is redundant. Remove it.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Chris Zankel <chris@zankel.net>
      LKML-Reference: <alpine.LFD.2.00.1101262130450.31804@localhost6.localdomain6>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      d1233754
  2. 10 8月, 2010 5 次提交
    • M
      rwsem: smaller wrappers around rwsem_down_failed_common · a8618a0e
      Michel Lespinasse 提交于
      More code can be pushed from rwsem_down_read_failed and
      rwsem_down_write_failed into rwsem_down_failed_common.
      
      Following change adding down_read_critical infrastructure support also
      enjoys having flags available in a register rather than having to fish it
      out in the struct rwsem_waiter...
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a8618a0e
    • M
      rwsem: wake queued readers when writer blocks on active read lock · 424acaae
      Michel Lespinasse 提交于
      This change addresses the following situation:
      
      - Thread A acquires the rwsem for read
      - Thread B tries to acquire the rwsem for write, notices there is already
        an active owner for the rwsem.
      - Thread C tries to acquire the rwsem for read, notices that thread B already
        tried to acquire it.
      - Thread C grabs the spinlock and queues itself on the wait queue.
      - Thread B grabs the spinlock and queues itself behind C. At this point A is
        the only remaining active owner on the rwsem.
      
      In this situation thread B could notice that it was the last active writer
      on the rwsem, and decide to wake C to let it proceed in parallel with A
      since they both only want the rwsem for read.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      424acaae
    • M
      rwsem: let RWSEM_WAITING_BIAS represent any number of waiting threads · fd41b334
      Michel Lespinasse 提交于
      Previously each waiting thread added a bias of RWSEM_WAITING_BIAS.  With
      this change, the bias is added only once to indicate that the wait list is
      non-empty.
      
      This has a few nice properties which will be used in following changes:
      - when the spinlock is held and the waiter list is known to be non-empty,
        count < RWSEM_WAITING_BIAS  <=>  there is an active writer on that sem
      - count == RWSEM_WAITING_BIAS  <=>  there are waiting threads and no
                                           active readers/writers on that sem
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd41b334
    • M
      rwsem: lighter active count checks when waking up readers · 70bdc6e0
      Michel Lespinasse 提交于
      In __rwsem_do_wake(), we can skip the active count check unless we come
      there from up_xxxx().  Also when checking the active count, it is not
      actually necessary to increment it; this allows us to get rid of the read
      side undo code and simplify the calculation of the final rwsem count
      adjustment once we've counted the reader threads to wake.
      
      The basic observation is the following.  When there are waiter threads on
      a rwsem and the spinlock is held, other threads can only increment the
      active count by trying to grab the rwsem in down_xxxx().  However
      down_xxxx() will notice there are waiter threads and take the down_failed
      path, blocking to acquire the spinlock on the way there.  Therefore, a
      thread observing an active count of zero with waiters queued and the
      spinlock held, is protected against other threads acquiring the rwsem
      until it wakes the last waiter or releases the spinlock.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70bdc6e0
    • M
      rwsem: fully separate code paths to wake writers vs readers · 345af7bf
      Michel Lespinasse 提交于
      This is in preparation for later changes in the series.
      
      In __rwsem_do_wake(), the first queued waiter is checked first in order to
      determine whether it's a writer or a reader.  The code paths diverge at
      this point.  The code that checks and increments the rwsem active count is
      duplicated on both sides - the point is that later changes in the series
      will be able to independently modify both sides.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      345af7bf
  3. 13 5月, 2010 1 次提交
  4. 30 1月, 2008 1 次提交
  5. 18 12月, 2007 1 次提交
  6. 11 10月, 2006 1 次提交
  7. 30 9月, 2006 1 次提交
  8. 04 7月, 2006 2 次提交
  9. 01 5月, 2005 1 次提交
  10. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4