All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Jens Axboe <axboe@suse.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/10] seperate max sectors and max hw sectors
Date: Tue, 08 Nov 2005 11:52:45 -0600	[thread overview]
Message-ID: <4370E5ED.60901@cs.wisc.edu> (raw)
In-Reply-To: <20051108174723.GK3699@suse.de>

Jens Axboe wrote:
> On Tue, Nov 08 2005, Mike Christie wrote:
> 
>>Seperate max_hw_sectors and max_sectors.
>>
>>LLDs call blk_queue_max_hw_sectors() to set max_hw_sectors.
>>blk_queue_max_sectors will also set max_sectors to a safe
>>default value.
>>
>>blk_init_queue still calls blk_queue_max_sectors so if there
>>are any LLDs that do not call blk_queue_max_hw_sectors() and
>>were expecting both the max_sectors and max_hw_sectors to be
>>255 they do not have to do anything.
>>
>>I was not able to test every driver I touched, but I think the
>>only place I may have messed up is MD so some testing is needed.
> 
> 
> ->max_sectors will become less of a driver property and more of a
> block/vm propery, so I think the best way to do this is just to have
> blk_queue_max_sectors() set ->max_hw_sectors directly and lower
> ->max_sectors appropriately if it is lower. That also comes with the
> bonus of not having to modify drivers.
> 

Ugggh. I did this in reverse to make the naming nicer. So I added a 
blk_queue_max_hw_sectors() which sets ->max_sectors to some Block layer 
default and ->max_hw_sectors to the hw limit (for SCSI this is the scsi 
host template ->max_sectors). Is this ok? It is more clear for driver 
writers that they are setting max_hw_sectors when calling 
blk_queue_max_hw_sectors(). I also converted all the 
blk_queue_max_sectors() to blk_queue_max_hw_sectors().


  reply	other threads:[~2005-11-08 17:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 10:06 [PATCH 2/10] seperate max sectors and max hw sectors Mike Christie
2005-11-08 17:47 ` Jens Axboe
2005-11-08 17:52   ` Mike Christie [this message]
2005-11-08 17:57     ` Jens Axboe
2005-11-08 18:17       ` Mike Christie
2005-11-08 18:33         ` Mike Christie
2005-11-08 17:47 ` Stefan Richter

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=4370E5ED.60901@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=axboe@suse.de \
    --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.