public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Patrick Mochel <mochel@digitalimplant.org>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Don't use a klist for drivers' set-of-devices
Date: Thu, 11 Aug 2005 11:24:23 -0700	[thread overview]
Message-ID: <20050811182423.GC15803@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0508101637360.4467-100000@iolanthe.rowland.org>

On Wed, Aug 10, 2005 at 04:56:08PM -0400, Alan Stern wrote:
> Greg and Pat:
> 
> This patch (as536) simplifies the driver-model core by replacing the klist 
> used to store the set of devices bound to a driver with a regular list 
> protected by a mutex.  It turns out that even with a klist, there are too 
> many opportunities for races for the list to be used safely by more than 
> one thread at a time.  And given that only one thread uses the list at any 
> moment, there's no need to add all the extra overhead of making it a 
> klist.

Hm, but that was the whole reason to go to a klist in the first place.

> This version of the patch addresses the concerns raised earlier by Pat:  
> the list and mutex have been given more succinct names, and the obscure
> special-case code in device_attach has been replaced with a FIXME comment.  
> Note that the new iterators in driver.c could easily be changed to use
> list_for_each_entry_safe and list_for_each_entry, if the functions didn't
> offer the feature of starting in the middle of the list.  If no callers
> use that feature, it should be removed.

Pat, any opinions on this patch?

thanks,

greg k-h

  reply	other threads:[~2005-08-11 18:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-10 20:56 [PATCH] Don't use a klist for drivers' set-of-devices Alan Stern
2005-08-11 18:24 ` Greg KH [this message]
2005-08-11 18:53   ` Christoph Hellwig
2005-08-11 19:43     ` Alan Stern
2005-08-11 20:29       ` Dmitry Torokhov
2005-08-11 20:52         ` Alan Stern
2005-08-12 13:48         ` Alan Stern
2005-08-15 21:21         ` Alan Stern
2005-08-16 22:34           ` Dmitry Torokhov
2005-08-17 13:55             ` Alan Stern
2005-08-17 14:33               ` Bartlomiej Zolnierkiewicz

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=20050811182423.GC15803@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@digitalimplant.org \
    --cc=stern@rowland.harvard.edu \
    /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