lkml.org 
[lkml]   [2004]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: swappiness=0 makes software suspend fail.
Date
On Sunday 30 May 2004 18:23, Oliver Neukum wrote:
> Am Sonntag, 30. Mai 2004 21:47 schrieb Pavel Machek:
> > > Until something like this goes through, please don't fuglify
> > > vmscan.c any more than it is... do the saving and restoring
> > > thing that Nigel suggested please.
>
> Isn't that a race condition with setting swapiness?

During suspend? Not really. If it's done from the userspace script, it's
done before the suspend is triggered, and undone after suspend comes back.
No problem there. If it's done in the kernel, then all the userspace
thingies that might play with it have already been frozen, it's never touched
from interrupt context... What would you be locking _against_?

Swappiness isn't really twiddled from a lot of places. Maybe your init script
touches it. Other than that, you have to be root, and you pretty much have
to do it manually. Touching this tuning knob is about as common as touching
/proc/sys/net/ipv4/tcp_ecn or /proc/sys/kernel/panic.

The failure condition is graceful, by the way. The suspend doesn't free
enough memory, and thus resumes userspace immediately. Kind of annoying if
you've packed away your laptop to let it power down (since it can take a good
45 seconds to do so, depending on how fragmented your swap file and memory
and such are...)

> Regards
> Oliver

Rob

--
www.linucon.org: Linux Expo and Science Fiction Convention
October 8-10, 2004 in Austin Texas. (I'm the con chair.)

-
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:03    [W:0.083 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site