Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1217075

Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers

From Frederic Weisbecker <fweisbec@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers
Date 2015-09-01 22:50 +0200
Message-ID <q40Fc-FI-9@gated-at.bofh.it> (permalink)
References <q3Vcu-1fz-19@gated-at.bofh.it> <q3Vcv-1fz-65@gated-at.bofh.it> <q3Zg5-7e7-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL] sched/nohz: Affine unpinned timers to housekeepers Frederic Weisbecker <fweisbec@gmail.com> - 2015-09-01 17:00 +0200
  [PATCH 2/2] nohz: Assert existing housekeepers when nohz full enabled Frederic Weisbecker <fweisbec@gmail.com> - 2015-09-01 17:00 +0200
    [tip:sched/urgent] nohz:   Assert existing housekeepers when nohz full enabled tip-bot for Frederic Weisbecker <tipbot@zytor.com> - 2015-09-02 18:00 +0200
  [PATCH 1/2] nohz: Affine unpinned timers to housekeepers Frederic Weisbecker <fweisbec@gmail.com> - 2015-09-01 17:00 +0200
    RE: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers "Jiang, Yunhong" <yunhong.jiang@intel.com> - 2015-09-01 21:20 +0200
      Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers Frederic Weisbecker <fweisbec@gmail.com> - 2015-09-01 22:50 +0200
        Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-02 11:40 +0200
          Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-02 14:40 +0200
          RE: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers "Jiang, Yunhong" <yunhong.jiang@intel.com> - 2015-09-02 21:10 +0200
          Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-03 03:40 +0200
        Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers Luiz Capitulino <lcapitulino@redhat.com> - 2015-09-04 18:00 +0200
          Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers Frederic Weisbecker <fweisbec@gmail.com> - 2015-09-04 19:20 +0200
    [tip:sched/urgent] nohz: Affine unpinned timers to housekeepers tip-bot for Vatika Harlalka <tipbot@zytor.com> - 2015-09-02 18:00 +0200

csiph-web