Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1113057rwl; Thu, 5 Jan 2023 08:49:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXvWeARQXmGAGeo612026bPHCUPk8at4ZkneBe0vRB/yJitDMfg+6wGSss9arfrx23D5Yb5d X-Received: by 2002:a05:6a21:3942:b0:9d:efbe:2065 with SMTP id ac2-20020a056a21394200b0009defbe2065mr70721016pzc.27.1672937397883; Thu, 05 Jan 2023 08:49:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672937397; cv=none; d=google.com; s=arc-20160816; b=xoaJtbrNHWRKoBFIuklvOcwksKpg/hiIhbnWnn0mHe84PPP1xvvbFyOLgEcDP0JXXi UQ1WuBo4MJUrGwsnpaC4eH2w/pFPTxaFNQy56diQOXtwNH5ryfH7aM8unHZRtkXdggsp SOKv+9ix8glJh4yhoZtR00/JB8fjdACBkJ/34wdhv/6BRyUVsWJzoFNO2bswnyWwZ81S 7L8yDNm01NZrIssKJljnmLCiGVq5hkU9XASgKWTSLoKeKNCPYaBb58IIi94LeoZrw+tK 0HaKBe4lHqmlXkLwf/PjgSP7w5txvMeybbv+1PGMU7hft79ud9y5686mZLsMsNG2YCsk gc6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fU9YUXW6KI6yoGjU5XcUT1Qf0Z8M9t0l2FfZtrQqrkU=; b=KqhVUUagaZ+Fen22lQoqC4BNW+23/+xhOmskzlrzBfzRmXxXS34OcqaGoKflVOGGeu lc85weCx0m3p0DtLD34iL0yyAkRkzM8RICtqWGO9KvaJLm/CO0Eu/5ZmKUDO8YjRkr6W e4AO27xUiJbUA1eXOGopPNjmgJAY7YyiA2v62u+Brdzp8crsTnG+b4Js82/o3xc8v1FP VnwWUYw69aHi7oEXDPmSn9dAQ0F4vTpphv3/QD/j/04rwJhUFsMkvq/4YgFU1W+owEfX KrRx6VP0qzB/HR1w4PPHCeXgxs3Q3WUH8Yb6nFktc4ciGGavckHsZ8nFJc4FBv22W5pI ihug== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s65-20020a635e44000000b00476c3ac7347si39762933pgb.443.2023.01.05.08.49.50; Thu, 05 Jan 2023 08:49:57 -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; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234903AbjAEQTI (ORCPT + 55 others); Thu, 5 Jan 2023 11:19:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbjAEQTG (ORCPT ); Thu, 5 Jan 2023 11:19:06 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4B514E42F; Thu, 5 Jan 2023 08:19:05 -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-out1.suse.de (Postfix) with ESMTPS id 59D3F17846; Thu, 5 Jan 2023 16:18:56 +0000 (UTC) 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 271F213338; Thu, 5 Jan 2023 16:18:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bxuMCHD4tmM3QwAAMHmgww (envelope-from ); Thu, 05 Jan 2023 16:18:56 +0000 Date: Thu, 5 Jan 2023 17:18:54 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Jinke Han Cc: 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: <20230105161854.GA1259@blackbody.suse.cz> References: <20221226130505.7186-1-hanjinke.666@bytedance.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <20221226130505.7186-1-hanjinke.666@bytedance.com> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -2.20 X-Spamd-Result: default: False [-2.20 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; RCPT_COUNT_SEVEN(0.00)[9]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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). Alternatively, I imagine your problem could be reduced with corresponding memory limits on IO-constrained cgroups. (The memory limit would increase cgwb's dirty throttling and consequently leaves more IO bandwidth for sync IOs.) Could you describe how the submitted solution compares to memory limiting? > This patch splits bio queue into sync and async queues for blk-throtl > and gives a huge priority to sync write ios. The "huge priority" corresponds to the THROTL_SYNC_FACTOR, right? I'm slightly concerned about the introduction of the magical value. What is the reasoning behind this? (E.g. I'd expect 1:1 could work as well, while 1:4 suggests this is somehow better (empirically?).) Thanks, Michal --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCY7b4bAAKCRAkDQmsBEOq uQrgAQDs2aA08ChLFwdUU9xtUvTksAkbg4kIOJ6eonBHzYLMmQD9Eku/xsu7q+JO bkt+bgPn6r1by/lxIByZFdvliq70/g0= =VUBu -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--