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:   Thu, 28 May 2020 20:29:14 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Qais Yousef <qais.yousef@....com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Jonathan Corbet <corbet@....net>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Quentin Perret <qperret@...gle.com>,
        Valentin Schneider <valentin.schneider@....com>,
        Patrick Bellasi <patrick.bellasi@...bug.net>,
        Pavan Kondeti <pkondeti@...eaurora.org>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/2] sched/uclamp: Add a new sysctl to control RT default
 boost value

On Thu, May 28, 2020 at 05:51:31PM +0100, Qais Yousef wrote:

> In my head, the simpler version of
> 
> 	if (rt_task(p) && !uc->user_defined)
> 		// update_uclamp_min
> 
> Is a single branch and write to cache, so should be fast. I'm failing to see
> how this could generate an overhead tbh, but will not argue about it :-)

Mostly true; but you also had a load of that sysctl in there, which is
likely to be a miss, and those are expensive.

Also; if we're going to have to optimize this, less logic is in there,
the less we need to take out. Esp. for stuff that 'never' changes, like
this.

> > It's more code, but it is all outside of the normal paths where we care
> > about performance.
> 
> I am happy to take that direction if you think it's worth it. I'm thinking
> task_woken_rt() is good. But again, maybe I am missing something.

Basic rule, if the state 'never' changes, don't touch fast paths.

Such little things can be very difficult to measure, but at some point
they cause death-by-a-thousnd-cuts.

> > Indeed, that one. The fact that regular distros cannot enable this
> > feature due to performance overhead is unfortunate. It means there is a
> > lot less potential for this stuff.
> 
> I had a humble try to catch the overhead but wasn't successful. The observation
> wasn't missed by us too then.

Right, I remember us doing benchmarks when we introduced all this and
clearly we missed something. I would be good if Mel can share which
benchmark hurt most so we can go have a look.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ