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


Groups > linux.kernel > #1232138 > unrolled thread

Re: [PATCH 3/3] sched: add_nr_running(): drop tick_nohz_full_cpu() check

Started byFrederic Weisbecker <fweisbec@gmail.com>
First post2015-09-24 16:50 +0200
Last post2015-09-24 17:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/3] sched: add_nr_running(): drop tick_nohz_full_cpu()  check Frederic Weisbecker <fweisbec@gmail.com> - 2015-09-24 16:50 +0200
    Re: [PATCH 3/3] sched: add_nr_running(): drop tick_nohz_full_cpu()  check Luiz Capitulino <lcapitulino@redhat.com> - 2015-09-24 17:00 +0200

#1232138 — Re: [PATCH 3/3] sched: add_nr_running(): drop tick_nohz_full_cpu() check

FromFrederic Weisbecker <fweisbec@gmail.com>
Date2015-09-24 16:50 +0200
SubjectRe: [PATCH 3/3] sched: add_nr_running(): drop tick_nohz_full_cpu() check
Message-ID<qcg0q-61m-5@gated-at.bofh.it>
On Thu, Sep 10, 2015 at 03:58:27PM -0400, Luiz Capitulino wrote:
> tick_nohz_full_kick_cpu() performs the same check.
> 
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
>  kernel/sched/sched.h | 20 +++++++++-----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 68cda11..102eb18 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -1323,17 +1323,15 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
>  #endif
>  
>  #ifdef CONFIG_NO_HZ_FULL
> -		if (tick_nohz_full_cpu(rq->cpu)) {
> -			/*
> -			 * Tick is needed if more than one task runs on a CPU.
> -			 * Send the target an IPI to kick it out of nohz mode.
> -			 *
> -			 * We assume that IPI implies full memory barrier and the
> -			 * new value of rq->nr_running is visible on reception
> -			 * from the target.
> -			 */
> -			tick_nohz_full_kick_cpu(rq->cpu);
> -		}
> +		/*
> +		 * Tick is needed if more than one task runs on a CPU.
> +		 * Send the target an IPI to kick it out of nohz mode.
> +		 *
> +		 * We assume that IPI implies full memory barrier and the
> +		 * new value of rq->nr_running is visible on reception
> +		 * from the target.
> +		 */
> +		tick_nohz_full_kick_cpu(rq->cpu);

Nope, we want to keep this because tick_nohz_full_cpu() does a static key check.
Most users don't care about nohz_full and I really want to keep nohz full off case
overhead to the bare minimum.

Thanks.

>  #endif
>  	}
>  }
> -- 
> 2.1.0
> 
--
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/

[toc] | [next] | [standalone]


#1232166

FromLuiz Capitulino <lcapitulino@redhat.com>
Date2015-09-24 17:00 +0200
Message-ID<qcga8-6cP-61@gated-at.bofh.it>
In reply to#1232138
On Thu, 24 Sep 2015 16:44:18 +0200
Frederic Weisbecker <fweisbec@gmail.com> wrote:

> On Thu, Sep 10, 2015 at 03:58:27PM -0400, Luiz Capitulino wrote:
> > tick_nohz_full_kick_cpu() performs the same check.
> > 
> > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> > ---
> >  kernel/sched/sched.h | 20 +++++++++-----------
> >  1 file changed, 9 insertions(+), 11 deletions(-)
> > 
> > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> > index 68cda11..102eb18 100644
> > --- a/kernel/sched/sched.h
> > +++ b/kernel/sched/sched.h
> > @@ -1323,17 +1323,15 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
> >  #endif
> >  
> >  #ifdef CONFIG_NO_HZ_FULL
> > -		if (tick_nohz_full_cpu(rq->cpu)) {
> > -			/*
> > -			 * Tick is needed if more than one task runs on a CPU.
> > -			 * Send the target an IPI to kick it out of nohz mode.
> > -			 *
> > -			 * We assume that IPI implies full memory barrier and the
> > -			 * new value of rq->nr_running is visible on reception
> > -			 * from the target.
> > -			 */
> > -			tick_nohz_full_kick_cpu(rq->cpu);
> > -		}
> > +		/*
> > +		 * Tick is needed if more than one task runs on a CPU.
> > +		 * Send the target an IPI to kick it out of nohz mode.
> > +		 *
> > +		 * We assume that IPI implies full memory barrier and the
> > +		 * new value of rq->nr_running is visible on reception
> > +		 * from the target.
> > +		 */
> > +		tick_nohz_full_kick_cpu(rq->cpu);
> 
> Nope, we want to keep this because tick_nohz_full_cpu() does a static key check.
> Most users don't care about nohz_full and I really want to keep nohz full off case
> overhead to the bare minimum.

Makes sense.

> 
> Thanks.
> 
> >  #endif
> >  	}
> >  }
> > -- 
> > 2.1.0
> > 
> 

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web