Messages in this thread Patch in this message |  | | | Date | Sun, 24 Oct 2004 12:59:11 +1000 | | From | Nick Piggin <> | | Subject | Re: 2.6.9-ck1: swap mayhem under UT2004 |
| |
Alastair Stevens wrote: > On Saturday 23 October 2004 7:00, Nick Piggin wrote: > >>Alastair, can you compile sysrq support into the kernel, and >>press Alt+SysRq+M when kswapd is going crazy. Then send me >>the output of `dmesg`. That would be very helpful. > > > OK, here she is..... > > It certainly doesn't do it _every_ time. Going into X and straight into > UT2004 seems fine; but once other apps are loaded and memory is tighter, > off it goes into a frenzy. > > Hope this is useful - thanks for your help! >
Yep it's great, thanks.
> SysRq : Show Memory > Mem-info: > DMA per-cpu: > cpu 0 hot: low 2, high 6, batch 1 > cpu 0 cold: low 0, high 2, batch 1 > Normal per-cpu: > cpu 0 hot: low 32, high 96, batch 16 > cpu 0 cold: low 0, high 32, batch 16 > HighMem per-cpu: empty > > Free pages: 3596kB (0kB HighMem) > Active:97415 inactive:15328 dirty:2 writeback:0 unstable:0 free:899 > slab:2384 mapped:90021 pagetables:523 > DMA free:20kB min:20kB low:40kB high:60kB active:2080kB inactive:0kB > present:16384kB > protections[]: 0 0 0 > Normal free:3576kB min:700kB low:1400kB high:2100kB active:387580kB > inactive:61312kB present:507888kB > protections[]: 0 0 0 > HighMem free:0kB min:128kB low:256kB high:384kB active:0kB inactive:0kB > present:0kB > protections[]: 0 0 0 > DMA: 1*4kB 0*8kB 1*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB > 0*2048kB 0*4096kB = 20kB > Normal: 2*4kB 56*8kB 51*16kB 40*32kB 6*64kB 1*128kB 0*256kB 1*512kB > 0*1024kB 0*2048kB 0*4096kB = 3576kB > HighMem: empty > Swap cache: add 697, delete 476, find 139/162, race 0+0 > Free swap: 1660584kB > 131068 pages of RAM > 0 pages of HIGHMEM > 2408 reserved pages > 86381 pages shared > 221 pages swap cached >
Can you try the following patch to start with, please? (against 2.6.10-rc1, but should apply to most recent kernels I think)
--- linux-2.6-npiggin/mm/vmscan.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN mm/memory.c~vm-pages_scanned-active_list mm/memory.c diff -puN mm/vmscan.c~vm-pages_scanned-active_list mm/vmscan.c --- linux-2.6/mm/vmscan.c~vm-pages_scanned-active_list 2004-10-24 12:56:25.000000000 +1000 +++ linux-2.6-npiggin/mm/vmscan.c 2004-10-24 12:57:14.000000000 +1000 @@ -574,7 +574,6 @@ static void shrink_cache(struct zone *zo nr_taken++; } zone->nr_inactive -= nr_taken; - zone->pages_scanned += nr_taken; spin_unlock_irq(&zone->lru_lock); if (nr_taken == 0) @@ -675,6 +674,7 @@ refill_inactive_zone(struct zone *zone, } pgscanned++; } + zone->pages_scanned += pgscanned; zone->nr_active -= pgmoved; spin_unlock_irq(&zone->lru_lock); _
|  |