Messages in this thread | | | Date | Mon, 20 Dec 2004 23:41:02 +0100 | From | Pavel Machek <> | Subject | Re: [PATH] swsusp update 1/3 |
| |
Hi!
> > + if (nr_free_pages() < nr_copy_pages + PAGES_FOR_IO) { > > + printk("swsusp: need %d pages, free %d pages\n", > > + nr_copy_pages, nr_free_pages()); > > + printk("swsusp: Freeing memory:... "); > > + while (shrink_all_memory(nr_copy_pages * 2)) { > > + current->state = TASK_INTERRUPTIBLE; > > + schedule_timeout(HZ/5); > > This should be msleep_interruptible() [I do not see any wait-queue events around > this code].
Agreed, it also makes code nicer... Anyway, the loop should not be needed in the first place....
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/
| |