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: <alpine.LFD.2.02.1105061117220.3005@ionos>
Date:	Fri, 6 May 2011 12:18:27 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Andi Kleen <andi@...stfloor.org>
cc:	Eric Dumazet <eric.dumazet@...il.com>,
	john stultz <johnstul@...ibm.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Paul Mackerras <paulus@...ba.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Anton Blanchard <anton@...ba.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [RFC] time: xtime_lock is held too long

On Thu, 5 May 2011, Andi Kleen wrote:

> > > Another idea would be to prime cache lines to be dirtied in cpu cache
> > > before taking locks, and better pack variables to reduce number of cache
> > > lines.
> > 
> > Most variables are packed already in struct timekeeper, which should
> > be pretty cache hot anyway, so I don't know whether we gain much.
> 
> There's actually some potential here. I got a moderate speedup in a
> database benchmark with this patch recently. The biggest win

Numbers please.

> was in the timer interrupt.

Because this _is_ the timer interrupt ?
 
> All those variables are on separate cache lines.

Well, then we should make sure that they are not.

And looking at a few kernel images the interesting variables
timekeeper, xtime, wall_to_monotonic are in a consecutive area which
is not really surprising. Further all images have xtime and
wall_to_monotonic in the same cacheline, just xtime_lock is somewhere
else.

> (needs some cleanups, just for illustration)

And how's that cleanup going to look like? Making the timekeeping
internal variables global again is not going to happen. And if you
want prefetching those variables in the timer interrupt, then you want
to prefetch them in any random code path which ends up touching them.

That's the completely wrong aproach, really. If stuff takes too long,
then we need to tackle it at the root of the problem and not solve it
by sprinkling magic prefetches all over the place.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ