Messages in this thread | | | Date | Sun, 30 May 2004 12:21:58 +1000 | From | Nick Piggin <> | Subject | Re: swappiness=0 makes software suspend fail. |
| |
Pavel Machek wrote: > Hi! > > Andrew, in 2.6.6 shrink_all_memory() does not work if swappiness == > 0. shrink_all_memory() calls balance_pgdat(), that calls > shrink_zone(), and that calls refill_inactive_zone(), which looks at > swappiness. > > Additional parameter to all these calls neutralizing swappiness would > help, as would temporarily setting swappiness to 100 in > shrink_all_memory. Is there a less ugly solution?
I have a cleanup patch that allows this sort of thing to easily be passed into the lower levels of reclaim functions. I don't know if it would be to Andrew's taste though...
It basically replaces all function parameters in vmscan.c with
struct scan_control { unsigned long nr_to_scan; unsigned long nr_scanned; unsigned long nr_reclaimed; unsigned int gfp_mask; struct page_state ps; int may_writepage; };
So you could easily add a field for swsusp.
Until something like this goes through, please don't fuglify vmscan.c any more than it is... do the saving and restoring thing that Nigel suggested please. - 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/
| |