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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVP8zSFnAa7RW=L_G3PUr=HV=L6+L+w1oDiUWEjMddmxSA@mail.gmail.com>
Date:	Wed, 6 May 2015 11:14:10 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Jens Axboe <axboe@...nel.dk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Justin M. Forbes" <jforbes@...oraproject.org>,
	Jeff Moyer <jmoyer@...hat.com>,
	Christoph Hellwig <hch@...radead.org>,
	"v4.0" <stable@...r.kernel.org>
Subject: Re: [PATCH 2/2] block: loop: avoiding too many pending per work I/O

On Wed, May 6, 2015 at 12:55 AM, Tejun Heo <tj@...nel.org> wrote:
> Hello, Ming.
>
> On Tue, May 05, 2015 at 10:46:10PM +0800, Ming Lei wrote:
>> On Tue, May 5, 2015 at 9:59 PM, Tejun Heo <tj@...nel.org> wrote:
>> > It's a bit weird to hard code this to 16 as this effectively becomes a
>> > hidden bottleneck for concurrency.  For cases where 16 isn't a good
>> > value, hunting down what's going on can be painful as it's not visible
>> > anywhere.  I still think the right knob to control concurrency is
>> > nr_requests for the loop device.  You said that for linear IOs, it's
>> > better to have higher nr_requests than concurrency but can you
>> > elaborate why?
>>
>> I mean, in case of sequential IO, the IO may hit page cache a bit easier,
>> so handling the IO may be quite quick, then it is often more efficient to
>> handle them in one same context(such as, handle one by one from IO
>> queue) than from different contexts(scheduled from different worker
>> threads). And that can be made by setting a bigger nr_requests(queue_depth).
>
> Ah, so, it's about the queueing latency.  Blocking the issuer from
> get_request side for the same level of concurrency would incur a lot
> longer latency before the next IO can be dispatched.  The arbitrary 16
> is still bothering but for now it's fine I guess, but we need to
> revisit the whole thing including WQ_HIGHPRI thing.  Maybe it made
> sense when we had only one thread servicing all IOs but w/ high
> concurrency I don't think it's a good idea.

Yes, I was thinking about it too, but concurrency can improve
random I/O throughput a lot in my tests.

Also I have patches to use aio/dio for loop, then one thread is enough,
and both double cache and high context switch can be avoided.

I will post them later for review.

>
> Please feel free to add
>
>  Acked-by: Tejun Heo <tj@...nel.org>

Thanks for your review and ack!

thanks,
Ming Lei
--
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