android_kernel_samsung_msm8976/include
David S. Miller 7a1ac52641 [SPARC64]: Fix and re-enable dynamic TSB sizing.
This is good for up to %50 performance improvement of some test cases.
The problem has been the race conditions, and hopefully I've plugged
them all up here.

1) There was a serious race in switch_mm() wrt. lazy TLB
   switching to and from kernel threads.

   We could erroneously skip a tsb_context_switch() and thus
   use a stale TSB across a TSB grow event.

   There is a big comment now in that function describing
   exactly how it can happen.

2) All code paths that do something with the TSB need to be
   guarded with the mm->context.lock spinlock.  This makes
   page table flushing paths properly synchronize with both
   TSB growing and TLB context changes.

3) TSB growing events are moved to the end of successful fault
   processing.  Previously it was in update_mmu_cache() but
   that is deadlock prone.  At the end of do_sparc64_fault()
   we hold no spinlocks that could deadlock the TSB grow
   sequence.  We also have dropped the address space semaphore.

While we're here, add prefetching to the copy_tsb() routine
and put it in assembler into the tsb.S file.  This piece of
code is quite time critical.

There are some small negative side effects to this code which
can be improved upon.  In particular we grab the mm->context.lock
even for the tsb insert done by update_mmu_cache() now and that's
a bit excessive.  We can get rid of that locking, and the same
lock taking in flush_tsb_user(), by disabling PSTATE_IE around
the whole operation including the capturing of the tsb pointer
and tsb_nentries value.  That would work because anyone growing
the TSB won't free up the old TSB until all cpus respond to the
TSB change cross call.

I'm not quite so confident in that optimization to put it in
right now, but eventually we might be able to and the description
is here for reference.

This code seems very solid now.  It passes several parallel GCC
bootstrap builds, and our favorite "nut cruncher" stress test which is
a full "make -j8192" build of a "make allmodconfig" kernel.  That puts
about 256 processes on each cpu's run queue, makes lots of process cpu
migrations occur, causes lots of page table and TLB flushing activity,
incurs many context version number changes, and it swaps the machine
real far out to disk even though there is 16GB of ram on this test
system. :-)

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:16:33 -08:00
..
acpi [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
asm-alpha [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-arm [ARM] 3364/1: [cleanup] warning fix - definitions for enable_hlt and disable_hlt 2006-03-15 23:17:26 +00:00
asm-arm26 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-cris [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-frv [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-generic [PATCH] __get_unaligned() gcc-4 fix 2006-03-08 14:14:00 -08:00
asm-h8300 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-i386 [PATCH] i386: port ATI timer fix from x86_64 to i386 II 2006-03-08 18:10:31 -08:00
asm-ia64 [IA64-SGI] Make number of TIO nodes configurable 2006-02-27 15:32:28 -08:00
asm-m32r [PATCH] m32r: fix and update for gcc-4.0 2006-02-24 14:31:36 -08:00
asm-m68k [PATCH] m68k: fix cmpxchg compile errors if CONFIG_RMW_INSNS=n 2006-03-09 19:47:38 -08:00
asm-m68knommu [PATCH] m68knommu: hardirq.h needs definition of NR_IRQS 2006-02-07 16:16:54 -08:00
asm-mips [MIPS] Sibyte: Fix race in sb1250_gettimeoffset(). 2006-03-18 16:59:30 +00:00
asm-parisc [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-powerpc [PATCH] powerpc: properly configure DDR/P5IOC children devs 2006-03-16 16:55:07 +11:00
asm-ppc [PATCH] powerpc: remove duplicate exports 2006-02-20 10:44:31 +11:00
asm-s390 [PATCH] s390: fix compile with VIRT_CPU_ACCOUNTING=n 2006-03-06 18:40:44 -08:00
asm-sh [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-sh64 [PATCH] sh/sh64: Fix bogus TIOCGICOUNT definitions 2006-02-01 08:53:20 -08:00
asm-sparc [SPARC]: Kill off these __put_user_ret things. 2006-03-20 01:13:15 -08:00
asm-sparc64 [SPARC64]: Fix and re-enable dynamic TSB sizing. 2006-03-20 01:16:33 -08:00
asm-um [PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages 2006-02-01 08:53:23 -08:00
asm-v850 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-x86_64 Revert "[PATCH] x86_64: Only do the clustered systems have unsynchronized TSC assumption on IBM systems" 2006-02-27 20:41:56 -08:00
asm-xtensa [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
keys
linux [SPARC64]: Add SUN4V Hypervisor Console driver. 2006-03-20 01:12:18 -08:00
math-emu
media V4L/DVB (3388): tuner_params->tda988x is currently unused, so disable 2006-01-15 21:28:17 -02:00
mtd
net [AX.25]: Fix potencial memory hole. 2006-03-19 13:20:06 -08:00
pcmcia [PATCH] pcmcia: Add macro to match PCMCIA cards by numeric ID and first vendor string 2006-03-01 11:11:26 +01:00
rdma IB: Add node_guid to struct ib_device 2006-01-10 07:39:34 -08:00
rxrpc
scsi [PATCH] add scsi_execute_in_process_context() API 2006-02-14 11:14:26 -06:00
sound [PATCH] DocBook: fix kernel-doc comments 2006-01-10 08:01:53 -08:00
video [PATCH] neofb: avoid resetting display config on unblank (v2) 2006-02-15 15:32:21 -08:00