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: <CAE4R7bC7qt9LhDqvpb-ZvWB6te=nf4DgXrC0T4NT7DX2yrCgrw@mail.gmail.com>
Date:	Thu, 28 May 2015 08:53:20 -0700
From:	Scott Feldman <sfeldma@...il.com>
To:	David Laight <David.Laight@...lab.com>
Cc:	Simon Horman <simon.horman@...ronome.com>,
	Jiri Pirko <jiri@...nulli.us>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH/RFC net-next] rocker: remove rocker parameter from
 functions that have rocker_port parameter

On Thu, May 28, 2015 at 2:18 AM, David Laight <David.Laight@...lab.com> wrote:
> From: Simon Horman
>> Sent: 28 May 2015 04:23
>> The rocker (switch) of a rocker_port may be trivially obtained from
>> the latter it seems cleaner not to pass the former to a function when
>> the latter is being passed anyway.
>
> If the arguments are passed in registers (they almost certainly are)
> or the function is inlined (possible since they are static) and
> the calling code already has both values in registers then
> passing both values saves a memory read inside the called code.
>
> So on 'hot paths' it probably makes sense to pass both values.

Agreed, and Simon's patch is 99% cold path, so I'd rather trade
clarity in the code than saving a nanosec in a driver cold path.

Simon, would you respin, remove rocker_port_rx_proc() changes, remove
RFC, and add my ack?  rocker_port_rx_proc() was the only hot path case
I found.

-scott
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ