linux/include
Robin Holt 51c6f666fc [PATCH] mm: ZAP_BLOCK causes redundant work
The address based work estimate for unmapping (for lockbreak) is and always
was horribly inefficient for sparse mappings.  The problem is most simply
explained with an example:

If we find a pgd is clear, we still have to call into unmap_page_range
PGDIR_SIZE / ZAP_BLOCK_SIZE times, each time checking the clear pgd, in
order to progress the working address to the next pgd.

The fundamental way to solve the problem is to keep track of the end
address we've processed and pass it back to the higher layers.

From: Nick Piggin <npiggin@suse.de>

  Modification to completely get away from address based work estimate
  and instead use an abstract count, with a very small cost for empty
  entries as opposed to present pages.

  On 2.6.14-git2, ppc64, and CONFIG_PREEMPT=y, mapping and unmapping 1TB
  of virtual address space takes 1.69s; with the following patch applied,
  this operation can be done 1000 times in less than 0.01s

From: Andrew Morton <akpm@osdl.org>

With CONFIG_HUTETLB_PAGE=n:

mm/memory.c: In function `unmap_vmas':
mm/memory.c:779: warning: division by zero

Due to

			zap_work -= (end - start) /
					(HPAGE_SIZE / PAGE_SIZE);

So make the dummy HPAGE_SIZE non-zero

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:12 -08:00
..
acpi [ACPI] ACPICA 20050902 2005-09-03 00:15:11 -04:00
asm-alpha [PATCH] ide: move CONFIG_IDE_MAX_HWIFS into linux/ide.h 2005-11-09 22:58:07 +01:00
asm-arm [ARM] 3098/1: pxa2xx disable ssp irq 2005-11-10 17:45:39 +00:00
asm-arm26 [PATCH] semaphore: Remove __MUTEX_INITIALIZER() 2005-10-30 17:37:27 -08:00
asm-cris [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-frv [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-generic [PATCH] RapidIO support: core base 2005-11-07 07:53:46 -08:00
asm-h8300 [PATCH] semaphore: Remove __MUTEX_INITIALIZER() 2005-10-30 17:37:27 -08:00
asm-i386 [PATCH] PCI: Change MSI to use physical delivery mode always 2005-11-10 16:09:18 -08:00
asm-ia64 [IA64] 4-level page tables 2005-11-11 09:37:29 -08:00
asm-m32r [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
asm-m68k [SPARC]: Kill remaining kbio.h references. 2005-11-07 14:12:21 -08:00
asm-m68knommu [PATCH] m68knommu: move some platform irq support out of irq.h 2005-11-07 08:00:47 -08:00
asm-mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2005-11-07 11:15:23 -08:00
asm-parisc [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-powerpc [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
asm-ppc [PATCH] Update email address for Kumar 2005-11-13 18:14:10 -08:00
asm-ppc64 [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
asm-s390 [PATCH] s390: "extern inline" -> "static inline" 2005-11-09 07:55:52 -08:00
asm-sh [PATCH] ide: move CONFIG_IDE_MAX_HWIFS into linux/ide.h 2005-11-09 22:58:07 +01:00
asm-sh64 [PATCH] ide: move CONFIG_IDE_MAX_HWIFS into linux/ide.h 2005-11-09 22:58:07 +01:00
asm-sparc [SPARC]: remove vuid_event.h 2005-11-07 14:11:38 -08:00
asm-sparc64 [SPARC64] mm: simpler tlb_flush_mmu 2005-11-07 14:12:08 -08:00
asm-um [PATCH] uml: maintain own LDT entries 2005-11-07 07:53:31 -08:00
asm-v850 [PATCH] include/asm-v850/ "extern inline" -> "static inline" 2005-11-07 07:53:32 -08:00
asm-x86_64 [PATCH] x86_64: fix tss limit 2005-11-13 18:14:09 -08:00
asm-xtensa [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
keys [PATCH] Keys: Export user-defined keyring operations 2005-10-30 17:37:22 -08:00
linux [PATCH] mm: ZAP_BLOCK causes redundant work 2005-11-13 18:14:12 -08:00
math-emu
media [PATCH] V4L: 904: added dvb support for tda8275a philips tiger reference design 2005-11-09 07:56:30 -08:00
mtd [MTD] user-abi: Clean up trailing white spaces 2005-11-07 14:43:11 +01:00
net [SCTP]: Include ulpevents in socket receive buffer accounting. 2005-11-11 16:08:24 -08:00
pcmcia [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
rdma [IB] uverbs: have kernel return QP capabilities 2005-11-10 10:22:50 -08:00
rxrpc [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
scsi [SCSI] use a completion in scsi_send_eh_cmnd 2005-11-06 12:49:36 -06:00
sound [ALSA] version 1.0.10rc3 2005-11-07 14:35:14 +01:00
video [PATCH] drivers/video: Replace custom macro with isdigit() 2005-09-13 08:22:33 -07:00