public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Adrian Bunk <bunk@kernel.org>, Greg KH <gregkh@suse.de>,
	Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	linux-usb-devel@lists.sourceforge.net,
	Oliver Neukum <oneukum@suse.de>
Subject: Re: [GIT PATCH] USB autosuspend fixes for 2.6.23-rc6
Date: Thu, 13 Sep 2007 17:40:20 +0200	[thread overview]
Message-ID: <20070913154019.GG3563@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0709131111460.3619-100000@iolanthe.rowland.org>

On Thu, Sep 13, 2007 at 11:20:42AM -0400, Alan Stern wrote:
> On Thu, 13 Sep 2007, Adrian Bunk wrote:
> 
> > > These two patches address the need today to have users machines still
> > > work, even if they might draw more power than they possibly could (which
> > > is not any more than they did in 2.6.22.)
> > > 
> > > These patches do two things:
> > >   - disable USB autosuspend on all devices except for USB hubs.  This
> > >     can be easily overridden by userspace to turn on autosuspend for
> > >     devices that a user wants to.  HAL will use a whitelist in the
> > >     future for these types of devices.
> > >...
> > 
> > Not related to the patch for 2.6.23, but I have a gut feeling that 
> > something might be done the wrong way later:
> > 
> > If I understand you correctly, you are saying that I will have to 
> > install HAL for getting a whitelist for in-kernel functionality?
> 
> Your meaning isn't entirely clear.  Presumably HAL will contain such a 
> whitelist.  But there's nothing to stop you from setting up your own 
> whitelist via udev scripts, or even turning autosuspend on or off by 
> hand.
> 
> > It is a good thing if userspace can add currently missing devices to
> > whitelists, but the whitelist itself should be in the kernel.
> 
> It's not clear that this sort of approach will turn out to be workable.  
> Whitelists/blacklists do okay in the kernel when they refer to a 
> relatively small subset of devices.  However in this case I have the 
> impression that we're talking about roughly a 50/50 split.  Keeping an 
> in-kernel list with even 10% of all existing USB devices simply isn't 
> feasible.

What about this is not feasible?

The amount of work for maintaining the list is the same:

No matter whether it's in-kernel or in the userspace, you need a list of 
working devices in some machine readable format.

Whether this gets used by the kernel, by userspace, or both, shouldn't 
make any difference.

Kernel image size can be a problem in some cases, but an in-kernel list 
doesn't have to be mandatory but could be made selectable in kconfig.

> Besides, is it really that much harder for userspace to modify device
> settings as the devices are detected than for it to modify an in-kernel
> whitelist just once?  Don't forget about possible races: Devices may
> already have been detected and configured before userspace was able to
> modify the whitelist.

Above you said "there's nothing to stop you from ... even turning 
autosuspend on or off by hand".

If this will already be supported race-free, which races will still be
possible?

> Alan Stern

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2007-09-13 15:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-13 13:33 [GIT PATCH] USB autosuspend fixes for 2.6.23-rc6 Greg KH
2007-09-13 14:52 ` Adrian Bunk
2007-09-13 15:20   ` Alan Stern
2007-09-13 15:40     ` Adrian Bunk [this message]
2007-09-13 16:07       ` Alan Stern
2007-09-13 16:34         ` Greg KH
2007-09-13 16:43         ` Linus Torvalds
2007-09-13 19:13           ` Alan Stern
2007-09-14  0:24             ` Matthew Dharm
2007-09-14 14:34               ` Alan Stern
2007-09-14  8:55             ` Jiri Kosina
2007-09-14  9:59               ` Greg KH
2007-09-13 19:26           ` Pete Zaitcev
2007-09-13 20:19         ` Adrian Bunk
2007-09-13 20:31           ` Alan Stern
2007-09-13 20:44           ` Linus Torvalds
2007-09-13 21:28             ` Adrian Bunk
2007-09-13 22:05               ` Adrian Bunk
2007-09-14  0:11                 ` Linus Torvalds
2007-09-14 13:21                   ` Mark Lord
2007-09-14 14:15                     ` Adrian Bunk
2007-09-14 14:29                 ` Alan Stern
2007-09-14 14:26               ` Alan Stern
  -- strict thread matches above, loose matches on Subject: below --
2007-09-17 12:56 Hans de Goede
2007-09-18 10:39 Joerg Schilling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070913154019.GG3563@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=bunk@kernel.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=oneukum@suse.de \
    --cc=stern@rowland.harvard.edu \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox