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: <20100913152514.GA8771@Krystal>
Date:	Mon, 13 Sep 2010 11:25:14 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Tony Lindgren <tony@...mide.com>,
	Mike Galbraith <efault@....de>
Subject: Re: [RFC patch 1/2] sched: dynamically adapt granularity with
	nr_running

* Steven Rostedt (rostedt@...dmis.org) wrote:
> On Mon, 2010-09-13 at 16:16 +0200, Peter Zijlstra wrote:
> 
> > > > -     if (delta_exec < sysctl_sched_min_granularity)
> > > > -             return;
> > > 
> > > Well, the reason why this test is here seems to be that we don't want to trigger
> > > "resched_task" more often than needed, and here it's defined by the granularity.
> > 
> > Right, but its wrong for the weighted case. Letting a light task run
> > that long will make its latency suck.
> > 
> > > I don't quite see with what you are replacing this, other than "let's set the
> > > resched flag all the time to save a 32-bit division". I figure out it's more
> > > expensive the call the scheduler than to do a 32-bit div.
> > 
> > The more divs we put it, the more expensive it all becomes.
> > 
> 
> What about:
> 
> 	if (delta_exec < sysctl_sched_min_granularity ||
> 	    delta_exec < __sched_gran(cfs_rq->nr_running))
> 
> This way we avoid the div when delta_exec is less than the
> min_granularity, and then we can do the div to perhaps avoid a needless
> resched?

Please note that my patch does not even take the 32-bit div when there are less
than 4 threads running on the system.

So I'm not at all sure we're trying to optimize an important case here.

Mathieu

> 
> -- Steve
> 
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
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