[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9da36d2c-2229-08a4-d78f-e789b93132b1@loongson.cn>
Date: Sat, 7 Jan 2023 08:58:10 +0800
From: Hongchen Zhang <zhanghongchen@...ngson.cn>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Kuniyuki Iwashima <kuniyu@...zon.co.jp>,
David Howells <dhowells@...hat.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Randy Dunlap <rdunlap@...radead.org>,
Eric Dumazet <edumazet@...gle.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] pipe: use __pipe_{lock,unlock} instead of spinlock
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@...ngson.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
Powered by blists - more mailing lists