Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756975AbYH3UjZ (ORCPT ); Sat, 30 Aug 2008 16:39:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754003AbYH3UjP (ORCPT ); Sat, 30 Aug 2008 16:39:15 -0400 Received: from E23SMTP06.au.ibm.com ([202.81.18.175]:57398 "EHLO e23smtp06.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752944AbYH3UjO (ORCPT ); Sat, 30 Aug 2008 16:39:14 -0400 Date: Sun, 31 Aug 2008 02:12:51 +0530 From: Vaidyanathan Srinivasan To: Peter Zijlstra Cc: Max Krasnyansky , Linux Kernel , Ingo Molnar , Gautham R Shenoy , Balbir Singh , Suresh B Siddha , Venkatesh Pallipadi , Gregory Haskins Subject: Re: sched_mc_power_savings broken with CGROUPS+CPUSETS Message-ID: <20080830204251.GB6124@dirshya.in.ibm.com> Reply-To: svaidy@linux.vnet.ibm.com Mail-Followup-To: Peter Zijlstra , Max Krasnyansky , Linux Kernel , Ingo Molnar , Gautham R Shenoy , Balbir Singh , Suresh B Siddha , Venkatesh Pallipadi , Gregory Haskins References: <20080829131514.GS4801@dirshya.in.ibm.com> <1220016237.17355.48.camel@twins> <48B85C44.6050901@qualcomm.com> <1220095613.8426.22.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1220095613.8426.22.camel@twins> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1860 Lines: 61 * Peter Zijlstra [2008-08-30 13:26:53]: [snipped] > > I don't think iterating the domains and setting the flag is sufficient. > Look at this crap (found in arch/x86/kernel/smpboot.c): > > cpumask_t cpu_coregroup_map(int cpu) > { > struct cpuinfo_x86 *c = &cpu_data(cpu); > /* > * For perf, we return last level cache shared map. > * And for power savings, we return cpu_core_map > */ > if (sched_mc_power_savings || sched_smt_power_savings) > return per_cpu(cpu_core_map, cpu); > else > return c->llc_shared_map; > } > > which means we'll actually end up building different domain/group > configurations depending on power savings settings. The above code helps a quad-core CPU to be treated as two dual core for performance when sched_mc_power_savings=0 and they will be treated as one quad core package if sched_mc_power_savings=1 since the power control (voltage control) is per quad core socket. On a dual socket machine with two quad core cpus, sched_mc_power_savings=0 will build: CPU0 attaching sched-domain: domain 0: span 0,2 level MC groups: 0 2 domain 1: span 0-7 level CPU groups: 0,2 1,5 3-4 6-7 while sched_mc_power_savings=1 will build: CPU0 attaching sched-domain: domain 0: span 0,2-4 level MC groups: 0 2 3 4 domain 1: span 0-7 level CPU groups: 0,2-4 1,5-7 Last level cache (llc_shared_map) is used to build this map differently based on power savings settings. Do you think such detailed documentation around this code will help? --Vaidy [snipped] -- 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/