Re: swsusp bigdiff [was Re: [PATCH] Software Suspend split to two stage V2.]

Pavel Machek
2004-12-20T22:47:37Z

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!