Re: [patch 02/12] Immediate Values - Architecture Independent Code

Mathieu Desnoyers
2009-09-28T22:01:13Z

* Andrew Morton (akpm@linux-foundation.org) wrote:
> On Mon, 28 Sep 2009 22:11:08 +0200
> Andi Kleen <andi@firstfloor.org> wrote:
>
> > > For example, how do we know it's safe to use immediate-values for
> > > anything which can be modified from userspace, such as a sysfs-accessed
> > > tunable? How do we know this won't take someone's odd-but-legitimate
> > > workload and shoot it in the head?
> >
> > You're arguing we should tune for sysctl performance? That doesn't make
> > sense to me.
>
> We're talking about a tiny tiny performance gain (one which thus far
> appears to be unobserveable) on the read-side traded off against a
> tremendous slowdown on the write-side.
>
> That's OK for people whose workloads use the expected read-vs-write
> ratio. But there's always someone out there who does something
> peculiar. There will be people who simply cannot accept large
> slowdowns in writes to particular tunables. Who these people are and
> which tunables they care about we do not know.
>
> No, I'm not saying we should "tune for sysctl performance". I'm saying
> we should tune for not making Linux utterly uselessly slow for people
> for whom it previously worked OK.
>
> It means we'd have to look very carefully at each tunable and decide
> whether there's any conceivable situation in which someone would want
> to alter it frequently. If so, we need to leave it alone.
>
> How many tunables will that leave behind, and how much use was it to
> speed that remainder up by a teensy amount? Who knows.
>

BTW, when/if we get the OK from Intel to use a breakpoint/IPI-based
scheme to perform the updates rather than using the heavyweight
stop_machine(), this update performance question will be much less of a
concern.

hpa is currently looking into this.

Thanks,

Mathieu