lkml.org 
[lkml]   [2015]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers
On Tue, Sep 01, 2015 at 07:14:13PM +0000, Jiang, Yunhong wrote:
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 8b864ec..0902e4d 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -623,18 +623,21 @@ int get_nohz_timer_target(void)
> > int i, cpu = smp_processor_id();
> > struct sched_domain *sd;
> >
> > - if (!idle_cpu(cpu))
> > + if (!idle_cpu(cpu) && is_housekeeping_cpu(cpu))
> > return cpu;
> >
> > rcu_read_lock();
> > for_each_domain(cpu, sd) {
> > for_each_cpu(i, sched_domain_span(sd)) {
> > - if (!idle_cpu(i)) {
> > + if (!idle_cpu(i) && is_housekeeping_cpu(cpu)) {
>
> Hi, Frederic, sorry for a naive question. Per my understanding, the tick_nohz_full_mask is added to cpu_isolated_map in
> sched_init_smp(), and the cpu_isolated_map is excluded from sched_domain in init_sched_domains(), so why check here?

Very good observation! But it's better to keep this check in the domain loop in
case things change in the future such as removing that cpu_isolated_map inclusion
or other suprises.


\
 
 \ /
  Last update: 2015-09-01 23:01    [W:0.106 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site