Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751336AbbEEQz4 (ORCPT ); Tue, 5 May 2015 12:55:56 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:35393 "EHLO mail-qk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753441AbbEEQzo (ORCPT ); Tue, 5 May 2015 12:55:44 -0400 Date: Tue, 5 May 2015 12:55:41 -0400 From: Tejun Heo To: Ming Lei Cc: Jens Axboe , Linux Kernel Mailing List , "Justin M. Forbes" , Jeff Moyer , Christoph Hellwig , "v4.0" Subject: Re: [PATCH 2/2] block: loop: avoiding too many pending per work I/O Message-ID: <20150505165541.GV1971@htj.duckdns.org> References: <1430826595-5888-1-git-send-email-ming.lei@canonical.com> <1430826595-5888-3-git-send-email-ming.lei@canonical.com> <20150505135958.GO1971@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1739 Lines: 39 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 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. Please feel free to add Acked-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/