Re: [patchset] Lockfree fd lookup 0 of 5
From: Manfred Spraul
Date: Mon Aug 02 2004 - 13:51:58 EST
viro wrote:
How about this for comparison? That's just a dumb "convert to rwlock"
patch; we can be smarter in e.g. close_on_exec handling, but that's a
separate story.
That won't help:
The problem is the cache line trashing from fget() and fget_light() with
multithreaded apps. A sequence lock might help, but an rw lock is not a
solution.
Actually: 2.4 had an rwlock, it was converted to a spinlock because
spinlocks are faster on i386:
read_lock();
short operation();
read_unlock();
is a bit slower than
spin_lock();
short operation();
spin_unlock();
because read_unlock() is a full memory barrier and spin_unlock is not a
memory barrier (not necessary because writes are ordered)
--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/