From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759472AbcIMWwU (ORCPT ); Tue, 13 Sep 2016 18:52:20 -0400 Received: from mga11.intel.com ([192.55.52.93]:4007 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756789AbcIMWwT (ORCPT ); Tue, 13 Sep 2016 18:52:19 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,330,1470726000"; d="scan'208";a="1049867516" Date: Tue, 13 Sep 2016 15:52:18 -0700 From: "Luck, Tony" To: Dave Hansen Cc: Fenghua Yu , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Peter Zijlstra , Tejun Heo , Borislav Petkov , Stephane Eranian , Marcelo Tosatti , David Carrillo-Cisneros , Shaohua Li , Ravi V Shankar , Vikas Shivappa , Sai Prakhya , linux-kernel , x86 Subject: Re: [PATCH v2 07/33] x86/intel_rdt: Add support for Cache Allocation detection Message-ID: <20160913225217.GA4325@intel.com> References: <1473328647-33116-1-git-send-email-fenghua.yu@intel.com> <1473328647-33116-8-git-send-email-fenghua.yu@intel.com> <57D88052.60404@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57D88052.60404@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 13, 2016 at 03:40:18PM -0700, Dave Hansen wrote: > Are you sure you don't want to add RDT to disabled-features.h? You have > a config option for it, so it seems like you should also be able to > optimize some of these checks away when the config option is off. Makefile looks like this: obj-$(CONFIG_INTEL_RDT) += intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_schemata.o which seems to skip compiling all our code when the CONFIG option is off. Our hooks to generic code look like: +#ifdef CONFIG_INTEL_RDT +extern void rdtgroup_fork(struct task_struct *child); +extern void rdtgroup_exit(struct task_struct *tsk); +#else +static inline void rdtgroup_fork(struct task_struct *child) {} +static inline void rdtgroup_exit(struct task_struct *tsk) {} +#endif /* CONFIG_INTEL_RDT */ Does this disabled-features.h thing do something more? -Tony