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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1307012234210.4013@ionos.tec.linutronix.de>
Date:	Mon, 1 Jul 2013 22:43:09 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Christoph Lameter <cl@...ux.com>
cc:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...icios.com, josh@...htriplett.org,
	niv@...ibm.com, peterz@...radead.org, rostedt@...dmis.org,
	dhowells@...hat.com, edumazet@...gle.com, darren@...art.com,
	fweisbec@...il.com, sbw@....edu
Subject: Re: [PATCH RFC nohz_full 0/7] v2 Provide infrastructure for full-system
 idle

On Mon, 1 Jul 2013, Christoph Lameter wrote:

> On Mon, 1 Jul 2013, Paul E. McKenney wrote:
> 
> > On Mon, Jul 01, 2013 at 07:43:47PM +0000, Christoph Lameter wrote:
> > > On Fri, 28 Jun 2013, Paul E. McKenney wrote:
> > >
> > > > Unfortunately, timekeeping CPU continues taking scheduling-clock
> > > > interrupts even when all other CPUs are completely idle, which is
> > > > not so good for energy efficiency and battery lifetime.  Clearly, it
> > > > would be good to turn off the timekeeping CPU's scheduling-clock tick
> > > > when all CPUs are completely idle.  This is conceptually simple, but
> > > > we also need good performance and scalability on large systems, which
> > > > rules out implementations based on frequently updated global counts of
> > > > non-idle CPUs as well as implementations that frequently scan all CPUs.
> > > > Nevertheless, we need a single global indicator in order to keep the
> > > > overhead of checking acceptably low.
> > >
> > > Can we turn off timekeeping when no cpu needs time in adaptive mode?
> > > Setting breakpoints in the VDSO could force timekeeping on again whenever
> > > something needs time. Would this not be simpler?
> >
> > Might be.  But what causes the breakpoints to be set on a system where
> > there is one CPU-bound nohz_full user-mode task with all other CPUs idle?
> > Or are you suggesting taking a breakpoint trap on each timekeeping access
> > to VDSO?
> 
> Well when a tick notices that it is the last one still enabled on the
> system and it could disable itself then it would set the breakpoint and
> then turn the tick on the last processor off. The code invoked by the
> breakpoint would reenable tick processing, update time and then use that
> new info to return the correct time.

Do we really care about that corner case? Not really. 

Also if there is one CPU which runs that tight loop in userspace and
timekeeping gets shut down after X seconds wants to have a fast and
bound look at the current time every X*N seconds. It's going to take a
trap and spend unbound time in the kernel. That's quite contrary to
the goal we wanted to achieve in the first place.

Though if ALL cpus are idle, i.e. none of the tickless cpus is running
any workload there is a point in switching off the time(house)keeping
CPU as well in order to save power. But that's not a problem we solve
with a breakpoint in the VDSO.

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