Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: New Wake Locks Patches Published For Linux Kernel

  1. #1
    Join Date
    Jan 2007
    Posts
    14,641

    Default New Wake Locks Patches Published For Linux Kernel

    Phoronix: New Wake Locks Patches Published For Linux Kernel

    While this weekend saw the release of the Linux 3.3-rc5 kernel, which Linus Torvalds self-admitted was pretty boring, also hitting the mailing list this past week were new kernel patches to implement auto-sleep and "wake locks" support...

    http://www.phoronix.com/vr.php?view=MTA2Mjg

  2. #2
    Join Date
    Dec 2010
    Location
    MA, USA
    Posts
    1,271

    Default

    huh? i could have sworn linux already had this ability and if not, it's pretty easy to write a shell script that suspends automatically based around your wake-ups. am i missing something here?

    btw, i don't use suspend and never really have - i've only had a laptop with a working battery for about a year and i don't like suspending my desktops when they're in the middle of something.

  3. #3
    Join Date
    Feb 2012
    Posts
    66

    Default Kernel

    I guess the big idea here is to add this functionality to the kernel to make it work out of the box, without the need to script anything. The kernel could also possibly be "more intelligent" about guessing if there's something going on or if it's fine to suspend. Instead of saying "sleep if there's no user input for ten minutes" it should be possible to do something like "sleep if there are no active tasks" (watching a movie, listening to music, downloading a file, ...). Not sure you're able to cover all that with a (simple) script.

  4. #4
    Join Date
    Dec 2010
    Posts
    45

    Default

    If the kernel would just count wakeup sources and suspend when they are 0, why can't it just give this number under /proc for userspace to do the same?

  5. #5
    Join Date
    Dec 2010
    Posts
    17

    Default "controversial work"

    Could someone provide some detail on why this is "controversial work"?

  6. #6
    Join Date
    Dec 2010
    Location
    MA, USA
    Posts
    1,271

    Default

    Quote Originally Posted by Wildfire View Post
    I guess the big idea here is to add this functionality to the kernel to make it work out of the box, without the need to script anything. The kernel could also possibly be "more intelligent" about guessing if there's something going on or if it's fine to suspend. Instead of saying "sleep if there's no user input for ten minutes" it should be possible to do something like "sleep if there are no active tasks" (watching a movie, listening to music, downloading a file, ...). Not sure you're able to cover all that with a (simple) script.
    well, a simple script couldn't but a script in general could. these are the kinds of things that are being added to the kernel that are multiplying it's size - this is not a necessary feature. to me, all that should be added to the kernel are things that add/fix functionality and make your hardware work to its full potential and nothing more. suspend is a functionality thing, but the kernel deciding when it should happen is just a feature.

    this 1 little thing might not seem like a big deal, but this stuff adds up yet people like linus torvalds complain how big the kernel is getting. there's been a lot of changes like this lately and the kernel is really starting to become too much of an all-in-one thing and it shouldn't be. maybe i don't have an intel cpu, but i have to deal with hundreds, possibly thousands of lines of code that target intel-only processors. maybe i don't want drivers for devices i'll never own (such as kinect), but they're added anyway. of course you could argue that i could customize the kernel myself or download a more limited version, but i shouldn't have to.

    the point is, the kernel is being packed full of things that never belonged there in the first place. if i want to suspend my computer automatically, i'll download something for that. if i have an intel cpu, i'll download the fixes for it. if i use a kinect, i'll download the drivers for it myself. its much easier to add features than remove.

  7. #7
    Join Date
    Aug 2007
    Location
    Europe
    Posts
    401

    Default

    Quote Originally Posted by schmidtbag View Post
    maybe i don't want drivers for devices i'll never own (such as kinect), but they're added anyway. of course you could argue that i could customize the kernel myself or download a more limited version, but i shouldn't have to.

    Seriously, how is anyone going to know beforehand which devices you have and don't have?

    As I see it, this is the least disruptive strategy.

  8. #8
    Join Date
    Dec 2010
    Location
    MA, USA
    Posts
    1,271

    Default

    Quote Originally Posted by sabriah View Post
    Seriously, how is anyone going to know beforehand which devices you have and don't have?

    As I see it, this is the least disruptive strategy.
    well most distros could ship with packages that install most, or all drivers for you. but even if they didn't, linux is notorious for leaving you in the dark with setting it up anyway. i learned almost everything i know on my own. i checked some forums here and there to figure out a weird problem but other than that i didn't look at any guides because they were either outdated, very slow-paced, or incomplete.

    considering linux is very community driven, cramming all these things into 1 big package kinda shrinks the community from offering alternatives.

  9. #9
    Join Date
    Feb 2012
    Posts
    66

    Default

    Quote Originally Posted by schmidtbag View Post
    The point is, the kernel is being packed full of things that never belonged there in the first place. if i want to suspend my computer automatically, i'll download something for that. if i have an intel cpu, i'll download the fixes for it. if i use a kinect, i'll download the drivers for it myself. its much easier to add features than remove.
    And how do you download all of these things, if your particulare network card isn't supported ootb? This sounds pretty much like what Windows is doing. I have a dual boot setup and on a fresh install I always have to use Linux to download all kinds of things (like network drivers) to get Windows into a usable state. On the other hand, my Linux installation just works.
    I think the main point about kernel size is aimed towards maintenance. The larger your code base the more difficult it gets to maintain. But it's not something the user needs to be primarily concerned about.
    Either get yourself a distro that comes with a "reasonable" kernel or, yes, do build it yourself if you're concerned about getting the best possible performance. To be honest, the only place I still do this is my router, to add support for HW encryption (Via Padlock).

  10. #10
    Join Date
    Jul 2009
    Posts
    221

    Default

    Quote Originally Posted by schmidtbag View Post
    huh? i could have sworn linux already had this ability and if not, it's pretty easy to write a shell script that suspends automatically based around your wake-ups. am i missing something here?

    btw, i don't use suspend and never really have - i've only had a laptop with a working battery for about a year and i don't like suspending my desktops when they're in the middle of something.
    I think you're totally missing something, yes. This isn't S3 suspend-to-RAM or whatever, this is suspending just the CPU to put the device into a low-power mode like Android does these wake/sleep cycles could take place several times a second if necessary. "Wake Locks" are signals that something requires processing either now or at some specified time in the future; any CPU jobs without Wake Locks are assumed not to require computation immediately, so if nothing else is locking the CPU "awake", the device can go to sleep and save some power.

    The difference to standard power-saving is that this policy is "sleep unless someone explicitly says something needs to be done now" rather than the usual opportunistic "sleep if there's nothing else to do".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •