Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8176664rwd; Tue, 20 Jun 2023 11:11:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4s7GkCNKx8R6HMdqaUThpvAYV5vRWhscvKN3RbkLtZF0KKHNHmHCL8trHiL/1Jbtt1DIkB X-Received: by 2002:a05:6870:5b08:b0:1a2:fe44:502f with SMTP id ds8-20020a0568705b0800b001a2fe44502fmr11204534oab.0.1687284716803; Tue, 20 Jun 2023 11:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687284716; cv=none; d=google.com; s=arc-20160816; b=Zs6oi2jFTWgcIhETmHGdY9zJorHqM3S8mubmgVuv1QfLuUdCnNLzyggPhhSFLu4DBy qjqDjAj7QgxpdtUnk6BcYwNwXRfZdq/zN1avtzGG/rSDdrpnR5n6KOV/j+DiDiE2YYpl z8HNM4MttmOWV1Djvg5R5bV6EO/VM8zIyO6Tn8qjNcFnRJIazaPvRlj3zIUsbqW4oNZL J5z1rFC0GCFEiEB0mdbCUQAku9crxPp6ar7c26DPFI7tQfPJAtZDzM3MKT5vB1V+bmYL bY97qd7lrISsqCH2UdVtaGl2u+wnrmYYmnxcsfaDIlOECvCG1tuO6kSHtyj0FjvDEeEy yHeA== 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=00n1CvKK18EwHxMPF20VNyV7lvW1KUwDIddyyBlLBBo=; b=G/usqsz0NIWj1cIWGgWVu8ww0M22cpirL/76dGFsUlJ+AkatEUQswhYVogMMkRu1fb UBQdR0sLktm9mSwm1eziMcNyB3e5mKO0PJWBYVDxfTXeN71JHsGbxjT2/VvxOi2jRp55 RJ7XBGQSBLsJjOIB9PayWV5pfMtF8pkCH7Q+TQw43v9nkNM3TnJNqQQJ+jmaYa9X+Yhg 6SNHTUmUxg+fuuKwp2UOX1aFERI0bW/njTBMIXhRedxP9O1ez59ro8Ed1H+e8q3t8AzN JadWanQPdNk/NvpIAOLjmu11A3N+afyCSMu29oakyTWTUM0y/PnXBjC+6eluYMXcFdLj 8hLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmKcM4R9; 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 y184-20020a638ac1000000b00553854417ddsi2260935pgd.416.2023.06.20.11.11.41; Tue, 20 Jun 2023 11:11:56 -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=GmKcM4R9; 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 S230522AbjFTRSJ (ORCPT + 99 others); Tue, 20 Jun 2023 13:18:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbjFTRSF (ORCPT ); Tue, 20 Jun 2023 13:18:05 -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 29889E65; Tue, 20 Jun 2023 10:18:04 -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 A59F56133F; Tue, 20 Jun 2023 17:18:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 169EAC433CB; Tue, 20 Jun 2023 17:18:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687281483; bh=Xe49NstVNbQxwJ+wnptLy8rhubUuN1/2wGDj4qVwxbo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GmKcM4R9nPynfVUeLwl46ZdmAmAXqyWWX4dM8qj4kK4JHzk+4jYCedVBAK/R7Kv1q gWqx3MK7Qzsn8mh8eXNm0l45y8O3h8jtdP15Y9XdfXniTsMXWxYc9tW3ACfDX4rZGH u+x2hFjby2cEiyDqT+sznhWMLk8Ugk6AypH5jR8XC1EN0MLv+16qYpKCm6qxeUcTWr 7E2C6ZbAlhoGGAg9mvFxp/nixQTGVi/WaYnZ5R8smVQAeTi9Uot83zhoJbetXKJ/DN /4OOFVcxigmcLDeHR8aoYED4FyuMMdgt6AHJ71YWm0bBVFDFwxBceXDHZZKI/9VE8F exhypxX0hr7TA== Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4f76a0a19d4so6652118e87.2; Tue, 20 Jun 2023 10:18:02 -0700 (PDT) X-Gm-Message-State: AC+VfDwRkaha0cUr6qDEcQFtjJhRXswuRhSb+hDBEicSvc+azs1MZZ8l BUxBGVvgVAQwvvNIdoTcTWYxaO7qF4KZ7p0xnrs= X-Received: by 2002:a19:ab12:0:b0:4f8:cd67:88e6 with SMTP id u18-20020a19ab12000000b004f8cd6788e6mr1886971lfe.44.1687281481091; Tue, 20 Jun 2023 10:18:01 -0700 (PDT) MIME-Version: 1.0 References: <20230618142520.14662-1-yukuai1@huaweicloud.com> <4c729ee3-ad63-1928-0113-19b576b09b24@huaweicloud.com> In-Reply-To: <4c729ee3-ad63-1928-0113-19b576b09b24@huaweicloud.com> From: Song Liu Date: Tue, 20 Jun 2023 10:17:48 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] raid10: avoid spin_lock from fastpath from raid10_unplug() To: Yu Kuai Cc: Paul Menzel , aligrudi@gmail.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, "yukuai (C)" 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 Mon, Jun 19, 2023 at 6:00=E2=80=AFAM Yu Kuai w= rote: > > Hi, > > =E5=9C=A8 2023/06/19 18:26, Paul Menzel =E5=86=99=E9=81=93: > > Dear Yu, > > > > > > Thank you for your patch. Some minor nits from my side, you can also > > ignore. > > > > Am 18.06.23 um 16:25 schrieb Yu Kuai: > >> From: Yu Kuai > >> > >> Commit 0c0be98bbe67 ("md/raid10: prevent unnecessary calls to wake_up(= ) > >> in fast path") missed one place, for example, while testing with: > > > > =E2=80=A6 one place. For example, with > > > >> > >> fio -direct=3D1 -rw=3Dwrite/randwrite -iodepth=3D1 ... > >> > >> Then plug and unplug will be called for each io, then wake_up() from > > > > Maybe: > > > > fio -direct=3D1 -rw=3Dwrite/randwrite -iodepth=3D1 ... > > > > plug und unplug are called for each io, then =E2=80=A6 > > > >> raid10_unplug() will cause lock contention as well. > > > > Maybe paste the perf command and output? > > Related test and test result and perf result can be found in the below > Link. We don't need a lot of details of the test results in the commit log. But a quick summary of the performance result can be really helpful here. Something like: on array X, fio job Y, before the patch we got AAA, with the patch, we got BBB. Other than this, the patch looks good to me. Thanks, Song