The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Linux Knernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Kernel 2.4.3 and new aic7xxx
Date: Wed, 07 Mar 2001 17:56:51 -0500	[thread overview]
Message-ID: <3AA6BCB3.F74C4ED7@mandrakesoft.com> (raw)
In-Reply-To: <200103072243.f27MhdO31896@aslan.scsiguy.com>

"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

  reply	other threads:[~2001-03-07 22:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-06  5:08 Kernel 2.4.3 and new aic7xxx Rafael E. Herrera
2001-03-06 11:44 ` Alan Cox
2001-03-06 14:38 ` Justin T. Gibbs
2001-03-06 18:47 ` Justin T. Gibbs
2001-03-06 20:09   ` Doug Ledford
2001-03-06 20:40     ` Justin T. Gibbs
2001-03-07  5:41   ` Rafael E. Herrera
2001-03-07  5:46     ` Justin T. Gibbs
2001-03-07  6:11       ` Linus Torvalds
2001-03-07  7:22         ` Aaron Tiensivu
2001-03-07 18:46           ` Rafael E. Herrera
     [not found]       ` <200103070611.WAA01595@penguin.transmeta.com>
2001-03-07 21:55         ` Jeff Garzik
2001-03-07 22:43           ` Justin T. Gibbs
2001-03-07 22:56             ` Jeff Garzik [this message]
2001-03-07 23:35               ` Justin T. Gibbs

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=3AA6BCB3.F74C4ED7@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=gibbs@scsiguy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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