Messages in this thread | | | Date | Wed, 07 Mar 2001 17:56:51 -0500 | From | Jeff Garzik <> | Subject | Re: Kernel 2.4.3 and new aic7xxx |
| |
"Justin T. Gibbs" wrote: > How often is the list manipulated? My guess is not very often.
Modified very infrequently... at boot, and for each hotplug insertion or removal. It's not even read very often.
> You can allow people to read the list without taking a spinlock and > only acquire the spinlock on list manipulations. Inserting an > element can be performed atomically so there isn't an SMP issue > so long as you don't allow more than one processor to insert at > the same time. This would allow you to perform insertion sort > meaning that everything from /proc to device drivers auto-magically > sees the devices in the order they were probed.
I was just thinking the same thing. list_splice and an insertion sort can be used instead of all that allocation crap.
> For hot plug devices > you might want to insert them at the end to follow the "order probed" > motif.
hmmm.. Is there a reason why this would be -needed-? It wouldn't be hard to implement, but I would rather not have drivers dealing with a list whose normal state is defined as "mostly sorted"...
-- Jeff Garzik | "You see, in this world there's two kinds of Building 1024 | people, my friend: Those with loaded guns MandrakeSoft | and those who dig. You dig." --Blondie - 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/
| |