Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757787Ab1CSBYI (ORCPT ); Fri, 18 Mar 2011 21:24:08 -0400 Received: from smtp-out.google.com ([74.125.121.67]:28557 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757043Ab1CSBYB convert rfc822-to-8bit (ORCPT ); Fri, 18 Mar 2011 21:24:01 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mSYU3QDGwRXkqMWTaf0ESiGj3xHNKJEFqHdI91Aods7OMx3p4+M2BQdWqpKqHld9PQ ZLI1Ys3vafXbMCVD6gTw== MIME-Version: 1.0 In-Reply-To: <20110314152227.191956337@chello.nl> References: <20110314150613.749843433@chello.nl> <20110314152227.191956337@chello.nl> Date: Fri, 18 Mar 2011 18:23:58 -0700 Message-ID: Subject: Re: [RFC][PATCH 09/14] sched: Dynamically allocate sched_domain/sched_group data-structures From: Venkatesh Pallipadi To: Peter Zijlstra 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 32 On Mon, Mar 14, 2011 at 8:06 AM, Peter Zijlstra wrote: > @@ -1721,10 +1724,11 @@ select_task_rq_fair(struct rq *rq, struc > ? ? ? ?} > > ? ? ? ?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. Overall patchset looks great! Thanks, Venki -- 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/