lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a222f892-a2bc-c531-d17e-3ec2c8708fcd@codethink.co.uk>
Date:   Tue, 22 Jun 2021 18:45:37 +0100
From:   Ben Dooks <ben.dooks@...ethink.co.uk>
To:     Akira Tsukamoto <akira.tsukamoto@...il.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v2 0/5] riscv: improving uaccess with logs from network
 bench

On 22/06/2021 13:05, Akira Tsukamoto wrote:
> On 6/22/2021 5:30 PM, Ben Dooks wrote:
>> On 19/06/2021 12:21, Akira Tsukamoto wrote:
>>> Optimizing copy_to_user and copy_from_user.
>>>
>>> I rewrote the functions in v2, heavily influenced by Garry's memcpy
>>> function [1].
>>> The functions must be written in assembler to handle page faults manually
>>> inside the function.
>>>
>>> With the changes, improves in the percentage usage and some performance
>>> of network speed in UDP packets.
>>> Only patching copy_user. Using the original memcpy.
>>>
>>> All results are from the same base kernel, same rootfs and same
>>> BeagleV beta board.
>>>
>>> Comparison by "perf top -Ue task-clock" while running iperf3.
>>
>> I did a quick test on a SiFive Unmatched with IO to an NVME.
>>
>> before: cached-reads=172.47MB/sec, buffered-reads=135.8MB/sec
>> with-patch: cached-read=s177.54Mb/sec, buffered-reads=137.79MB/sec
>>
>> That was just one test run, so there was a small improvement. I am
>> sort of surprised we didn't get more of a win from this.
>>
>> perf record on hdparm shows that it spends approx 15% cpu time in
>> asm_copy_to_user. Does anyone have a benchmark for this which just
>> looks at copy/to user? if not should we create one?
> 
> Thanks for the result on the Unmatched with hdparm. Have you tried
> iperf3?

I will see if there is iperf3 installed. I've not done much other than
try booting it and then try booting it with a kernel i've built from
upstream.

> The 15% is high, is it before or with-patch?

Can't remember, I did this more to find out if the copy to/from user
was going to show up in the times for hdparm.

> Akira
> 


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ