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]
Date:   Wed, 20 Dec 2017 10:34:29 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Christophe Leroy <christophe.leroy@....fr>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-gpio@...r.kernel.org
Subject: Re: [PATCH 3/4] gpio: sysfs: don't use sprintf() for 'value' attribute

On Mon, Dec 18, 2017 at 11:08 AM, Christophe Leroy
<christophe.leroy@....fr> wrote:

> A bench with 'perf record' shows that most of time spent in value_show()
> is spent in sprintf()
>
> --42.41%--sysfs_kf_read
>           |
>           |--39.73%--dev_attr_show
>           |          |
>           |          |--38.23%--value_show
>           |          |          |
>           |          |          |--29.22%--sprintf
>           |          |          |
>           |          |          |--2.94%--gpiod_get_value_cansleep
>           |          |          |
>
> value_show() only returns "0\n" or "1\n", therefore the use of
> sprintf() can be avoided
>
> With this patch we get the following result with 'perf record'
>
> --13.89%--sysfs_kf_read
>           |
>           |--10.72%--dev_attr_show
>           |          |
>           |          |--9.44%--value_show
>           |          |          |
>           |          |          |--4.61%--gpiod_get_value_cansleep
>
> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>

Patch applied.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ