Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1318507rwl; Thu, 5 Jan 2023 11:45:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXuNzydBv6hp4/i7yXMFHxDo3RrGdBALEoIuYNT4o4iWQW5HptqtY5TJs3cipkwIr+vfN1yv X-Received: by 2002:a17:907:c386:b0:82b:423b:b61c with SMTP id tm6-20020a170907c38600b0082b423bb61cmr45049275ejc.9.1672947933256; Thu, 05 Jan 2023 11:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672947933; cv=none; d=google.com; s=arc-20160816; b=RXaDiKYKktvN/gaZ0u6GRscc93nVMsOjSkUG+YL7xens828EP3RHzzO/W4UeoA0L3j 0pjJCi8NCWFtIHwt7IbLY0yk2PA9ZsHCIOVLPpt5nJN6Q800V9xpA0tHiBxr8tR/KiSF ko27q5QCU7K3Jw3CGfm1wsNcvi9eT2DgQXuKOov4ZmlyDrDpdHVie9bWsUT3SbViL98i 4G7/IYj7NoEL1GlVo1LhGJgg0KAyk1YoOSnry679plEjZlKo/Nr5apSHnXtklFE+ykNk ZbIYWEGIOHer7Zu9L7FveZZfNdzMuyDyfL6tPXFWnmVThTNRoO54Brw2NxMXjvKDbUOz l08Q== 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 :dkim-signature; bh=mg38u8VDBZl2kUeOIq51W5k4gswYU2BaFcdprzVD4ho=; b=hojpj8xfdulNtzbaJJerYVMtO3KyEMW9tmRCqP2G0iP0qo8Z1VC0vgv6nc4gKJpkfO 7P4zulyMJnzVDaW3xuQaQaDJmszVgbvZ7Q/QnRw5N1VGonq/4wxkz/C17dCVggvL9mkA q6ytTH46SFS4s7lTq99C63/qQTGLACHY0F+LfEqgVWWnKHWu/06vCgsCpOUPRAwVaiJq YUqQBkvpp7P7aTOkLMW3Jz2sPpYwv1doJQeqiEjHM4IRrSxl5wAjcrY/dwRe65k7/nbP hKASD21ZVvXRt+bzujyCqjACK47Q9OW58iSaIzC/UU7FDA9HWfjEZ1lVJaKHIwSocXNx jhAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Pl5Grl6t; 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=pass (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 v4-20020a1709063bc400b007c0a7286be2si26148867ejf.770.2023.01.05.11.45.19; Thu, 05 Jan 2023 11:45:33 -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.com header.s=susede1 header.b=Pl5Grl6t; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235568AbjAET33 (ORCPT + 57 others); Thu, 5 Jan 2023 14:29:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234650AbjAET24 (ORCPT ); Thu, 5 Jan 2023 14:28:56 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35A7F392F4; Thu, 5 Jan 2023 11:23:56 -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 CC3FB22A9F; Thu, 5 Jan 2023 19:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1672946568; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mg38u8VDBZl2kUeOIq51W5k4gswYU2BaFcdprzVD4ho=; b=Pl5Grl6tSEVdgCpRGyl9PaXajNlIjlsYnWLjdUuBJ9XyAdWiXq6MEejzoZsxIUDGG6j+fT lc67hk77bkVQlX0KMffLrClAfSEboithD4tgcYWrNKrRvGSfxo21bcE0CZXZWhS7vnheSM E7b9KRVkcC/0SIePI5VNChHJAIe2xCE= 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 97374138DF; Thu, 5 Jan 2023 19:22:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bo3iI4gjt2N2EwAAMHmgww (envelope-from ); Thu, 05 Jan 2023 19:22:48 +0000 Date: Thu, 5 Jan 2023 20:22:47 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Tejun Heo Cc: Jinke Han , 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: <20230105192247.GB16920@blackbody.suse.cz> References: <20221226130505.7186-1-hanjinke.666@bytedance.com> <20230105161854.GA1259@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eHhjakXzOLJAF9wJ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 --eHhjakXzOLJAF9wJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 05, 2023 at 07:35:59AM -1000, Tejun Heo wrote: > Hard limits tend to make this sort of problems a lot more pronounced because > the existing mechanisms tend to break down for the users which are severely > throttled down even while the device as a whole is fairly idle. cpu.max > often triggers severe priority inversions too, so it isn't too surprising > that people hit severe priority inversion issues w/ io.max. To be on the same page: 1) severe PI == priority inversion across cgroups (progated e.g. via global locks (as with cpu.max) or FS journal (as with io.max)), 2) ordinary PI == priority inversion contained within a single cgroup, i.e. no different from an under-provisioned system. The reported issue sounds like 2) but even with the separated queues 1) is still possible :-/ > Another problem with blk-throttle is that it doesn't prioritize shared IOs > identified by bio_issue_as_root_blkg() like iolatency and iocost do, so > there can be very severe priority inversions when e.g. journal commit gets > trapped in a low priority cgroup further exacerbating issues like this. Thanks for the broader view. So the separated queues are certainly an improvement but ultimately a mechanism based on bio_issue_as_root_blkg() predicate and deferred throttling would be better? Or is permanent limit enforcement more important? Thanks, Michal --eHhjakXzOLJAF9wJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCY7cjfQAKCRAkDQmsBEOq uXQsAP99LZP7f/n8ygASlLevHgj9Zm/D5kI8jlxOD2LanjzNzQD+JY4fvNFnGQmI edy1iZb/lxGcHMME7EZPqkuZJbXbcw4= =w2/G -----END PGP SIGNATURE----- --eHhjakXzOLJAF9wJ--