android_kernel_xiaomi_sm7250/include
Hugh Dickins 52b7efdbe5 [PATCH] swap: scan_swap_map drop swap_device_lock
get_swap_page has often shown up on latency traces, doing lengthy scans while
holding two spinlocks.  swap_list_lock is already dropped, now scan_swap_map
drop swap_device_lock before scanning the swap_map.

While scanning for an empty cluster, don't worry that racing tasks may
allocate what was free and free what was allocated; but when allocating an
entry, check it's still free after retaking the lock.  Avoid dropping the lock
in the expected common path.  No barriers beyond the locks, just let the
cookie crumble; highest_bit limit is volatile, but benign.

Guard against swapoff: must check SWP_WRITEOK before allocating, must raise
SWP_SCANNING reference count while in scan_swap_map, swapoff wait for that to
fall - just use schedule_timeout, we don't want to burden scan_swap_map
itself, and it's very unlikely that anyone can really still be in
scan_swap_map once swapoff gets this far.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:05:41 -07:00
..
acpi /home/lenb/src/to-linus branch 'acpi-2.6.12' 2005-07-29 23:31:17 -04:00
asm-alpha [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-arm [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-arm26 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-cris [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-frv [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-generic [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-h8300 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-i386 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-ia64 [IA64] Low byte of current->personality is not a bitmask. 2005-08-30 14:59:24 -07:00
asm-m32r [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-m68k [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-m68knommu [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-mips [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-parisc [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-powerpc [PATCH] Move all the very similar files to asm-powerpc 2005-08-30 13:32:06 +10:00
asm-ppc Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 2005-08-29 21:44:33 -07:00
asm-ppc64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-s390 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sh [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sh64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sparc [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sparc64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-um [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-v850 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-x86_64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-xtensa [NET]: Introduce SO_{SND,RCV}BUFFORCE socket options 2005-08-29 15:31:35 -07:00
linux [PATCH] swap: scan_swap_map drop swap_device_lock 2005-09-05 00:05:41 -07:00
math-emu Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
media [PATCH] V4L: Miscellaneous fixes 2005-08-01 19:13:59 -07:00
mtd [MTD] NAND: Honour autoplacement schemes supplied by the caller 2005-05-23 13:20:45 +02:00
net /spare/repo/netdev-2.6 branch 'master' 2005-09-01 18:02:01 -04:00
pcmcia [PATCH] pcmcia: fix pcmcia-cs compilation 2005-07-12 16:00:59 -07:00
rdma [PATCH] IB: move include files to include/rdma 2005-08-26 20:37:38 -07:00
rxrpc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
scsi [SCSI] fix target scanning oops with fc transport class 2005-08-08 17:14:55 -05:00
sound [ALSA] version 1.0.10rc1 2005-08-30 08:48:35 +02:00
video [PATCH] Clean-up and bug fix for tdfxfb framebuffer size detection 2005-05-01 08:59:25 -07:00