Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2439842lqt; Mon, 22 Apr 2024 10:39:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxYBxBayaiQJSM9/SpPWtEoqrhMGPjD+VkVM1BiJgSSr1Zx2KhYB8VI1XKi/SRg0URrZ4DbFPo0dXBzCDNAaXRixu0Pwkud7aON4k4wg== X-Google-Smtp-Source: AGHT+IEEI3jZZrVKJNJ8sri+k5KPPts2kwn3sqZdvtyMhgz7z3UdBp8RhFJt4eXb214HBaP4Y/yw X-Received: by 2002:a17:906:340c:b0:a52:4fc1:ea90 with SMTP id c12-20020a170906340c00b00a524fc1ea90mr6658498ejb.62.1713807594217; Mon, 22 Apr 2024 10:39:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713807594; cv=pass; d=google.com; s=arc-20160816; b=dunY7JF6RXGlLyFj1xB87u5xxZFV78bkIbdg/Zhfd3D0SlNGrQ/sYO1SAcZgVAO9Dp YhYv6XwvVFDEhtBCj1f7SB6g1wnEAMhTfWHu2XptvtHkDgh+dd5cmCMSZzHYSsZT3mLc +fYq/M8HYaluN6bAf8qhFknyjpOBS8UJuc5MZqbO3KEOHTyDTKUtv9JshRK68LJstfxw mOsTxygKnIQyRUywyCkk1y8DmmeQwml90bOkBUDpp6qhnszSjZM5mkaEXPlJq6aBKakk KiIxeYD3R3XstQF2dOwTX/shm16wB8vFvcNoUThTPkAyfGOtRGVGjkUPsnWhvpwpolkj +Arg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=kxuAZhKShuQ4A9YR+YcBtY1x9WESatpl4z3NLeFgqH4=; fh=3lkvIa/UlpQ924t+5T5btl9Cm+jHo9BeJdyQqp3vIjU=; b=03ss7ipnChu/R4SdzBSS2vnn9WtCT6BKyc+bmOgfpDBJpZ1wReFgjZbVHY+3p7oUAa Wr+KbzQsS1FXlPwyYOzYUx4DSZpDsnL7vkjb87MOVQW+kEShOuSJwbLJmXvnAgRdA6wZ 1IsFwAuFIIh6fXQbzf398id3FOnFyYrcKX3fBjoIIy29rtEWS2G+ilCnSywhYElQsGym sP77zmJyrvIWhw6G/f4OoGJlAL3d9JeuCnhMlT2l28ca3pvROXqUL67+rKL//O5sewmh 9UCcEuQnD8onsHzk2gRplNa5WmT6HHNEf0GnMHBSYIOJFp8vHubRpHVws8EhPoxZ5Wrs uwlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XHi8xcaa; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hj2-20020a170906874200b00a51d0f999cdsi5828377ejb.1003.2024.04.22.10.39.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:39:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XHi8xcaa; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EB8461F223FB for ; Mon, 22 Apr 2024 17:39:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD08F153BFB; Mon, 22 Apr 2024 17:39:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XHi8xcaa" Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B418A146A6A; Mon, 22 Apr 2024 17:39:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713807582; cv=none; b=bjEjr2OtdheX3M143wXbr9yeF3bVP6RBzRmQuxPZ/FfxcQJ/R1xlBBB5gYTSgSOolaBDAiFyUJSUK2O0n1yiFo9oS1qHCdVcS1ZawU3hZyZ5Xmu7MbI7tr6w9Vl0gZ9ogeAWY1vV8ZuzBmbkVEiXb87SEgmzR5pEoUO4jkhyMtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713807582; c=relaxed/simple; bh=pbO9enzFWQcbWpVyNcMF39gz0D5Bx4UfTAmhBYARJKU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SVEGdeKzGwF6E1K+n06c4PfOYtiQV6hVGHWphD6BdOEpSCX6tIHSjWy5Cdr1Ff8JXRhZz5PpIQF7448+bMMVe8keJd5X55f26wMt74IYcuWaHyIw6ywuHAIbj7Ux1nj6ZWYM1vq90HSxZOfEl8XDeipJwybrHuWQbei5gi2JDBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XHi8xcaa; arc=none smtp.client-ip=209.85.210.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6effe9c852eso3905841b3a.3; Mon, 22 Apr 2024 10:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713807580; x=1714412380; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=kxuAZhKShuQ4A9YR+YcBtY1x9WESatpl4z3NLeFgqH4=; b=XHi8xcaazFbK28Qx0DNcZCiMjfhI536Zd1aCMaC7d59E7o8UMey087s/1lLDSF5PVu ROTNEG3KW/m8lJQTZyDz9zdzvfsDqorDvMJOPuwSiS9zifRxxn5JYTQunv5SvYii6nzA P2Kt1tXxOxNJMYHor3QDKMj5vMc5KVQiWugcbn+Ca4xyLvep9rwpD/w4IFxf7PDEyt1X a4LJudRvCDlqL7mlOipyz29P/M5Il5p7EYs24lrAOFFp+kK/RUKnIeAMHTEiO2rzu6tn CNKiSn1iFchkkjn/hPeUTksiUmpn+1WDuQPPiCE7KzY1sIm/Z/6sWHsolBiD6x7nSHVs p/Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713807580; x=1714412380; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kxuAZhKShuQ4A9YR+YcBtY1x9WESatpl4z3NLeFgqH4=; b=pP9myBQab2TFLH0gZquJGBlmn8itbaDxxZsZ+0aM/zjMXze1T9moeH+iabUKaMXpaH 1IStTj1dC55+ExZhOVrnlcvdNhDqw+z9nmVaF5v/saBetktMWjB3t6lkpppNxoXaBq4e 7Fem13K36loFCUOwU1whlyyBJzMbBpU5XAtgKkcMnq8kSDxVi9iNvArr0NOUdSXiph+j vfGUCLM1EnudYf28x/8P0q/VvNeMA62lZj4NVIo4eUKs63atze1gzG0lx1dCWIznXpJY +lUu+gcBHdYMzZstP73pLX6ygjeUDGMnYiXqAi30+jOpE0APYDCOHsJUbsWWUL2Sy0nW 4aFw== X-Forwarded-Encrypted: i=1; AJvYcCVSCsPnzx8w8ZDBqHC1m8qRHaFOYOagvnNRI/bd31gMX8e4JLuTXGBzTBRHVCyyPRX6wnPQJGMemNr/6N0vFm4zsvI0RRP4Ru+LzU0U4QLsjMuKoiLPl59bzaeVUjZXA1W/SeKVCSqn+1g2EDB8rn47S7KuVoffRm3u2ikdUE3J1Ysk X-Gm-Message-State: AOJu0Yx2ymI4toKFa0lGQ48MdS4BCgg8XcCxvti4haor54tOxcnq51F+ P/tozlIS4QlKJAxiFYaWoUxQyM1iDh+c4HjrOKtszWuZdTBVCLeB X-Received: by 2002:a05:6a00:4b50:b0:6e8:f57d:f1ec with SMTP id kr16-20020a056a004b5000b006e8f57df1ecmr14462049pfb.17.1713807579805; Mon, 22 Apr 2024 10:39:39 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:6f51]) by smtp.gmail.com with ESMTPSA id t8-20020a056a0021c800b006ecffb316ccsm8053439pfj.202.2024.04.22.10.39.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:39:39 -0700 (PDT) Sender: Tejun Heo Date: Mon, 22 Apr 2024 07:39:37 -1000 From: "tj@kernel.org" To: Yu Kuai Cc: =?utf-8?B?5ZGo5rOw5a6H?= , "josef@toxicpanda.com" , "axboe@kernel.dk" , "cgroups@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "yukuai (C)" Subject: Re: [PATCH] blk-throttle: fix repeat limit on bio with BIO_BPS_THROTTLED Message-ID: References: <20240419120747.38031-1-zhoutaiyu@kuaishou.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hello, Yu Kuai. On Mon, Apr 22, 2024 at 11:47:41AM +0800, Yu Kuai wrote: > Hi! > > 在 2024/04/22 11:33, 周泰宇 写道: > > What I want to do here was to set an easy to reach value to BPS_LIMIT (10M/s in this example) and an unable to reach value to IOPS_LIMIT (100000 in this example). > > > > > > Under this setting, the iostat shows that the bps is far less than 10M/s and sometimes is far larger than 10M/s. > > Yes, I know this behaviour, and this is because blk-throttle works > before IO split, and io stats is accounting bps for rq-based disk after > IO split, if you using Q2C for bps you'll see that bps is stable as > limit. > > Hi, Tejun! > > Do you think this *phenomenon* need to be fixed? If so, I don't see a > easy way other than throttle bio after *IO split*. Perhaps ohter than > bio merge case, this can be another motivation to move blk-throttle to > rq_qos_throttle(). Yeah, blk-throtl is sitting too early in the pipeline to easily track how the bios actually get issued. However, given that it's been available for bio-based drivers for a really long time, I don't think it'd be a good idea to move it, so iops limit is always going to be a bit unreliable w.r.t. what actually get issued to the device. So, IMHO, if the oddity is just about how IOs are counted, I don't think it's a critical problem on its own. Thanks. -- tejun