Messages in this thread | | | Date | Mon, 20 Dec 2004 23:40:06 +0100 | From | Pavel Machek <> | Subject | Re: swsusp bigdiff [was Re: [PATCH] Software Suspend split to two stage V2.] |
| |
Hi!
> > @@ -85,13 +86,26 @@ > > > > static void free_some_memory(void) > > { > > - printk("Freeing memory: "); > > - while (shrink_all_memory(10000)) > > - printk("."); > > - printk("|\n"); > > + int i; > > + for (i=0; i<5; i++) { > > + int i = 0, tmp; > > + long pages = 0; > > + char *p = "-\\|/"; > > + > > + printk("Freeing memory... "); > > + while ((tmp = shrink_all_memory(10000))) { > > + pages += tmp; > > + printk("\b%c", p[i]); > > + i++; > > + if (i > 3) > > + i = 0; > > + } > > + printk("\bdone (%li pages freed)\n", pages); > > + current->state = TASK_INTERRUPTIBLE; > > + schedule_timeout(HZ/5); > > This should be msleep_interruptible() [I do not see any wait-queue events around > this code].
Ugh, okay, this is my dirty hack to work around shrink_all_memory() problems. Fixed, anyway. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - 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/
| |