linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hongchen Zhang <zhanghongchen@loongson.cn>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kuniyuki Iwashima <kuniyu@amazon.co.jp>,
	David Howells <dhowells@redhat.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Randy Dunlap <rdunlap@infradead.org>,
	Eric Dumazet <edumazet@google.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] pipe: use __pipe_{lock,unlock} instead of spinlock
Date: Sat, 7 Jan 2023 08:58:10 +0800	[thread overview]
Message-ID: <9da36d2c-2229-08a4-d78f-e789b93132b1@loongson.cn> (raw)
In-Reply-To: <Y7hyw+fTdgAF6uYP@bombadil.infradead.org>

Hi Luis,

On 2023/1/7 上午3:13, 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 <zhanghongchen@loongson.cn>
>> ---
> 
> 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
> 
Matthew also reminded me to add the change log, but I don't think it is 
necessary to write the change log to fix the errors in the patch. 
Anyway, I think it is a good habit and will add these contents in the 
new v3 version.

Best Regards,
Hongchen Zhang


  parent reply	other threads:[~2023-01-07  0:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06  9:48 [PATCH v3] pipe: use __pipe_{lock,unlock} instead of spinlock Hongchen Zhang
2023-01-06 19:13 ` Luis Chamberlain
2023-01-06 20:33   ` Sedat Dilek
2023-01-07  3:31     ` Hongchen Zhang
2023-01-07  0:58   ` Hongchen Zhang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-07  1:23 Hongchen Zhang
2023-01-13  3:19 ` Hongchen Zhang
2023-01-13  9:32   ` Sedat Dilek
2023-01-16  1:52     ` Sedat Dilek
2023-01-16  2:16       ` Hongchen Zhang
2023-01-16  2:42         ` Sedat Dilek
2023-01-16  3:16   ` maobibo
2023-01-16  4:38     ` Matthew Wilcox
2023-01-16 21:10       ` Al Viro
2023-01-16 22:16         ` Andrew Morton
2023-01-17  6:54           ` Sedat Dilek
2023-01-29  2:29           ` Hongchen Zhang
2023-01-06  9:28 Hongchen Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9da36d2c-2229-08a4-d78f-e789b93132b1@loongson.cn \
    --to=zhanghongchen@loongson.cn \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=kuniyu@amazon.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).