lkml.org 
[lkml]   [2004]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.240 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site