lkml.org 
[lkml]   [2005]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Elimination of klists
From
Date
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 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-09-11 23:51    [W:0.308 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site