public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [DO NOT APPLY] sd take advantage of rotation speed
Date: Sun, 22 Jun 2008 12:26:52 -0500	[thread overview]
Message-ID: <1214155613.4047.15.camel@localhost.localdomain> (raw)
In-Reply-To: <20080622140323.GZ4392@parisc-linux.org>

On Sun, 2008-06-22 at 08:03 -0600, Matthew Wilcox wrote:
> On Sun, Jun 22, 2008 at 08:38:51AM -0500, James Bottomley wrote:
> > > I think there's an opportunity to improve sd_vpd_inquiry() to remove
> > > some of the duplicate code between sd_set_elevator() and sd_block_limits,
> > > but it's not terribly important.
> > 
> > and actually ses.c as well.
> 
> Ah yes.  I'll rip it out of ses.c.  Thanks.
> 
> A question of policy ... should we interrogate page 0 to find out if
> page 0x83 exists?  You don't currently, but ses.c is limited to devices
> with an enclosure ... which is presumably only newer devices.  Do we
> have any idea if devices blow up on being asked for random VPD that they
> might not have?

It's wise to.  For true SCSI devices (going all the way back to my 8"
HVD FAST-10 ones of ca 1989) the answer is that they respond correctly
(as in ILLEGAL REQUEST).  For the ATA devices through SAT, the answer's
also that.  Unfortunately, for devices which have their own eccentric
SCSI interpreters (glares at USB) the answer is that they can do
horrible things: we had a bug filed only this year where a VPD inquiry
was crashing a USB device.  This is another reason for punting this to
userspace.  The heuristics of what works are already embedded into udev.

I think the solution is eventually just to push all VPD stuff to
userspace (including ses), but that's long term.

> > > The switching of the elevators isn't particularly nice.  I assume that
> > > elevator_init("noop") cannot fail, which isn't true.  It would be nice
> > > to use the #if 0 block instead, but that causes a null ptr dereference
> > > inside sysfs -- I suspect something isn't set up correctly.
> > 
> > I'm really not very keen on this patch, since it's implementing elevator
> > policy from sd which is a bit of a layering violation (and a policy
> > should be in userspace one).
> 
> It's only choosing a default, not implementing policy.
> 
> > What's wrong with doing this entirely from udev (it already issues the
> > vpd's today, that's how it gets the id from page 0x83 ... it could
> > easily look at 0xb1 and set the elevator
> > using /sys/block/<>/queue/scheduler)?.
> 
> I'll take a look at udev on Monday.  It certainly seems less
> controversial than this patch.

Thanks!

James



  parent reply	other threads:[~2008-06-22 17:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19 16:03 [DO NOT APPLY] sd take advantage of rotation speed Matthew Wilcox
2008-06-19 17:12 ` Mike Anderson
2008-06-19 18:10   ` Matthew Wilcox
2008-06-22 12:16 ` Boaz Harrosh
2008-06-22 13:19   ` Matthew Wilcox
2008-06-22 13:27     ` Boaz Harrosh
2008-06-22 13:38 ` James Bottomley
2008-06-22 14:03   ` Matthew Wilcox
2008-06-22 14:41     ` Martin K. Petersen
2008-06-22 18:44       ` Matthew Wilcox
2008-06-25  2:06         ` Martin K. Petersen
2008-06-22 17:26     ` James Bottomley [this message]
2008-06-25 13:47 ` Jens Axboe
2008-06-25 13:57   ` Jens Axboe
2008-06-25 14:24   ` Ric Wheeler
2008-06-25 16:25     ` Boaz Harrosh
2008-06-25 16:57       ` Jens Axboe
2008-06-25 17:20         ` Matthew Wilcox
2008-06-25 17:26           ` Jens Axboe
2008-06-25 17:34             ` Matthew Wilcox
2008-06-25 17:43               ` James Bottomley
2008-06-25 17:53                 ` Matthew Wilcox
2008-06-25 18:01                   ` Jens Axboe
2008-06-25 18:06                   ` James Bottomley
2008-06-25 17:59               ` Jens Axboe
2008-06-25 18:06             ` Martin K. Petersen
2008-06-25 18:12               ` Jens Axboe
2008-07-28 13:36               ` Ric Wheeler
2008-07-28 14:10                 ` James Bottomley
2008-07-28 14:31                 ` Martin K. Petersen
2008-07-31 21:00                   ` Grant Grundler
2008-07-31 21:19                     ` Andrew Patterson
2008-07-31 22:26                     ` Ric Wheeler
2008-07-31 23:44                       ` Grant Grundler

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=1214155613.4047.15.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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