Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2535420rwn; Fri, 16 Sep 2022 11:49:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7OVERnNMN4SffIRcLGS/7NSsS5sY/wk/a+reXLv3SmZ9gOOsOdkcva3cXMhLLZW/nd99KS X-Received: by 2002:a63:2bc3:0:b0:438:eb06:c0d5 with SMTP id r186-20020a632bc3000000b00438eb06c0d5mr5830594pgr.299.1663354171897; Fri, 16 Sep 2022 11:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663354171; cv=none; d=google.com; s=arc-20160816; b=eKh0oA4hUYo/9tbJQakGeRREw0SWx0ysMc4qlq0WMm07uTI/s+so0C5LqMUi/wazgD ZXY31guSfik5oXwFwBL9oOcURyJ1ygDWJagXQnMgIN5gR0n8LsRpIs0v6rEa1F1n4/BD TT71M1zUMiN0EjiqjZgYOnowHqp7FS6NA0Ez4hLgLZ+MfcVSUjuqw74Fo/Oqj2r73a6+ SYNvlIFDBpyYP7u425pV8Edmkcl2Q8LkhaauPdhzm5j5hS4a8Ij45I7Shfe2OC0708yT FaGL9b7E8k7m/TQ2TeojrfHR+Sxz77WAcnXzIZ8tlHHgieFWwXLs0RCles1sTEjKgBet j7Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:in-reply-to :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=3p1fjf6+XUColGE3d9QDmsCLNG1nGpDvT5jgoM7KnRc=; b=sTBNvc0Pqd/o3DciU60AvCtdM+LDQbaRQj9v1ILishRR7GJRhnn7vM1GO4I5GhAbCb TZKfuxsme5A1i3dKooZgEI0By5n43ixBqK4s8bExYEZyXCR2NTB8ynT2AN8Le57sjP9R WvTJL5NnIzSkVa9xq07fh0DL1++uwvo/DVLo9aNxDWMbsu0hOwjwpGGBlAgAnv0DmlZA PrE3zMD2OyG/pbJzo3LZmz4n/tb72/neTvTQJlJbdSsL4QmmTsAGrzlzxpUJ9GlF5ui9 KnzMC/Rm3kuLP98fu8LXPJXFw/qbauFJIp66kv4TTMBoMkwylaK7InD1JjBCcFc+Xs81 /VtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=POMuk+t4; 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=deltatee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a056a00089100b0052d9e5f07d9si19969853pfj.210.2022.09.16.11.49.20; Fri, 16 Sep 2022 11:49:31 -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=@deltatee.com header.s=20200525 header.b=POMuk+t4; 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=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229454AbiIPSge (ORCPT + 99 others); Fri, 16 Sep 2022 14:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbiIPSgY (ORCPT ); Fri, 16 Sep 2022 14:36:24 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824B5B6D74; Fri, 16 Sep 2022 11:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:From:References:Cc:To: MIME-Version:Date:Message-ID:content-disposition; bh=3p1fjf6+XUColGE3d9QDmsCLNG1nGpDvT5jgoM7KnRc=; b=POMuk+t4ekbySgv39Yia/iPs6n cy3NAyVNTyiDpXaWNCB1SlinerYYZaLPIBe+cNzi+eB9otWICfz3CZ3C9sE6DOAUFj44u6bMY7Jpr btRK1D2nOrKoX5CJ6n537MRj8/r0z/01ApkyNajDgrcrm6VwGFUk8QZDhlbFB2OLtReHL3xbvumwG 0Xz0DNi0bQVbe9k1aiWoOQGmK0Zuge2+Cgwk+YQLPBcd6o0chRUa54GwPZPOX2ZUHDSfApxtO6HTp 5NrrWbdW8qz5YPJbYkaEwOUl0n9xR93zWvO0T9tFVE9E/MS2cNhikPeHRl4eaSrYUd8OnsL6VrBuw 28QyGFzw==; Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1oZGCE-003JPP-GC; Fri, 16 Sep 2022 12:36:15 -0600 Message-ID: <641c8be0-69f6-0ab5-b174-411352ed5f94@deltatee.com> Date: Fri, 16 Sep 2022 12:36:14 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Content-Language: en-CA To: Yu Kuai , song@kernel.org, guoqing.jiang@linux.dev, pmenzel@molgen.mpg.de Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com References: <20220916113428.774061-1-yukuai1@huaweicloud.com> <20220916113428.774061-4-yukuai1@huaweicloud.com> From: Logan Gunthorpe In-Reply-To: <20220916113428.774061-4-yukuai1@huaweicloud.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: yukuai1@huaweicloud.com, song@kernel.org, guoqing.jiang@linux.dev, pmenzel@molgen.mpg.de, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH v3 3/5] md/raid10: prevent unnecessary calls to wake_up() in fast path X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-09-16 05:34, Yu Kuai wrote: > From: Yu Kuai > > Currently, wake_up() is called unconditionally in fast path such as > raid10_make_request(), which will cause lock contention under high > concurrency: > > raid10_make_request > wake_up > __wake_up_common_lock > spin_lock_irqsave > > Improve performance by only call wake_up() if waitqueue is not empty > in allow_barrier() and raid10_make_request(). > > Signed-off-by: Yu Kuai Reviewed-by: Logan Gunthorpe