From: Vivek Goyal <vgoyal@redhat.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: Jens Axboe <jaxboe@fusionio.com>,
lkml <linux-kernel@vger.kernel.org>,
Jeff Moyer <jmoyer@redhat.com>,
Corrado Zoccolo <czoccolo@gmail.com>,
Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Subject: Re: [PATCH]cfq-iosched: give busy sync queue no dispatch limit
Date: Mon, 7 Mar 2011 09:35:12 -0500 [thread overview]
Message-ID: <20110307143512.GB9540@redhat.com> (raw)
In-Reply-To: <1299461017.2337.13.camel@sli10-conroe>
On Mon, Mar 07, 2011 at 09:23:37AM +0800, Shaohua Li wrote:
> On Sat, 2011-03-05 at 00:40 +0800, Vivek Goyal wrote:
> > On Fri, Mar 04, 2011 at 04:01:29PM +0800, Shaohua Li wrote:
> >
> > [..]
> > > @@ -2412,15 +2418,31 @@ static bool cfq_may_dispatch(struct cfq_
> > > return false;
> > >
> > > /*
> > > + * If there is only one sync queue, and its think time is
> > > + * small, we can ignore async queue here and give the sync
> > > + * queue no dispatch limit. The reason is a sync queue can
> > > + * preempt async queue, limiting the sync queue doesn't make
> > > + * sense. This is useful for aiostress test.
> > > + */
> > > + if (cfq_cfqq_sync(cfqq) && cfqd->busy_sync_queues == 1) {
> > > + struct cfq_io_context *cic = RQ_CIC(cfqq->next_rq);
> > > +
> > > + if (sample_valid(cic->ttime_samples) &&
> > > + cic->ttime_mean < cfqd->cfq_slice_idle)
> > > + promote_sync = true;
> > > + }
> >
> > What's the relation of think time here? Or why should we check for think
> > time being small. To me it does not make a difference in this case.
> >
> > We have a request in existing queue and we figure out that this is the
> > only sync queue in the system to we let it dispatch more than quantum.
> > Thinktime should not even matter.
> The reason in my mind is if think time is small, sync queue will keep
> preempting async queue, so limit is meaningless. if think time is big,
> there is less preempt. I'm afraid to go too far way in the less preempt
> case and starve async too much.
So only case left out is that a cfqq is driving deep queue depths but
think time is high?
sync queue has already preempted async and not we will be idling on it
and not allow async to dispatch.
If think time is high, anyway you will automatically reduce the preemption
of async queue.
IMHO, it does not make much sense to also check for think time and make
it complicated. We should get rid of it.
Thanks
Vivek
next prev parent reply other threads:[~2011-03-07 14:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 8:01 [PATCH]cfq-iosched: give busy sync queue no dispatch limit Shaohua Li
2011-03-04 9:14 ` Gui Jianfeng
2011-03-04 16:40 ` Vivek Goyal
2011-03-07 1:23 ` Shaohua Li
2011-03-07 14:35 ` Vivek Goyal [this message]
2011-03-07 8:26 ` Jens Axboe
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=20110307143512.GB9540@redhat.com \
--to=vgoyal@redhat.com \
--cc=czoccolo@gmail.com \
--cc=guijianfeng@cn.fujitsu.com \
--cc=jaxboe@fusionio.com \
--cc=jmoyer@redhat.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