From: "Alex,Shi" <alex.shi@intel.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: Jens Axboe <jaxboe@fusionio.com>,
"James.Bottomley@hansenpartnership.com"
<James.Bottomley@hansenpartnership.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Perfromance drop on SCSI hard disk
Date: Fri, 20 May 2011 13:17:43 +0800 [thread overview]
Message-ID: <1305868663.4866.8.camel@debian> (raw)
In-Reply-To: <BANLkTima6W5yAM_koArYaz57C3uzk=WwWQ@mail.gmail.com>
On Fri, 2011-05-20 at 08:40 +0800, Shaohua Li wrote:
> 2011/5/20 Alex,Shi <alex.shi@intel.com>:
> > On Fri, 2011-05-20 at 02:27 +0800, Jens Axboe wrote:
> >> On 2011-05-19 10:26, Alex,Shi wrote:
> >> >
> >> >> I will queue up the combined patch, it looks fine from here as well.
> >> >>
> >> >
> >> > When I have some time to study Jens and shaohua's patch today. I find a
> >> > simpler way to resolved the re-enter issue on starved_list. Following
> >> > Jens' idea, we can just put the starved_list device into kblockd if it
> >> > come from __scsi_queue_insert().
> >> > It can resolve the re-enter issue and recover performance totally, and
> >> > need not a work_struct in every scsi_device. The logic/code also looks a
> >> > bit simpler.
> >> > What's your opinion of this?
> >>
> >> Isn't this _identical_ to my original patch, with the added async run of
> >> the queue passed in (which is important, an oversight)?
> >
> > Not exactly same. It bases on your patch, but added a bypass way for
> > starved_list device. If a starved_list device come from
> > __scsi_queue_insert(), that may caused by our talking recursion, kblockd
> > with take over the process. Maybe you oversight this point in original
> > patch. :)
> >
> > The different part from yours is below:
> > ---
> > static void __scsi_run_queue(struct request_queue *q, bool async)
> > {
> > struct scsi_device *sdev = q->queuedata;
> > struct Scsi_Host *shost;
> > @@ -435,30 +437,35 @@ static void scsi_run_queue(struct request_queue
> > *q)
> > &shost->starved_list);
> > continue;
> > }
> > -
> > - spin_unlock(shost->host_lock);
> > - spin_lock(sdev->request_queue->queue_lock);
> > - __blk_run_queue(sdev->request_queue);
> > - spin_unlock(sdev->request_queue->queue_lock);
> > - spin_lock(shost->host_lock);
> > + if (async)
> > + blk_run_queue_async(sdev->request_queue);
> > + else {
> > + spin_unlock(shost->host_lock);
> > + spin_lock(sdev->request_queue->queue_lock);
> > + __blk_run_queue(sdev->request_queue);
> > + spin_unlock(sdev->request_queue->queue_lock);
> > + spin_lock(shost->host_lock);
> >>
> I don't quite like this approach. blk_run_queue_async() could
> introduce fairness issue as I said in previous mail, because we drop
> the sdev from starved list but didn't run its queue immediately. The
> issue exists before, but it's a bug to me.
I understand what's your worried. But not quite clear of the trigger
scenario. anyway, it is still a potential issue of fairness exist. So
forget my patch.
prev parent reply other threads:[~2011-05-20 5:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 6:40 Perfromance drop on SCSI hard disk Alex,Shi
2011-05-10 6:52 ` Shaohua Li
2011-05-12 0:36 ` Shaohua Li
2011-05-12 20:29 ` Jens Axboe
2011-05-13 0:11 ` Alex,Shi
2011-05-13 0:48 ` Shaohua Li
2011-05-13 3:01 ` Shaohua Li
2011-05-16 8:04 ` Shaohua Li
2011-05-16 8:37 ` Alex,Shi
2011-05-17 6:09 ` Alex,Shi
2011-05-17 7:20 ` Jens Axboe
2011-05-19 8:26 ` Alex,Shi
2011-05-19 8:47 ` Alex,Shi
2011-05-19 18:27 ` Jens Axboe
2011-05-20 0:22 ` Alex,Shi
2011-05-20 0:40 ` Shaohua Li
2011-05-20 5:17 ` Alex,Shi [this message]
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=1305868663.4866.8.camel@debian \
--to=alex.shi@intel.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.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