From: Ingo Molnar <mingo@elte.hu>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org,
linux-pm@lists.linux-foundation.org, a.p.zijlstra@chello.nl,
ego@in.ibm.com, tglx@linutronix.de, andi@firstfloor.org,
venkatesh.pallipadi@intel.com, vatsa@linux.vnet.ibm.com,
arun@linux.vnet.ibm.com,
Suresh Siddha <suresh.b.siddha@intel.com>
Subject: Re: [RFC PATCH 0/4] timers: framework for migration between CPU
Date: Mon, 23 Feb 2009 11:22:34 +0100 [thread overview]
Message-ID: <20090223102234.GQ9582@elte.hu> (raw)
In-Reply-To: <20090223094850.GA10226@balbir.in.ibm.com>
* Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> * Ingo Molnar <mingo@elte.hu> [2009-02-23 10:11:58]:
>
> >
> > * Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> >
> > > * Ingo Molnar <mingo@elte.hu> [2009-02-20 22:53:18]:
> > >
> > > >
> > > > * Arjan van de Ven <arjan@infradead.org> wrote:
> > > >
> > > > > On Fri, 20 Feb 2009 17:07:37 +0100
> > > > > Ingo Molnar <mingo@elte.hu> wrote:
> > > > >
> > > > > >
> > > > > > * Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote:
> > > > > >
> > > > > > > > I'd also suggest to not do that rather ugly
> > > > > > > > enable_timer_migration per-cpu variable, but simply reuse
> > > > > > > > the existing nohz.load_balancer as a target CPU.
> > > > > > >
> > > > > > > This is a good idea to automatically bias the timers. But
> > > > > > > this nohz.load_balancer is a very fast moving target and we
> > > > > > > will need some heuristics to estimate overall system idleness
> > > > > > > before moving the timers.
> > > > > > >
> > > > > > > I would agree that the power saving load balancer has a good
> > > > > > > view of the system and can potentially guide the timer biasing
> > > > > > > framework.
> > > > > >
> > > > > > Yeah, it's a fast moving target, but it already concentrates
> > > > > > the load somewhat.
> > > > > >
> > > > >
> > > > > I wonder if the real answer for this isn't to have timers be
> > > > > considered schedulable-entities and have the regular scheduler
> > > > > decide where they actually run.
> > > >
> > > > hm, not sure - it's a bit heavy for that.
> > > >
> > >
> > > I think the basic timer migration policy should exist in user
> > > space.
> >
> > I disagree.
> >
>
> See below
>
> > > One of the ways of looking at it is, as we begin to
> > > consolidate, using range timers and migrating all timers to
> > > lesser number of CPUs would make a whole lot of sense.
> > >
> > > As far as the scheduler making those decisions is concerned,
> > > my concern is that the load balancing is a continuous process
> > > and timers don't necessarily work that way. I'd put my neck
> > > out and say that irqbalance, range timers and timer migration
> > > should all belong to user space. irqbalance and range timers
> > > do, so should timer migration.
> >
> > As i said it my first reply, IRQ migration is special because
> > they are not kernel-internal objects, they come externally so
> > there's a lot of user-space enumeration, policy and other steps
> > involved. Furthermore, IRQs are migrated in a 'slow' fashion.
> >
> > Timers on the other hand are fast entities tied to _tasks_
> > primarily, not external entities.
>
> Timers are also queued due to external events like interrupts
> (device drivers tend to set of timers all the time). [...]
That is a silly argument. Tasks are created due to 'external
events' as well such as the user hitting a key.
What matters, and what was my argument is the distinction
whether the kernel _generates_ the event. For most IRQ events it
does not, for the overwhelming majority of timers events it
consciously generates timer events. Which makes them all the
much different.
> [...] I am not fully against what you've said, at some
> semantic level what you are suggesting is that at a higher
> level of power saving, when the scheduler balances timers it
> is doing a form of soft CPU hotplug on the system by migrating
> timers and tasks away from idle CPUs when the load can be
> handled by other CPUs. See below as well.
>
> > Hence they should migrate
> > according to the CPU where the activities of the system
> > concentrates - i.e. where tasks are running.
> >
> > Another thing: do you argue for the existing timer-migration
> > code we have in mod_timer() to move to user-space too? It isnt a
> > consistent argument to push 'some' of it to user-space, and some
> > of it in kernel-space.
> >
>
> No.. mod_timer() is correct where it belongs.
You did not reply to my statement that the argument is a double
standard. Why do certain migrations in the kernel and some not?
> Consider the powertop usage scenario today
>
> 1. Powertop displays a list of timers and common causes of wakeup
> 2. It recommends policies in user space that can affect power savings
> a. usb autosuspend
> b. wireless link management
> c. disable HAL polling
That's different - those are PowerTop timer event _reduction_
policies. Not migration policies of existing timers.
> My argument is, why can't we add
>
> d. Use range timers
> e. Consolidate timers
>
> In the future.
>
> Even sched_mc=n is set by user space, so really the
> policy is in user space.
that is different again. sched_mc is a broad switch not a
dynamic control like the sysfs migration interface that was
introduced in this patchset. Which patchset we are discussing.
Ingo
next prev parent reply other threads:[~2009-02-23 10:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-20 12:55 Arun R Bharadwaj
2009-02-20 12:57 ` [RFC PATCH 1/4] timers: framework to identify pinned timers Arun R Bharadwaj
2009-02-20 12:58 ` [RFC PATCH 2/4] timers: sysfs hook to enable timer migration Arun R Bharadwaj
2009-02-20 13:00 ` [RFC PATCH 3/4] timers: identifying the existing pinned hrtimers Arun R Bharadwaj
2009-02-20 13:01 ` [RFC PATCH 4/4] timers: logic to enable timer migration Arun R Bharadwaj
2009-02-20 13:21 ` [RFC PATCH 0/4] timers: framework for migration between CPU Ingo Molnar
2009-02-20 14:14 ` Vaidyanathan Srinivasan
2009-02-20 16:07 ` Ingo Molnar
2009-02-20 19:57 ` Arjan van de Ven
2009-02-20 21:53 ` Ingo Molnar
2009-02-23 7:55 ` Balbir Singh
2009-02-23 9:11 ` Ingo Molnar
2009-02-23 9:48 ` Balbir Singh
2009-02-23 10:22 ` Ingo Molnar [this message]
2009-02-23 11:24 ` Balbir Singh
2009-02-23 10:38 ` Vaidyanathan Srinivasan
2009-02-23 11:07 ` Ingo Molnar
2009-02-23 11:25 ` Balbir Singh
2009-02-26 8:58 ` Dipankar Sarma
2009-02-26 15:45 ` Ingo Molnar
2009-02-26 16:02 ` Peter Zijlstra
2009-02-26 16:12 ` Ingo Molnar
2009-02-23 7:59 ` Arun R Bharadwaj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090223102234.GQ9582@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=arjan@infradead.org \
--cc=arun@linux.vnet.ibm.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=suresh.b.siddha@intel.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=vatsa@linux.vnet.ibm.com \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®