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


Groups > linux.kernel > #1439187 > unrolled thread

Re: get_nohz_timer_target?

Started byThomas Gleixner <tglx@linutronix.de>
First post2016-07-08 11:10 +0200
Last post2016-07-08 19:00 +0200
Articles 3 — 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: get_nohz_timer_target? Thomas Gleixner <tglx@linutronix.de> - 2016-07-08 11:10 +0200
    Re: get_nohz_timer_target? Frederic Weisbecker <fweisbec@gmail.com> - 2016-07-08 14:00 +0200
      Re: get_nohz_timer_target? Thomas Gleixner <tglx@linutronix.de> - 2016-07-08 19:00 +0200

#1439187 — Re: get_nohz_timer_target?

FromThomas Gleixner <tglx@linutronix.de>
Date2016-07-08 11:10 +0200
SubjectRe: get_nohz_timer_target?
Message-ID<rSzXj-2G5-15@gated-at.bofh.it>
On Mon, 18 Apr 2016, Richard Cochran wrote:
> Looking at kernel/sched/core.c:get_nohz_timer_target(), I don't
> understand the change made in:
> 
>     commit 9642d18eee2cd169b60c6ac0f20bda745b5a3d1e
>     Author: Vatika Harlalka <vatikaharlalka@gmail.com>
>     Date:   Tue Sep 1 16:50:59 2015 +0200
>     nohz: Affine unpinned timers to housekeepers
> 
> After that change, the code now reads like this:
> 
> 	int i, cpu = smp_processor_id();
> 	struct sched_domain *sd;
> 
> 	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) && is_housekeeping_cpu(cpu)) {
> --------------------------------------------------------------- ^^^
> Was this supposed to be 'i' instead?

Yes. Care to send a patch?

Thanks,

	tglx

[toc] | [next] | [standalone]


#1439362

FromFrederic Weisbecker <fweisbec@gmail.com>
Date2016-07-08 14:00 +0200
Message-ID<rSCBQ-4i1-11@gated-at.bofh.it>
In reply to#1439187
On Fri, Jul 08, 2016 at 11:05:58AM +0200, Thomas Gleixner wrote:
> On Mon, 18 Apr 2016, Richard Cochran wrote:
> > Looking at kernel/sched/core.c:get_nohz_timer_target(), I don't
> > understand the change made in:
> > 
> >     commit 9642d18eee2cd169b60c6ac0f20bda745b5a3d1e
> >     Author: Vatika Harlalka <vatikaharlalka@gmail.com>
> >     Date:   Tue Sep 1 16:50:59 2015 +0200
> >     nohz: Affine unpinned timers to housekeepers
> > 
> > After that change, the code now reads like this:
> > 
> > 	int i, cpu = smp_processor_id();
> > 	struct sched_domain *sd;
> > 
> > 	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) && is_housekeeping_cpu(cpu)) {
> > --------------------------------------------------------------- ^^^
> > Was this supposed to be 'i' instead?
> 
> Yes. Care to send a patch?

Ah this got fixed already: 444969223c81c7d0a95136b7b4cfdcfbc96ac5bd
("sched/nohz: Fix affine unpinned timers mess")

Thanks.

> 
> Thanks,
> 
> 	tglx

[toc] | [prev] | [next] | [standalone]


#1439678

FromThomas Gleixner <tglx@linutronix.de>
Date2016-07-08 19:00 +0200
Message-ID<rSHi9-7nn-3@gated-at.bofh.it>
In reply to#1439362
On Fri, 8 Jul 2016, Frederic Weisbecker wrote:
> On Fri, Jul 08, 2016 at 11:05:58AM +0200, Thomas Gleixner wrote:
> > On Mon, 18 Apr 2016, Richard Cochran wrote:
> > > Looking at kernel/sched/core.c:get_nohz_timer_target(), I don't
> > > understand the change made in:
> > > 
> > >     commit 9642d18eee2cd169b60c6ac0f20bda745b5a3d1e
> > >     Author: Vatika Harlalka <vatikaharlalka@gmail.com>
> > >     Date:   Tue Sep 1 16:50:59 2015 +0200
> > >     nohz: Affine unpinned timers to housekeepers
> > > 
> > > After that change, the code now reads like this:
> > > 
> > > 	int i, cpu = smp_processor_id();
> > > 	struct sched_domain *sd;
> > > 
> > > 	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) && is_housekeeping_cpu(cpu)) {
> > > --------------------------------------------------------------- ^^^
> > > Was this supposed to be 'i' instead?
> > 
> > Yes. Care to send a patch?
> 
> Ah this got fixed already: 444969223c81c7d0a95136b7b4cfdcfbc96ac5bd
> ("sched/nohz: Fix affine unpinned timers mess")

Good. Though that patch misses a stable tag.

Thanks,

	tglx

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web