mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Justin T. Gibbs" <gibbs@scsiguy.com>
To: Jeff Garzik <jgarzik@mandrakesoft.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 15:43:39 -0700	[thread overview]
Message-ID: <200103072243.f27MhdO31896@aslan.scsiguy.com> (raw)
In-Reply-To: Your message of "Wed, 07 Mar 2001 16:55:50 EST." <3AA6AE66.700D806@mandrakesoft.com>

>I would prefer to sort the list at probe not boot time.  That makes it
>easy to reverse the order on the fly, depending on what the driver
>requests at runtime.  It's SMP-friendly, because I can grab a private
>copy of the PCI device list, sort it, and scan it.  You don't have to
>re-sort at every pci_insert_device, for hotplug machines.  The only
>potential downside is I need to check and see if the bootmem case needs
>to be handled, when making a private copy of the pci devices list for
>sorting.

How often is the list manipulated?  My guess is not 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.  For hot plug devices
you might want to insert them at the end to follow the "order probed"
motif.

--
Justin

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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-06  5:08 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 [this message]
2001-03-07 22:56             ` Jeff Garzik
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=200103072243.f27MhdO31896@aslan.scsiguy.com \
    --to=gibbs@scsiguy.com \
    --cc=jgarzik@mandrakesoft.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

all inboxes | Powered by JetHome®