Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8379708rwr; Wed, 10 May 2023 23:52:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5eRFMWmhwGzJJI01XvEQ8UR4F01Y2C84QGXjwQfo+HwqicI+z2WA7NPF2vpoB/sieFWP8R X-Received: by 2002:a05:6a00:1502:b0:647:157b:cb61 with SMTP id q2-20020a056a00150200b00647157bcb61mr10810298pfu.7.1683787959761; Wed, 10 May 2023 23:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683787959; cv=none; d=google.com; s=arc-20160816; b=Z5/u/fivIjf9HfMBthJVoVf+4Xk5pnwZNKEwQvVZN/0Oln3nUFT2FxgmtFs3kxdiLU nF/657eJ0LDWri866L++MmN4pn3cWO/t+0PAmu9BaGk1KWrvZf0rg/M1kjEuper6uavA P/vPLQrzMBGDjPm9TNy4h8xljr1Cbugk8y4Xb/QY3tfRrvmB67Ev2SGtzmkG5oKApEbh PKbaxzQ9vSUaRAWDUffn2pts00aBwoFW8/kbSUJvorXk4j3sbs1pNdrd/vdym2xQMbw7 rczsKASaTsGHs1IFS2g4C4qjMgeB9YJOlR6aXm8/+a6hlL8XoRaFAAN9saSkfu60T6AB MAlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=wYtaRcshlY3QmxEEqVJsJU+0bmCyXLBCJqkTVjmG1hA=; b=vOiKO9S5QtyooB6DHrH7VGYs4ONR+H2WVspv/IikzNwfbixJxJo2AJTK1jB0OGamBx WND5vcplPMvJ8cjqWCIN4tyFxQjA9alzCqcjlNNpvdpbVAzPLlbLlc/HnZj2C+nRYOSj C4VQePJtZKH+DGJNZ41O5UYbBa0bALcgEWFF1R30Iypg2uQLmLlPeQUI0Hy+IxzPL6s6 OkGwpfaswNcHpGnx1NOLfaTEh4YrmfLUpH0sJns5w0YYZKTno/HsQscmosYlMJq6rC8k FAWkA5VCzwPWcs5JYZN49rXCLk2gWxYUksDtOvU7Sg3A5mlAtwvFSv0EN1XCcxju9vWE CTpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=d0SnZ+pj; 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=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k76-20020a62844f000000b006472bc78e0fsi5874826pfd.22.2023.05.10.23.52.26; Wed, 10 May 2023 23:52:39 -0700 (PDT) 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=@bytedance.com header.s=google header.b=d0SnZ+pj; 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=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229482AbjEKGjH (ORCPT + 99 others); Thu, 11 May 2023 02:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229903AbjEKGjE (ORCPT ); Thu, 11 May 2023 02:39:04 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDE4110D for ; Wed, 10 May 2023 23:38:38 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f315735514so271109905e9.1 for ; Wed, 10 May 2023 23:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1683787117; x=1686379117; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wYtaRcshlY3QmxEEqVJsJU+0bmCyXLBCJqkTVjmG1hA=; b=d0SnZ+pjyye00WmokuVRn85o0hU1sSEe2pqirea4ZcrpkfnFfRYD5NIGNnwLArYw3e iv64Az5W7Mu6DGr5zAJF0G8CcBCqF+sF384FS8jxP5axqWOpR9v+E5hN6C+C43h/hTNT 0Yx7lFxm3QbgqJZg7f+9vk4JZk/9f4SujuFsWm4dfd9cVPLYUwMwbnjJFjr+VvzXVno/ jRtlFY3mjWUXLzS3+M7/j9KC/kW7xmujUlxKN60lZpZQNRCgUXJwiyhSzBdtnmEbV+u8 spumpdd5/+/4H/V5/yepOz9LH8iOQZNj3AK2Py3JcECSr0I5tTJe9mQ7GWgdn6jT/Psc i6uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683787117; x=1686379117; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wYtaRcshlY3QmxEEqVJsJU+0bmCyXLBCJqkTVjmG1hA=; b=XLpuU1wh1ammbX/9XWq8eKzz4SOqCGHT2tmRlSbraPrkOCW3tDhVX034Jenbu9Nr6I KTA4QPcFp8QLVE4j6+PUwD40ukHV/OZqfAbLwiwHh7lPHMy/44ODffVwEsX/cECErsek IawF43Ih0+KsGjWkEjuytJ3v5rcxe2/iDsgKDRHS5pFWEhlopXrvHkOF6yCHwbzLV7EL H0ew2ZvhSzV2rsb6M4kU1yGgrBQ/IKZUmmHyXiauEKd7kwg+TSOs1ANILG2mEeg3hHyF B3ySFHzFNgaqHOdaaQR6cl6R/DUPthYsBZbz2GIrOsHpkJ7yU2EcVM+qfIUcwspDdeSn agDA== X-Gm-Message-State: AC+VfDzHQZvvHSQ1gfabGGgaCHM9dN44lZUbqirramwf7oG1Babj/SbQ 9jRzv//OMQBErIfZj9fcDeWxXR3QbvyRxIV4nKUGCg== X-Received: by 2002:a05:600c:468e:b0:3ee:93d2:c915 with SMTP id p14-20020a05600c468e00b003ee93d2c915mr13695155wmo.6.1683787117430; Wed, 10 May 2023 23:38:37 -0700 (PDT) MIME-Version: 1.0 References: <20230507170631.89607-1-hanjinke.666@bytedance.com> In-Reply-To: <20230507170631.89607-1-hanjinke.666@bytedance.com> From: Muchun Song Date: Thu, 11 May 2023 14:38:00 +0800 Message-ID: Subject: Re: [PATCH v3] blk-throttle: Fix io statistics for cgroup v1 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, andrea.righi@canonical.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, May 8, 2023 at 1:07=E2=80=AFAM Jinke Han wrote: > > From: Jinke Han > > After commit f382fb0bcef4 ("block: remove legacy IO schedulers"), > blkio.throttle.io_serviced and blkio.throttle.io_service_bytes become > the only stable io stats interface of cgroup v1, and these statistics > are done in the blk-throttle code. But the current code only counts the > bios that are actually throttled. When the user does not add the throttle > limit, the io stats for cgroup v1 has nothing. I fix it according to the > statistical method of v2, and made it count all ios accurately. > > Fixes: a7b36ee6ba29 ("block: move blk-throtl fast path inline") > Tested-by: Andrea Righi > Signed-off-by: Jinke Han Good catch. Acked-by: Muchun Song Thanks.