All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Jens Axboe <axboe@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	dougg@torque.net, linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC] yet more struct scsi_lun
Date: Fri, 28 Oct 2005 12:24:19 -0500	[thread overview]
Message-ID: <43625EC3.9060708@cs.wisc.edu> (raw)
In-Reply-To: <20051024075934.GK2811@suse.de>

Jens Axboe wrote:
> On Sun, Oct 23 2005, Jeff Garzik wrote:
> 
>>Douglas Gilbert wrote:
>>
>>>Which in turn makes me think of applying the same idea
>>>to max_sectors
>>>
>>>       shost->max_sectors = MAX_512B_SECTORS_UNLIMITED;
>>
>>
>>Won't work.  max_sectors is communicated to the block layer, where we 
>>limit the overall size of the request for practical reasons.
>>
>>Read the comment in libata-scsi's slave_configure:
>>
>>                /* TODO: 1024 is an arbitrary number, not the
>>                 * hardware maximum.  This should be increased to
>>                 * 65534 when Jens Axboe's patch for dynamically
>>                 * determining max_sectors is merged.
>>                 */
>>
>>Right now, setting the true hardware / command set maximum would use way 
>>too much memory, with no way to get feedback from the VM.
>>
>>This is why SCSI_DEFAULT_MAX_SECTORS is defined to 1024.
> 
> 
> The block layer has had split values for quite some time, ->max_sectors
> and max_hw_sectors. scsi_ioctl.c needs a patch to look at max_hw_sectors
> instead and SCSI drivers could then easily be updated to advertise a
> real hardware value as well. That is what shost->max_sectors should be,
> SCSI mid layer would then set q->max_sectors to SCSI_DEFAULT_MAX_SECTORS
> and q->max_hw_sectors to shost->max_sectors.
> 
> Then the limiting factor becomes BIO_MAX_PAGES for mapping in the user
> data, which caps us at 1MiB currently.
> 

I was just wondering if you give a little more detail in case someone 
wanted to implement this for you.

Would the bio functions like __bio_add_page() and bio_get_nr_vecs() 
continue to test against q->max_sectors. And then have the request 
merging code test against q->max_hw_sectors. scsi or blk would need some 
check that max_sectors was not larger than max_sectors, and for scsi we 
would have to increase SCSI_DEFAULT_MAX_SECTORS to 2048 to match the 
1MiB limit and not make q->max_sectors the limit factor. Or how would 
this work?


  reply	other threads:[~2005-10-28 19:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-23  4:33 [PATCH RFC] use struct scsi_lun in generic code Jeff Garzik
2005-10-23  4:49 ` [PATCH RFC] more struct scsi_lun Jeff Garzik
2005-10-23  9:47   ` Stefan Richter
2005-10-23 13:14     ` Stefan Richter
2005-10-23 16:49       ` Jeff Garzik
2005-10-24 16:27         ` Luben Tuikov
2005-10-24 20:03           ` Stefan Richter
2005-10-24 20:10             ` Luben Tuikov
2005-10-24 20:28             ` Mark Rustad
2005-10-24 22:27             ` Douglas Gilbert
2005-10-23  5:20 ` [PATCH RFC] use struct scsi_lun in generic code Jeff Garzik
2005-10-23  5:22 ` Douglas Gilbert
2005-10-23  7:01   ` Jeff Garzik
2005-10-24 14:55   ` Luben Tuikov
2005-10-23  7:00 ` [PATCH RFC] yet more struct scsi_lun Jeff Garzik
2005-10-23 10:48   ` Douglas Gilbert
2005-10-23 11:53     ` Arjan van de Ven
2005-10-23 14:27       ` max_sectors [was Re: [PATCH RFC] yet more struct scsi_lun] Douglas Gilbert
2005-10-23 14:42         ` Arjan van de Ven
2005-10-23 16:44       ` [PATCH RFC] yet more struct scsi_lun Jeff Garzik
2005-10-23 16:43     ` Jeff Garzik
2005-10-23 18:53       ` Kai Makisara
2005-10-24  7:59       ` Jens Axboe
2005-10-28 17:24         ` Mike Christie [this message]
2005-10-31 10:24           ` Jens Axboe
2005-11-04  2:23             ` Mike Christie
2005-11-04  2:25               ` Mike Christie
2005-11-04  7:37               ` Jens Axboe
2005-11-04 17:27                 ` Mike Christie
2005-10-23  7:16 ` [PATCH RFC] even " Jeff Garzik
2005-10-24 15:27 ` [PATCH RFC] use struct scsi_lun in generic code Patrick Mansfield
2005-10-24 22:40   ` Douglas Gilbert

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=43625EC3.9060708@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=axboe@suse.de \
    --cc=dougg@torque.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-scsi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.