Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2831653rwl; Fri, 6 Jan 2023 11:25:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXulmqrjFkDfKQtJmU/X4w4K2MesYPN7G2KU9Q3OwcWUKt609GrCpdAh1sWcCGD4vHEn+Eni X-Received: by 2002:a17:902:e04b:b0:192:6b23:e38b with SMTP id x11-20020a170902e04b00b001926b23e38bmr46124213plx.24.1673033138976; Fri, 06 Jan 2023 11:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673033138; cv=none; d=google.com; s=arc-20160816; b=ybteTE9D2/FRoiVupMq3XgcnY+VSEsKAWERBLsbBS3r5ZiGLuZKkhOr+u+qeNSjJON DtyOI5xsAYndD9Sqm2kzrCHUIriD6Ab8dkerXW9RWI+HA4jT/itMRowuHMYLTz2o3gKz y8vLcbE1I3lySZkXEx0hS50cWaZlKJgs7DGNz+46CNUkyccLL4rQgOSywHabM4nB3QkC bddxJ1ekdHlYnlREIsl3BcpiYpBl8J8Rmc69CheUvR3b9ZZTtDJLUOc3I/XCVDFcE6Pv 5Hgueh4OshgT2n/4w18Z6sXn5facZ12EPjcTtJ1yV/2Y0UQ1JPAF8iXpVJNGfClW4VZf kOOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=4fFJTo3td0EaVTFdM5bjLZ2rfCzevY+CZk+c5LeFYls=; b=tC6MtyLlUGjb6xws8inadD2h4dxvbi6NhbNejjAlrDkq7c4SroWCPxHvzMsEw2dkp7 0K4DijVowtE3GIJDB9ymVg/Exihg/ttnx7/nQUNkmXUMBVEGxcgZ0guxsiKMIXnAtTam 6iM8Az2+DAom0ljDpbhClnn2Z+b/h2MjBx+MgzWrGeGwsdq1m+d2KPC6hJICfrf04WeD eWp9JdMtdLjz9/KNfqoSaAs9ADQAO6JSHNQmzZw9z9XZsH04Lxsr2ywHJCPhxXcw4nVn FaCi1x+UutrsX46ixyH9jfoadYz03Zva3bUwgv/DgBbIUnbzxa/Yr0Cmeu+RsWnDUYNz K7MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=gBTyIAy1; 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 s12-20020a170902b18c00b0017336c464ecsi1646500plr.407.2023.01.06.11.25.31; Fri, 06 Jan 2023 11:25:38 -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=@infradead.org header.s=bombadil.20210309 header.b=gBTyIAy1; 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 S234196AbjAFTNW (ORCPT + 56 others); Fri, 6 Jan 2023 14:13:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbjAFTNU (ORCPT ); Fri, 6 Jan 2023 14:13:20 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DFB868799; Fri, 6 Jan 2023 11:13:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4fFJTo3td0EaVTFdM5bjLZ2rfCzevY+CZk+c5LeFYls=; b=gBTyIAy13xD19rRq3HNUq2LAQA 9519MzZCt8oZpCQDgIUYkvArms/BnXH5g0qNTXpM204LENwQnaf7n9L1f71TQRbBTdP/GfPUFoQGf sYd0v+Uqz/Z50GBoNO9rtisMhd2JxoKzyL+K+hWyUpCKTgib667xXZrI7qBeYhiapb7APoEGZlSjN EH4XR8rEn5nJo5f4ncJjf/fYGjOxOkoTOR60ShDJatQPocMEc8ByQF8lRGUlD+ZeZiDf2n5Rvv4rA 9NA+JTBhKSwM5zNDgs4oTLxfxbZGx8JkhmbDWO5xjstPxpw8m59i5n/za4+zeKCyvyDRxUHqSVzDO oE7LCFDQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDs9L-00EYJA-Gb; Fri, 06 Jan 2023 19:13:07 +0000 Date: Fri, 6 Jan 2023 11:13:07 -0800 From: Luis Chamberlain To: Hongchen Zhang Cc: Alexander Viro , Andrew Morton , Kuniyuki Iwashima , David Howells , Christophe JAILLET , Randy Dunlap , Eric Dumazet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] pipe: use __pipe_{lock,unlock} instead of spinlock Message-ID: References: <20230106094844.26241-1-zhanghongchen@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230106094844.26241-1-zhanghongchen@loongson.cn> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 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. Luis