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:	Wed, 10 Jul 2013 12:11:28 +0100
From:	Morten Rasmussen <morten.rasmussen@....com>
To:	Arjan van de Ven <arjan@...ux.intel.com>
Cc:	"mingo@...nel.org" <mingo@...nel.org>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
	"preeti@...ux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
	"alex.shi@...el.com" <alex.shi@...el.com>,
	"efault@....de" <efault@....de>, "pjt@...gle.com" <pjt@...gle.com>,
	"len.brown@...el.com" <len.brown@...el.com>,
	"corbet@....net" <corbet@....net>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	Catalin Marinas <Catalin.Marinas@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>
Subject: Re: [RFC][PATCH 1/9] sched: Introduce power scheduler

On Wed, Jul 10, 2013 at 03:10:15AM +0100, Arjan van de Ven wrote:
> On 7/9/2013 8:55 AM, Morten Rasmussen wrote:
> > +	mod_delayed_work_on(schedule_cpu(), system_wq, &dwork,
> > +				msecs_to_jiffies(INTERVAL));
> 
> so thinking about this more, this really really should not be a work queue.
> a work queue will cause a large number of context switches for no reason
> (on Intel and AMD you can switch P state from interrupt context, and I'm pretty sure
> that holds for many ARM as well)

Agree. I should have made it clear this is only a temporary solution. I
would prefer to tie the power scheduler to the existing scheduler tick
instead so we don't wake up cpus unnecessarily. nohz may be able handle
that for us. Also, currently the power scheduler updates all cpus.
Going forward this would change to per cpu updates and partial updates
of the global view to improve scalability.
 
> 
> and in addition, it causes some really nasty cases, especially around real time tasks.
> Your workqueue will schedule a kernel thread, which will run
> BEHIND real time tasks, and such real time task will then never be able to start running at a higher performance.
> 
> (and with the delta between lowest and highest performance sometimes being 10x or more,
> the real time task will be running SLOW... quite possible longer than several milliseconds)
> 
> and all for no good reason; a normal timer running in irq context would be much better for this kind of thing!
> 
> 

--
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