Re: Odd kswapd behaviour after suspending in 2.6.11-rc1

Nick Piggin
2005-01-16T03:55:34Z

[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]

Bernard Blackham wrote:
> On Sat, Jan 15, 2005 at 08:40:18PM +0800, Bernard Blackham wrote:
>
>>On Sat, Jan 15, 2005 at 10:01:11PM +1100, Nick Piggin wrote:
>>
>>>Also, Bernard, can you try running with the following patch and
>>>see what output it gives when you reproduce the problem?
>>
>>On resuming:
>
>
> And now with higher debug info that may prove useful (balance_pgdat
> firing as soon as kswapd woken):
>
> *** Cleaning up...
> Free memory at 'out': 59157.
> Last free mem was 59157. Is now 59156. I/O info value 0 now -1.
> Free memory at start of free_pagedir_data: 59156.
> Last free mem was 59156. Is now 60013. Checksum pages value 1 now 857.
> Free memory at end of free_pagedir: 60013.
> Pageset size1 was 3057; size2 was 2330.
> Free memory after freeing pagedir data: 60013.
> Thawing tasks
> Waking 4: khelper.
> Waking 5: kthread.
> Waking 6: kacpid.
> Waking 8: pdflush.
> Waking 11: aio/0.
> Waking 10: kswapd0.
> Wakikswapd: balance_pgdat, order = 10

Someone asked for an order 10 allocation by the looks.

This might tell us what happened.

[-- Attachment #2: kswapd-debug --]
[-- Type: text/plain, Size: 412 bytes --]

Index: linux-2.6/mm/vmscan.c
===================================================================
--- linux-2.6.orig/mm/vmscan.c 2005-01-16 14:52:42.753380598 +1100
+++ linux-2.6/mm/vmscan.c 2005-01-16 14:54:28.468932870 +1100
@@ -1194,6 +1194,11 @@
{
pg_data_t *pgdat;

+ if (order >= 8) {
+ printk("wakeup_kswapd(order = %d)\n", order);
+ dump_stack();
+ }
+
if (zone->present_pages == 0)
return;