From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754394AbcGHJIO (ORCPT ); Fri, 8 Jul 2016 05:08:14 -0400 Received: from www.linutronix.de ([62.245.132.108]:48311 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754308AbcGHJIK (ORCPT ); Fri, 8 Jul 2016 05:08:10 -0400 Date: Fri, 8 Jul 2016 11:05:58 +0200 (CEST) From: Thomas Gleixner To: Richard Cochran cc: vatikaharlalka@gmail.com, Frederic Weisbecker , Preeti U Murthy , Ingo Molnar , LKML , Peter Zijlstra Subject: Re: get_nohz_timer_target? In-Reply-To: <20160418133709.GA10358@localhost.localdomain> Message-ID: References: <20160418133709.GA10358@localhost.localdomain> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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