• Robin Holt's avatar
    Factor out #ifdefs from kernel/spinlock.c to LOCK_CONTENDED_FLAGS · e8c158bb
    Robin Holt authored
    SGI has observed that on large systems, interrupts are not serviced for a
    long period of time when waiting for a rwlock.  The following patch series
    re-enables irqs while waiting for the lock, resembling the code which is
    already there for spinlocks.
    
    I only made the ia64 version, because the patch adds some overhead to the
    fast path.  I assume there is currently no demand to have this for other
    architectures, because the systems are not so large.  Of course, the
    possibility to implement raw_{read|write}_lock_flags for any architecture
    is still there.
    
    This patch:
    
    The new macro LOCK_CONTENDED_FLAGS expands to the correct implementation
    depending on the config options, so that IRQ's are re-enabled when
    possible, but they remain disabled if CONFIG_LOCKDEP is set.
    Signed-off-by: default avatarPetr Tesarik <ptesarik@suse.cz>
    Signed-off-by: default avatarRobin Holt <holt@sgi.com>
    Cc: <linux-arch@vger.kernel.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: "Luck, Tony" <tony.luck@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e8c158bb
spinlock.c 11.1 KB