Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755203Ab1CYVE0 (ORCPT ); Fri, 25 Mar 2011 17:04:26 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:39251 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755074Ab1CYVEZ (ORCPT ); Fri, 25 Mar 2011 17:04:25 -0400 Subject: Re: [RFC][PATCH 09/14] sched: Dynamically allocate sched_domain/sched_group data-structures From: Peter Zijlstra To: Venkatesh Pallipadi Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Anton Blanchard , Srivatsa Vaddagiri , Suresh Siddha , Paul Turner , Mike Galbraith , Thomas Gleixner , Heiko Carstens , Andreas Herrmann In-Reply-To: References: <20110314150613.749843433@chello.nl> <20110314152227.191956337@chello.nl> Content-Type: text/plain; charset="UTF-8" Date: Fri, 25 Mar 2011 22:06:23 +0100 Message-ID: <1301087183.2250.306.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1153 Lines: 27 On Fri, 2011-03-18 at 18:23 -0700, Venkatesh Pallipadi wrote: > > if (affine_sd) { > > - if (cpu == prev_cpu || wake_affine(affine_sd, p, sync)) > > - return select_idle_sibling(p, cpu); > > - else > > - return select_idle_sibling(p, prev_cpu); > > + if (wake_affine(affine_sd, p, sync)) > > + prev_cpu = cpu; > > + > > + new_cpu = select_idle_sibling(p, prev_cpu); > > + goto unlock; > > } > > > > while (sd) { > > This would result in going through wake_affine() doing all > effective_load stuff even with cpu == prev_cpu. No? > So, we need either if (cpu != prev_cpu && wake_affine(affine_sd, p, > sync)) or an check at the start to have want_affine=0 for this case. D'0h yeah, I missed the conditional execution of wake_affine there, silly me. -- 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/