Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757953Ab3GWRVO (ORCPT ); Tue, 23 Jul 2013 13:21:14 -0400 Received: from mail-vc0-f179.google.com ([209.85.220.179]:64436 "EHLO mail-vc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756822Ab3GWRVN (ORCPT ); Tue, 23 Jul 2013 13:21:13 -0400 MIME-Version: 1.0 In-Reply-To: <20130723165319.GC27075@twins.programming.kicks-ass.net> References: <1374594257.5382.5.camel@localhost.localdomain> <20130723154736.GB27075@twins.programming.kicks-ass.net> <20130723165319.GC27075@twins.programming.kicks-ass.net> Date: Tue, 23 Jul 2013 23:21:12 +0600 Message-ID: Subject: Re: [PATCH, RFC] sched: update_top_cache_domain only at the times of building sched domain. From: Rakib Mullick To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1192 Lines: 37 On Tue, Jul 23, 2013 at 10:53 PM, Peter Zijlstra wrote: > On Tue, Jul 23, 2013 at 10:20:20PM +0600, Rakib Mullick wrote: > >> You mean using sd == NULL rather than using update_cache_domain variable ? > > Yes, note how: > > @@ -6109,7 +6110,7 @@ static void detach_destroy_domains(const struct cpumask *cpu_map) > > rcu_read_lock(); > for_each_cpu(i, cpu_map) > - cpu_attach_domain(NULL, &def_root_domain, i); > rcu_read_unlock(); > } > > Always has NULL for sd? Which means you can do: > > @@ -5138,7 +5138,8 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) > rcu_assign_pointer(rq->sd, sd); > destroy_sched_domains(tmp, cpu); > > - update_top_cache_domain(cpu); > + if (sd) > + update_top_cache_domain(cpu); > } > > /* cpus with isolated domains */ Okay, got it. Will submit an updated patch! Thanks Rakib. -- 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/