Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933667Ab3GWQUY (ORCPT ); Tue, 23 Jul 2013 12:20:24 -0400 Received: from mail-vc0-f180.google.com ([209.85.220.180]:63945 "EHLO mail-vc0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933104Ab3GWQUV (ORCPT ); Tue, 23 Jul 2013 12:20:21 -0400 MIME-Version: 1.0 In-Reply-To: References: <1374594257.5382.5.camel@localhost.localdomain> <20130723154736.GB27075@twins.programming.kicks-ass.net> Date: Tue, 23 Jul 2013 22:20:20 +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: 1587 Lines: 35 On Tue, Jul 23, 2013 at 10:09 PM, Rakib Mullick wrote: > On Tue, Jul 23, 2013 at 9:47 PM, Peter Zijlstra wrote: >> On Tue, Jul 23, 2013 at 09:44:17PM +0600, Rakib Mullick wrote: >>> Currently, update_top_cache_domain() is called whenever schedule domain is built or destroyed. But, the following >>> callpath shows that they're at the same callpath and can be avoided update_top_cache_domain() while destroying schedule >>> domain and update only at the times of building schedule domains. >>> >>> partition_sched_domains() >>> detach_destroy_domain() >>> cpu_attach_domain() >>> update_top_cache_domain() >>> build_sched_domains() >>> cpu_attach_domain() >>> update_top_cache_domain() >>> >> >> Does it really matter? > > Why should we do it twice? More importantly at the time of destroying > even though we know it'll be built again just few moment later. > >> >> >> This just makes the code uglier for no gain afaict. >> >> If you really need to do this, key off @sd == NULL or something. > > Sorry, would you please a bit more clearer? I can't pick what you're suggesting. You mean using sd == NULL rather than using update_cache_domain variable ? -- 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/