Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2948321rwl; Fri, 6 Jan 2023 13:11:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXsFAYS3TpGJkJAw+lZGKDPMlGwUrDTuVysia5meZ5sgbfF9aWzwCooEsDtm51bWh+IZiXR5 X-Received: by 2002:a17:903:41c6:b0:186:8238:bc9 with SMTP id u6-20020a17090341c600b0018682380bc9mr81513010ple.2.1673039460046; Fri, 06 Jan 2023 13:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673039460; cv=none; d=google.com; s=arc-20160816; b=n1dyIJxhjbTHAL5oX1/+gWVWMyIzXbenMTOUlqND/7amLD80OT3v8jg6+03O6aIb3n /Pt7XPI/q+VqF1My9x1G+dN3EsZCs1RtME/MLk1oftwIJ8sjzK4lYVVA+Q1D8Bo1Q9f1 nIO7B3oxPpv9b2BdhpmJ2FM36O6rT50cxqcfx9IkDWdi/YkzJzufXvjLMZfgN1g6IjQ/ Cb6+apoPlwEu8Iy1lKyc+6xX8rb9FEvORjdkNcia9SH1wmzn9w0Eeh5E7gnU66ARtzHd shoWHvmz+UF2jjpAQZJOpYvNoJ6x1cTpqlmr92JVga45yvqrQwnIoU68TMC4aKUtamvL QNcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=XaDPfwoL+u15r2egWWYGKKyUhV9uIWkWkMZ5qdh5ZFM=; b=Lu/r8WXLj1pIQls7OW/HRB9xlGYQnurFmdtah8SsE8eVX7zurlC7l07XITxFBqkygn 7TI0T2n+kxzHxnv0HMte6NQ6wNPaBW+NnfA1W/WDQBW+SXLZDxylQvD6blGa2pYYJPBU Lngo7BYgwm7qviMxnd9A4CXIJi+0f+ZVwSLjJmUlPD/BCFQopWUMricE17VnQCwK6h1C tyqrZbTF69SK6/GHKGyu2Iec5+DYHWKAYbkAbMNOzUQoXZdDLMGqoER9CNiAGOjYJrsY GpSIjV8tuG8G8t4iSteD5JxmpcxnSiSEregLI1cfhM72gT+aILBcxqqH/dNU8NSONXyQ aChQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k5txLsZI; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020a1709028bca00b001890c6ff01asi1743977plo.483.2023.01.06.13.10.52; Fri, 06 Jan 2023 13:11:00 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=k5txLsZI; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236099AbjAFUeq (ORCPT + 55 others); Fri, 6 Jan 2023 15:34:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235692AbjAFUeW (ORCPT ); Fri, 6 Jan 2023 15:34:22 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F28C6CFF6; Fri, 6 Jan 2023 12:34:20 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id f34so3576602lfv.10; Fri, 06 Jan 2023 12:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XaDPfwoL+u15r2egWWYGKKyUhV9uIWkWkMZ5qdh5ZFM=; b=k5txLsZIED9lM3Jb2r0MHLESXqPke1bd6U9IcmJpKvb23bLiRIKeqFj9wGUf2Dgls+ ZTFCesl2VsGFUIAnp7lq2vWUTT6s6yj8AnEQcFwxx3KoSwAgmStWBlasg9sqOySQR7Wl BwN+Qm1yHSTTnbQ7nhYtWPjSm2o7z7fbD+cdwVvtR2p/2+aV42to0WakK/8NzTuUMH3y rxWMOppyosFEERITJbodzqQSJl6SuAI2mn1KHARSATyyp5kgwr6E6YhzflS23dNsNsXD je02DMVYAO7TsLCcciqffYqRflN+oDvnvcvhU/2yEsl9O3XQLHJr9apomcIh3fCqDzqR TUNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XaDPfwoL+u15r2egWWYGKKyUhV9uIWkWkMZ5qdh5ZFM=; b=qlTAHBqkSzI1xPjph/dMO4vL0HuENvPg0aH8nNgBp8reroBaoK3Og3k4FO1EdaxMSb cEgVwrUqO3fS9CiVeOun6nnbDKV/ReECBdSKimQ78kwh//prgCMlSf8i3Vipzp2KZvuH TL9c/rzVIAiJ02JaXpEJJ3brwj9B8lMMQnaNcJjrqIFsoNY4P2rswUaRIjsn4y1TlY6r 0tKZDQXyr/wBowjPjH+rcRFSNOBCPxtCwG+goGKK1kx1ihAGm2cBw4LdM/NDN3Ofctzs 5xTJjQ1kFWicdjX3AlxUsV0VYMpbXeO6nAKJ31EBdiO/7sKsFITJj9KX5DBR8NvLty3e MLnw== X-Gm-Message-State: AFqh2kq07owlapoVO+rfmTDc4/WXegW4RA/OiyrsfJj6zBT2AK6mIapk 2HCM9LcVNTU1ZKGx3OnNX4DzBItDNhVYgbvGQn7ccTcH3G4= X-Received: by 2002:a05:6512:3e12:b0:4ca:6c11:d3e5 with SMTP id i18-20020a0565123e1200b004ca6c11d3e5mr2597435lfv.224.1673037258430; Fri, 06 Jan 2023 12:34:18 -0800 (PST) MIME-Version: 1.0 References: <20230106094844.26241-1-zhanghongchen@loongson.cn> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 6 Jan 2023 21:33:41 +0100 Message-ID: Subject: Re: [PATCH v3] pipe: use __pipe_{lock,unlock} instead of spinlock To: Luis Chamberlain Cc: Hongchen Zhang , Alexander Viro , Andrew Morton , Kuniyuki Iwashima , David Howells , Christophe JAILLET , Randy Dunlap , Eric Dumazet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Fri, Jan 6, 2023 at 8:40 PM Luis Chamberlain wrote: > > On Fri, Jan 06, 2023 at 05:48:44PM +0800, Hongchen Zhang wrote: > > Use spinlock in pipe_read/write cost too much time,IMO > > pipe->{head,tail} can be protected by __pipe_{lock,unlock}. > > On the other hand, we can use __pipe_{lock,unlock} to protect > > the pipe->{head,tail} in pipe_resize_ring and > > post_one_notification. > > > > I tested this patch using UnixBench's pipe test case on a x86_64 > > machine,and get the following data: > > 1) before this patch > > System Benchmarks Partial Index BASELINE RESULT INDEX > > Pipe Throughput 12440.0 493023.3 396.3 > > ======== > > System Benchmarks Index Score (Partial Only) 396.3 > > > > 2) after this patch > > System Benchmarks Partial Index BASELINE RESULT INDEX > > Pipe Throughput 12440.0 507551.4 408.0 > > ======== > > System Benchmarks Index Score (Partial Only) 408.0 > > > > so we get ~3% speedup. > > > > Signed-off-by: Hongchen Zhang > > --- > > After the above "---" line you should have the changlog descrption. > For instance: > > v3: > - fixes bleh blah blah > v2: > - fixes 0-day report by ... etc.. > - fixes spelling or whatever > > I cannot decipher what you did here differently, not do I want to go > looking and diff'ing. So you are making the life of reviewer harder. > Happy new 2023. Positive wording... You can make reviewers' life easy when... (encourage people). Life is easy, people live hard. +1 Adding ChangeLog of patch history Cannot say... Might be good to add the link to Linus test-case + your results in the commit message as well? ... Link: https://git.kernel.org/linus/0ddad21d3e99 (test-case of Linus suggested-by Andrew) ... Signed-off-by: Hongchen Zhang ... Thanks. Best regards, -Sedat-