linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Michael Reed <mdr@sgi.com>
Cc: linux-raid@vger.kernel.org, Jeremy Higdon <jeremy@sgi.com>,
	Hannes Reinecke <hare@suse.de>
Subject: Re: md question re: max_hw_sectors_kb
Date: Fri, 6 May 2011 14:24:34 +1000	[thread overview]
Message-ID: <20110506142434.11afff3e@notabene.brown> (raw)
In-Reply-To: <4DC0639E.1070707@sgi.com>

On Tue, 03 May 2011 15:20:46 -0500 Michael Reed <mdr@sgi.com> wrote:

> Resending to linux-raid.
> 
> 
> Hi Neil,
> 
> My name is Mike Reed.  I work at SGI.  I've been looking at a performance
> issue with md writes and have tracked it down to the md device not having
> a high enough initial max_hw_sectors_kb setting.
> 
> There is code in blk_queue_make_request() which lowers the default value
> from INT_MAX to BLK_SAFE_MAX_SECTORS, which is 255.  This is generally
> lower than all the underlying devices with which I use md.
> 
> As md appears to be a stacking driver, i.e., it calls disk_stack_limits()
> for each member of a volume, it would seem reasonable for md to use the,
> INT_MAX setting for max_hw_sectors_kb instead of BLK_SAFE_MAX_SECTORS.
> 
> I have tried this, and have observed that md correctly limits the md device's
> max_sectors_kb to the value of the underlying devices in my mirror volume.
> 
> Is this the correct way to address this issue?
> 
> Applies to linux-2.6.39-rc4.
> 
> Signed-off-by: Michael Reed <mdr@sgi.com>
> 
> 
> --- drivers/md/md.c	2011-04-18 21:26:00.000000000 -0700
> +++ drivers/md/md.c.new	2011-04-21 15:53:11.452536201 -0700
> @@ -4328,6 +4328,7 @@ static int md_alloc(dev_t dev, char *nam
>  	mddev->queue->queuedata = mddev;
>  
>  	blk_queue_make_request(mddev->queue, md_make_request);
> +	blk_queue_max_sectors(mddev->queue, INT_MAX);
>  
>  	disk = alloc_disk(1 << shift);
>  	if (!disk) {
> 

Hi Mike,
 sorry for not responding to this earlier - it seemed to keep falling through
 cracks for some reason :-(

Yes, I completely agree with your analysis and think you patch is correct and
useful.
I will queue it up for the next merge window.

thanks,
NeilBrown

  parent reply	other threads:[~2011-05-06  4:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 20:20 md question re: max_hw_sectors_kb Michael Reed
2011-05-04 17:58 ` Martin K. Petersen
2011-05-04 18:08   ` Bernd Schubert
2011-05-09 23:52   ` NeilBrown
2011-05-12  3:51     ` Martin K. Petersen
2011-05-31  3:06       ` fibreraid
2011-05-06  4:24 ` NeilBrown [this message]
2011-05-06  4:40   ` NeilBrown
2011-05-09 16:02     ` Michael Reed

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=20110506142434.11afff3e@notabene.brown \
    --to=neilb@suse.de \
    --cc=hare@suse.de \
    --cc=jeremy@sgi.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=mdr@sgi.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;
as well as URLs for NNTP newsgroup(s).