lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 7 Mar 2011 09:35:12 -0500
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Shaohua Li <shaohua.li@...el.com>
Cc:	Jens Axboe <jaxboe@...ionio.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Jeff Moyer <jmoyer@...hat.com>,
	Corrado Zoccolo <czoccolo@...il.com>,
	Gui Jianfeng <guijianfeng@...fujitsu.com>
Subject: Re: [PATCH]cfq-iosched: give busy sync queue no dispatch limit

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ