Re: swsusp performance problems in 2.6.15-rc3-mm1

From: Rafael J. Wysocki
Date: Sun Dec 11 2005 - 07:17:50 EST


On Sunday, 11 December 2005 00:33, Andrew Morton wrote:
> "Rafael J. Wysocki" <rjw@xxxxxxx> wrote:
> >
> > Would that be ok if I made drop_pagecache() nonstatic and called it directly
> > from swsusp?
>
> Sure, I'll updates the patch for that.

Thanks a lot.

> It changed a bit.. You'll need to run sys_sync() then drop_pagecache()
> then drop_slab().

I think it won't hurt if we do this unconditionally in swsusp_shrink_memory().
Pavel, what do you think?

The appended patch illustrates the way in which I think we can use this.
I've tested it a little, but if someone feels like trying it, please do.

Greetings,
Rafael


kernel/power/swsusp.c | 3 +++
1 files changed, 3 insertions(+)

Index: linux-2.6.15-rc5-mm1/kernel/power/swsusp.c
===================================================================
--- linux-2.6.15-rc5-mm1.orig/kernel/power/swsusp.c 2005-12-10 23:51:00.000000000 +0100
+++ linux-2.6.15-rc5-mm1/kernel/power/swsusp.c 2005-12-11 12:45:57.000000000 +0100
@@ -641,6 +641,9 @@ int swsusp_shrink_memory(void)
char *p = "-\\|/";

printk("Shrinking memory... ");
+ sys_sync();
+ drop_pagecache();
+ drop_slab();
do {
size = 2 * count_highmem_pages();
size += size / 50 + count_data_pages();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/