original_kernel/include
Nick Piggin 35a82d1a53 [PATCH] optimise loop driver a bit
Looks like locking can be optimised quite a lot.  Increase lock widths
slightly so lo_lock is taken fewer times per request.  Also it was quite
trivial to cover lo_pending with that lock, and remove the atomic
requirement.  This also makes memory ordering explicitly correct, which is
nice (not that I particularly saw any mem ordering bugs).

Test was reading 4 250MB files in parallel on ext2-on-tmpfs filesystem (1K
block size, 4K page size).  System is 2 socket Xeon with HT (4 thread).

intel:/home/npiggin# umount /dev/loop0 ; mount /dev/loop0 /mnt/loop ; /usr/bin/time ./mtloop.sh

Before:
0.24user 5.51system 0:02.84elapsed 202%CPU (0avgtext+0avgdata 0maxresident)k
0.19user 5.52system 0:02.88elapsed 198%CPU (0avgtext+0avgdata 0maxresident)k
0.19user 5.57system 0:02.89elapsed 198%CPU (0avgtext+0avgdata 0maxresident)k
0.22user 5.51system 0:02.90elapsed 197%CPU (0avgtext+0avgdata 0maxresident)k
0.19user 5.44system 0:02.91elapsed 193%CPU (0avgtext+0avgdata 0maxresident)k

After:
0.07user 2.34system 0:01.68elapsed 143%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.37system 0:01.68elapsed 144%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.39system 0:01.68elapsed 145%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.36system 0:01.68elapsed 144%CPU (0avgtext+0avgdata 0maxresident)k
0.06user 2.42system 0:01.68elapsed 147%CPU (0avgtext+0avgdata 0maxresident)k

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23 09:45:18 -07:00
..
acpi
asm-alpha
asm-arm
asm-arm26
asm-cris
asm-frv
asm-generic [PATCH] x86/x86_64: pcibus_to_node 2005-06-23 09:45:08 -07:00
asm-h8300
asm-i386 [PATCH] xen: x86: Rename usermode macro 2005-06-23 09:45:14 -07:00
asm-ia64 [PATCH] ia64: Selectable Timer Interrupt Frequency 2005-06-23 09:45:10 -07:00
asm-m32r [PATCH] m32r: build fix for asm-m32r/topology.h 2005-06-23 09:45:08 -07:00
asm-m68k
asm-m68knommu
asm-mips
asm-parisc
asm-ppc
asm-ppc64 [PATCH] ppc64: pcibus_to_node fix 2005-06-23 09:45:08 -07:00
asm-s390
asm-sh
asm-sh64
asm-sparc
asm-sparc64
asm-um [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
asm-v850
asm-x86_64 [PATCH] xen: x86_64: Add macro for debugreg 2005-06-23 09:45:14 -07:00
linux [PATCH] optimise loop driver a bit 2005-06-23 09:45:18 -07:00
math-emu
media
mtd
net
pcmcia
rxrpc
scsi
sound [PATCH] create a kstrdup library function 2005-06-23 09:45:18 -07:00
video