Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2549207rwl; Fri, 6 Jan 2023 07:55:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXtgDtNvwMC0xZYFvA+1QukBhdxdckzmsO2rbr/piiJmAWeoW1ev4zpv9HqEPFsZ9ccxMMw5 X-Received: by 2002:a17:907:d302:b0:7c1:3472:5e75 with SMTP id vg2-20020a170907d30200b007c134725e75mr50759757ejc.29.1673020507324; Fri, 06 Jan 2023 07:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673020507; cv=none; d=google.com; s=arc-20160816; b=yRNldZ8IhLpCPKJ2FT04964sfBPnVbTK0ySIH3Nkgda7uzNjK5ZlZb9MucDTr1BL8P F0c+IwbWh5Mep3KcSRG8NTZde1958V3FI8fzpw/eEWl+GYM1SEb6PF1SsOW4bveQidO0 usWCUA4MdZPMKfQtPPbcDzzXvfK5D86qa7YVup/2bhDYef69Kk+acUSwOlkCCJpdkgD8 45sqFb6BOPtnVNEpefmHlRw9paKzqz6fhiSG6eZrZhqJ67DU7BUxYaBcW10f252wTLDH 8u26wlHEuj+MdjvHcjYboefz9wMAXaIzFSDh6LrWxXNc6JEgZKoZoJAsXw2VQyEAwe8g DnAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=D7BVs+c1jJrTgfTP4y3v5/V0eGmeqdXDwPfl0iJaAd4=; b=sDFr2Q82qdan9Xtdt+OGo6HUfZWlGyiaIVCE6NXSLLr0VOB7u35em87ywB0hzK51t/ hdNBGTWhcrBZLEen1LH0qf0FT6BTwB82IpmKdO31SKOZxoCGWGpSPz6eJoQe/ho6f+wn pOcaq6LsLiAiYewdKuVLVMYkL+unFeQ9+rn1K6S+dQKS0cHF79aiNMFgX9N/Iw4XQv1H f+G0QbweLVhTDJmanYpAOHft43e/S6naZxk4VI90mjgxEWYh7QPKgFNxPNzaYR6ohMEv TvthK3teDsymNKiIRzoNqzszwA3Vhc80w/VqcLFLdMuEcIVCTCTF7NyGjOeFGCyIdEhN kkUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3E3Lgs2a; dkim=neutral (no key) header.i=@suse.cz header.b=1q0HHYB9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go12-20020a1709070d8c00b007c4fda74f69si1861223ejc.241.2023.01.06.07.54.54; Fri, 06 Jan 2023 07:55:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3E3Lgs2a; dkim=neutral (no key) header.i=@suse.cz header.b=1q0HHYB9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235518AbjAFPiT (ORCPT + 54 others); Fri, 6 Jan 2023 10:38:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231374AbjAFPiR (ORCPT ); Fri, 6 Jan 2023 10:38:17 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2435745A5; Fri, 6 Jan 2023 07:38:16 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 98D934023F; Fri, 6 Jan 2023 15:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1673019494; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D7BVs+c1jJrTgfTP4y3v5/V0eGmeqdXDwPfl0iJaAd4=; b=3E3Lgs2aAGpDdYW5+AKcNWdB5l9w4zvWCacqafvED4WVf1Z7fBzgAfn2miDNOdc50rpRcF /gPnEqvTuPLTE8Kk9wNQfTkQquPSENw6dOkP6baW5IQ0Juhba85jdQ8Erk0oTWmTJT8+Cw TZV1dEMWE0AzpAAHzknBF1M3LaDLsbI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1673019494; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D7BVs+c1jJrTgfTP4y3v5/V0eGmeqdXDwPfl0iJaAd4=; b=1q0HHYB9DZXlBTx+ZpLaeAQje6jIDfq0gkybOD0Eto4yfx1n9s7rlKVsVBxz+DfiCkAVpl X4mbSYxsz7b2OeDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 87F5E13596; Fri, 6 Jan 2023 15:38:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FK4pIWZAuGPrHAAAMHmgww (envelope-from ); Fri, 06 Jan 2023 15:38:14 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 9F946A0742; Fri, 6 Jan 2023 16:38:13 +0100 (CET) Date: Fri, 6 Jan 2023 16:38:13 +0100 From: Jan Kara To: Michal =?utf-8?Q?Koutn=C3=BD?= Cc: Jinke Han , tj@kernel.org, josef@toxicpanda.com, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yinxin.x@bytedance.com, jack@suse.cz Subject: Re: [PATCH v3] blk-throtl: Introduce sync and async queues for blk-throtl Message-ID: <20230106153813.4ttyuikzaagkk2sc@quack3> References: <20221226130505.7186-1-hanjinke.666@bytedance.com> <20230105161854.GA1259@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230105161854.GA1259@blackbody.suse.cz> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 05-01-23 17:18:54, Michal Koutn? wrote: > Hello Jinke. > > On Mon, Dec 26, 2022 at 09:05:05PM +0800, Jinke Han wrote: > > In our test, fio writes a 100g file in sequential 4k blocksize in > > a container with low bps limit configured (wbps=10M). > > [...] > > At the same time, the operation of saving a small file by vim will be > > blocked amolst 140s. > > Could you please elaborate why is this specific to blk-throtl? > > I guess similar problem would arise for devices that are "naturally" > slow. > Then: > a) it must have been solved elsewhere in the block layer (but it's > broken), > b) it should be solved generically in the block layer (thus this is only > a partial solution). Generally, problems are this are taken care of by IO schedulers. E.g. BFQ has quite a lot of logic exactly to reduce problems like this. Sync and async queues are one part of this logic inside BFQ (but there's more). But given current architecture of the block layer IO schedulers are below throttling frameworks such as blk-throtl so they have no chance of influencing problems like this. So we are bound to reinvent the scheduling logic IO schedulers are already doing. That being said I don't have a good solution for this or architecture suggestion. Because implementing various throttling frameworks within IO schedulers is cumbersome (complex interactions) and generally the perfomance is too slow for some usecases. We've been there (that's why there's cgroup support in BFQ) and really the current architecture is much easier to reason about. Honza -- Jan Kara SUSE Labs, CR