lkml.org 
[lkml]   [2005]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.10: kswapd spins like crazy
Terje Fåberg wrote:
> Terje Fåberg <terje_fb@yahoo.no> skrev:
>
>
>>The kernel is compiling right now, but I cannot
>>reboot this machine until six or seven o'clock
>>tonight (CET). I will report then.
>
>
> Well, well, I rebooted the same kernel, now with
> MAGIC-SYSRQ enabled. At first the kswapd-effect
> wouldn't show up, but now the image is much clearer
> than before. kswapd eats constantly 95% cpu time while
> the system is "idle".
>
> The System is quite sluggish. Switching between
> applications needs ages. After Eclipse has been active
> for a few minutes, I it lasts 45 seconds until enough
> of Mozilla is swapped back in, and Mozilla has redrawn
> its window.
>
> Complete info including SysRq-Meminfo is attached.
>

Thanks very much, this is a good help.

> galileo:~# cat /proc/vmstat > pre ; sleep 10 ; cat /proc/vmstat > post
>
> galileo:~# cat pre
...
> pgscan_kswapd_high 0
> pgscan_kswapd_normal 2504667
> pgscan_kswapd_dma 615532032
...
>
> galileo:~# cat post
...
> pgscan_kswapd_high 0
> pgscan_kswapd_normal 2504667
> pgscan_kswapd_dma 649881006
...

So we can see it is trying to scan the DMA zone.

> galileo:~# dmesg
> [...]
> 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: 7872kB (0kB HighMem)
> Active:48698 inactive:86241 dirty:0 writeback:0 unstable:0 free:1968 slab:4509 mapped:50560 pagetables:1717
> DMA free:80kB min:80kB low:100kB high:120kB active:0kB inactive:11716kB present:16384kB pages_scanned:123 all_unreclaimable? no
> protections[]: 0 0 0

This is the reason why: DMA only has 80K free, and kswapd won't stop until either 120K
is free, or all_unreclaimable gets switched on.

Now clearly all_unreclaimable should be getting set if nothing can be reclaimed (although
it is possible that non pagecache allocating and freeing can mess it up, that's unlikely).

Hmm, your DMA zone has no active pages, and pages_scanned (which triggers all_unreclaimable)
is only incremented when scanning the active list. But I wonder, if the pages can't be
freed, why aren't they being put on the active list?

Nick

PS. let's not release 2.6.11 just yet :\

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.051 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site