public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: Oliver Neukum <oliver@neukum.name>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
	andersen@codepoet.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] SCSI hotplug support
Date: Tue, 15 Oct 2002 10:35:33 -0400	[thread overview]
Message-ID: <20021015143533.GA4288@redhat.com> (raw)
In-Reply-To: <200210150953.29905.oliver@neukum.name>

On Tue, Oct 15, 2002 at 09:53:29AM +0200, Oliver Neukum wrote:
> 
> > > It's harder than doing it the simple way. User space really can do
> > > nothing but do the call.
> >
> > Not true, see my last email.  User space can do a *lot* more than just
> > make the call to add the device, and as a matter of fact it already does.
> 
> But surely it can do more if it can be called with knowledge of a device node,
> can't it? Nobody argues against doing a hotplug call. But divorcing
> recognisition on the bus and attaching a driver to it seems to be bad
> to me. After all there's nothing you can do with a SCSI device without device
> node.
> Plus you keep a difference between the coldplugging and the hotplugging case,
> which is not nice.

You guys aren't thinking.  Come on, what's the realistic difference in the 
hot plug user space manager in the two cases:

Case 1, scsi does the attach, hot plug does the rest:

hot_plug_attach_notifier(dev_t device)
{
  do stuff..
}

Case 2, scsi doesn't do the attach:
hot_plug_attach_notifier(int host, int bus, int target, int lun)
{
  fprintf(/proc/scsi/scsi, "scsi add-single-device %d %d %d %d", host, 
bus, target, lun);
  if(device_added_successfully) {
    do stuff..
  }
}


Now, please, someone tell me why everyone is whining about user space 
doing so little to accomplish what the much larger patch that was 
posted does in kernel space?  My point is, and was, that since we need the 
user space manager *anyway* to handle things the kernel will *never* 
handle, there is no real reason to split up the code segments into a 
kernel space portion and a user space portion.  In fact, it simply makes 
things more complex because if something breaks and you have both a kernel 
part and a user space part, you have to track down which one screwed the 
pooch.  This way at least it's all in one spot.

Besides, I've not heard anyone address my concerns about what context the
disc attach is done in with the kernel space patch.

> > > Plus, you can use such a kernel API to really free the device's
> > > memory, because you cannot know when user space, or indeed if, has
> > > freed the device.
> >
> > Not true at all.  Define a revoke/slave_detach entry point to your driver
> > and you get called when the device is removed so that you can free up any
> > of your resources.
> 
> I see.
> 
> 	Regards
> 		Oliver

-- 
  Doug Ledford <dledford@redhat.com>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  

  reply	other threads:[~2002-10-15 14:35 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-14  5:40 [PATCH] SCSI hotplug support Erik Andersen
2002-10-14  7:06 ` Matthew Dharm
2002-10-14  7:12   ` Erik Andersen
2002-10-14 15:47     ` Kurt Garloff
2002-10-14 16:19       ` Mike Anderson
2002-10-14 20:41         ` Erik Andersen
2002-10-14 22:10           ` Mike Anderson
2002-10-14 20:46       ` Erik Andersen
2002-10-14 15:57 ` James Bottomley
2002-10-14 17:22   ` Mike Anderson
2002-10-14 17:30   ` Matthew Dharm
2002-10-14 17:39     ` James Bottomley
2002-10-14 19:11       ` Oliver Xymoron
2002-10-15  0:42       ` Kurt Garloff
2002-10-14 20:37   ` Erik Andersen
2002-10-14 21:07     ` James Bottomley
2002-10-14 21:54       ` Erik Andersen
2002-10-14 22:25         ` Doug Ledford
2002-10-15  5:25           ` Erik Andersen
2002-10-15 15:33             ` Doug Ledford
2002-10-15 18:18               ` Erik Andersen
2002-10-15 18:22             ` Doug Ledford
2002-10-15 18:45               ` Erik Andersen
2002-10-15 19:13                 ` Doug Ledford
2002-10-15 19:32                   ` Erik Andersen
2002-10-15 19:45                     ` James Bottomley
2002-10-15 19:50                     ` Scott Merritt
2002-10-15 19:55                     ` Doug Ledford
2002-10-15 22:07                       ` Erik Andersen
2002-10-16  2:40                         ` Doug Ledford
2002-10-18 11:28                           ` Erik Andersen
2002-10-15 21:43                 ` Oliver Neukum
2002-10-15 22:07                   ` Erik Andersen
2002-10-14 22:19       ` Oliver Neukum
2002-10-15  0:22         ` Doug Ledford
2002-10-15  7:53           ` Oliver Neukum
2002-10-15 14:35             ` Doug Ledford [this message]
2002-10-15 15:19               ` Oliver Neukum
2002-10-15 15:40                 ` James Bottomley
2002-10-15 17:47               ` Erik Andersen
2002-10-15 18:34                 ` Doug Ledford
2002-10-15 18:22               ` Scott Merritt

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=20021015143533.GA4288@redhat.com \
    --to=dledford@redhat.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=andersen@codepoet.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=oliver@neukum.name \
    /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