• Andrew Morton's avatar
    [PATCH] kill_fasync speedup · f6ef9d5b
    Andrew Morton authored
    From: Manfred Spraul <manfred@colorfullife.com>
    
    fasync_helper and kill_fasync are helpers for managing F_SETFL fcntl 
    calls that change FASYNC and sending the necessary signals. The locking 
    uses one global rwlock that's acquired for read in all kill_fasync
    calls, and that causes cache line trashing. This is not necessary: if
    the fasync list is empty, then there is no need to acquire the rwlock.
    Tests with reaim on a 4-way pIII on STP showed an 80% reduction of the
    time within kill_fasync.
    f6ef9d5b
fcntl.c 13.6 KB