Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10106607rwd; Wed, 21 Jun 2023 16:45:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZR39rIwFYTBxW5jy000cH7QwopQEVbcrcMfKXopQAGbbrftEvTDXFBapCu9jHZxn4tKty X-Received: by 2002:a05:6358:cc1c:b0:129:c127:d933 with SMTP id gx28-20020a056358cc1c00b00129c127d933mr8869962rwb.25.1687391147037; Wed, 21 Jun 2023 16:45:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687391146; cv=none; d=google.com; s=arc-20160816; b=o9D+PunJsZ5YS1Lpc+rMSeQeslfpMnenVxcIWt8xiZfYUbrVEL7X8yuqdw/Mz2ug4w F8mAruPPlWO2jvFn8mmtV2s7Drbipen2gx8NvszYZKGj9sJlGlO34ahoCI1rJzQCr1fL 36m3dIe4gAp1QHiJRzkYM1NIKhwM/M9o+Lufy2fJYm6zBqdEhUl/RTPlg5e1+BsPiuKU WxQGk6sTKSO+5jV9tChWkbDFoE4evR9dhxRhVC4TQHy9Vj4zddKVxq2Av0LCPXRT02k/ KKIpV5DVj8IL0/Pti7A8IdTeNLyFrqMFnDleZVXAcpMvVai5wA0Iw4zU4OXr3ARk+7wS JZGQ== 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=6UUobunqNwnmAWTs9DQpKUdCunt1qB+Jn9puu0ALBxQ=; b=Qhfx203I4Vb+2QMYWBRTrw+Rm/AKc6mJv5TCLK3WM9voeLCzp6DVzbkbPJTJSiYuH/ t4Ed/VX4OyAcFMpIhIZR+Z3qghJdyo1R29BoLix7ft/Tliaf3vhBY41oapSYAj7T+5NN fCrxhcbfsxfFDWe0TojBrtrg0DciS1MUpS6BfZBe0jP7PkJfzuwcicWh4nPugshmX9hX R6I15kQ8RoxJNc9W32xOH3lOr2Y51FmJzywXIqVazzU64pbuhJu/kz8HCVVQ5g2f0DFh c3d7QsfiG1XRc8ynmdIMr3YznL8y4pNHbYQB2/CTuMRoRtdo3AkdgFQv4WSeZw/e9D5j QeQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nU1BTobl; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q19-20020a637513000000b00557221f00c7si3623870pgc.335.2023.06.21.16.45.35; Wed, 21 Jun 2023 16:45:46 -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=@kernel.org header.s=k20201202 header.b=nU1BTobl; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbjFUXLl (ORCPT + 99 others); Wed, 21 Jun 2023 19:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjFUXLj (ORCPT ); Wed, 21 Jun 2023 19:11:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F1931BE4; Wed, 21 Jun 2023 16:11:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DA968616FB; Wed, 21 Jun 2023 23:11:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 476A0C433C9; Wed, 21 Jun 2023 23:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687389081; bh=MXd+ysMQSxosQwi/fOsmNzE2p7+1D7huOkrOaZM+5q4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nU1BToblH8kFEJyfism/CavNX0QRyjV10wMcIIBUdSN+NoaAsBg6hQjBTsnlyQakg V6V2BAmtClCIxvmgR4/3BO+Uydd0y68BZND36yrl41/FtJKBUktEZ25GmG/AsjpWSU CXKifkm11uaFimusjZolWy1CwlfKQhJXwg4gKS9zKuQcw0eFOeCijtfkJ6C1677FKa 0e8CrxhH0qYKnuOHrmpaaSriBVTii+jqieZpzxSzxSyIOryvkRgrsezAhGq5U1hCME 3ZYw1nZEbaOzmTkqV7o0e9osL7dYBmmqAvWdGtg+Ig1ZGkH4qJF+2A+12Ky5DpuSPw u4h9+rCqMddTw== Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-4f8775126d3so4562219e87.1; Wed, 21 Jun 2023 16:11:21 -0700 (PDT) X-Gm-Message-State: AC+VfDzV9j4eimMM6fL/TwNQoZ0hj+VVh/p+5eHJztTcjuSswVGYZVIu tsUqmYcuNusDupVcofg0R6Dp+lZd17mAoMO+1+o= X-Received: by 2002:a05:6512:b8c:b0:4f9:5efd:f462 with SMTP id b12-20020a0565120b8c00b004f95efdf462mr1962537lfv.6.1687389079313; Wed, 21 Jun 2023 16:11:19 -0700 (PDT) MIME-Version: 1.0 References: <20230621165110.1498313-1-yukuai1@huaweicloud.com> In-Reply-To: <20230621165110.1498313-1-yukuai1@huaweicloud.com> From: Song Liu Date: Wed, 21 Jun 2023 16:11:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/8] md: fix and refactor io accounting and 'active_io' To: Yu Kuai Cc: xni@redhat.com, pmenzel@molgen.mpg.de, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Wed, Jun 21, 2023 at 1:52=E2=80=AFAM Yu Kuai w= rote: > > From: Yu Kuai > > Changes in v2: > - fix some typos; > - add review tag; > > This patchset do following things: > - make io accounting for all raid levels consistent, patch 1, 3-5; > - enable io accounting for all raid levels, patch 6-8; > - hold 'active_io' before io start to dispatch, and release 'active_io' > when io is done, make mddev_suspend() will wait for io to be done, patch= 2 > > This patch set also prepare to synchronize io and raid configuration, mak= e > it possible to use 'active_io' in common layer to judge if normal io is > in flight. > > Yu Kuai (8): > md: move initialization and destruction of 'io_acct_set' to md.c > md: also clone new io if io accounting is disabled > raid5: fix missing io accounting in raid5_align_endio() > md/raid1: switch to use md_account_bio() for io accounting > md/raid10: switch to use md_account_bio() for io accounting > md/md-multipath: enable io accounting > md/md-linear: enable io accounting > md/md-faulty: enable io accounting Applied to md-next. Thanks, Song > > drivers/md/md-faulty.c | 2 + > drivers/md/md-linear.c | 1 + > drivers/md/md-multipath.c | 1 + > drivers/md/md.c | 78 +++++++++++++++++++-------------------- > drivers/md/md.h | 6 +-- > drivers/md/raid0.c | 16 +------- > drivers/md/raid1.c | 14 +++---- > drivers/md/raid1.h | 1 - > drivers/md/raid10.c | 20 +++++----- > drivers/md/raid10.h | 1 - > drivers/md/raid5.c | 70 ++++++++++------------------------- > 11 files changed, 79 insertions(+), 131 deletions(-) > > -- > 2.39.2 >