Re: Elimination of klists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2005-09-11 at 15:35 -0400, Alan Stern wrote:
> I noticed that you recently posted some updates to the klist code, 
> although I haven't looked to see how you are using the klists.

Yes, that was mainly to tie their reference counting model back to the
objects they actually embed.  It was just fixing a thinko in the
implementation rather than changing anything fundamental about them.

> What do you think about eliminating klists entirely, and instead using 
> regular lists protected by either a mutex or an rwsem?  It would remove a 
> good deal of overhead, and I think it wouldn't be hard to convert the 
> driver core.  Would this be feasible for the things you're doing?

Actually, the concept of a klist is quite nice, and the beauty is that
all the locking is internal to them, so users can't actually get it
wrong (I like interfaces like this).

Originally the driver model did precisely use an ordinary list and a
mutex.  The problem was that we entangled the mutex in the actions taken
by things like device_for_each_child() which caused deadlocks ... most
noticeably in the transport classes; klists got us out of this.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux