summaryrefslogtreecommitdiff
path: root/arch/sparc64/mm/init.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-02-01 05:31:38 +0300
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 12:11:18 +0300
commitbd40791e1d289d807b8580abe1f117e9c62894e4 (patch)
tree2b47e24c8dc0e668dfd7ba0e3879165180c49c65 /arch/sparc64/mm/init.c
parent98c5584cfc47932c4f3ccf5eee2e0bae1447b85e (diff)
downloadlinux-bd40791e1d289d807b8580abe1f117e9c62894e4.tar.xz
[SPARC64]: Dynamically grow TSB in response to RSS growth.
As the RSS grows, grow the TSB in order to reduce the likelyhood of hash collisions and thus poor hit rates in the TSB. This definitely needs some serious tuning. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r--arch/sparc64/mm/init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 7c456afaa9a5..a8119cb4fa32 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -246,9 +246,11 @@ static __inline__ void clear_dcache_dirty_cpu(struct page *page, unsigned long c
void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
{
+ struct mm_struct *mm;
struct page *page;
unsigned long pfn;
unsigned long pg_flags;
+ unsigned long mm_rss;
pfn = pte_pfn(pte);
if (pfn_valid(pfn) &&
@@ -270,6 +272,11 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p
put_cpu();
}
+
+ mm = vma->vm_mm;
+ mm_rss = get_mm_rss(mm);
+ if (mm_rss >= mm->context.tsb_rss_limit)
+ tsb_grow(mm, mm_rss, GFP_ATOMIC);
}
void flush_dcache_page(struct page *page)