From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934463AbbEOTjA (ORCPT ); Fri, 15 May 2015 15:39:00 -0400 Received: from www.linutronix.de ([62.245.132.108]:42793 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933604AbbEOTi5 (ORCPT ); Fri, 15 May 2015 15:38:57 -0400 Date: Fri, 15 May 2015 21:39:05 +0200 (CEST) From: Thomas Gleixner To: Vikas Shivappa cc: vikas.shivappa@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, tj@kernel.org, peterz@infradead.org, matt.fleming@intel.com, will.auld@intel.com, peter.zijlstra@intel.com, h.peter.anvin@intel.com, kanaka.d.juvva@intel.com, mtosatti@redhat.com Subject: Re: [PATCH 4/7] x86/intel_rdt: Implement scheduling support for Intel RDT In-Reply-To: <1431370976-31115-5-git-send-email-vikas.shivappa@linux.intel.com> Message-ID: References: <1431370976-31115-1-git-send-email-vikas.shivappa@linux.intel.com> <1431370976-31115-5-git-send-email-vikas.shivappa@linux.intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 May 2015, Vikas Shivappa wrote: > struct rdt_subsys_info { > /* Clos Bitmap to keep track of available CLOSids.*/ > @@ -24,6 +30,11 @@ struct clos_cbm_map { > unsigned int clos_refcnt; > }; > > +static inline bool rdt_enabled(void) > +{ > + return static_key_false(&rdt_enable_key); So again, why this useless helper function for a single call site? > +static inline void intel_rdt_sched_in(void) > +{ > + if (rdt_enabled()) > + __rdt_sched_in(); > +} > +void __rdt_sched_in(void) > +{ > + struct task_struct *task = current; > + struct intel_rdt *ir; > + unsigned int clos; > + > + /* > + * This needs to be fixed > + * to cache the whole PQR instead of just CLOSid. > + * PQR has closid in high 32 bits and CQM-RMID in low 10 bits. > + * Should not write a 0 to the low 10 bits of PQR > + * and corrupt RMID. And why is this not fixed __BEFORE__ this patch? You can do the changes to struct intel_cqm_state in a seperate patch and then do the proper implementation from the beginning instead of providing a half broken variant which gets replaced in the next patch. Thanks, tglx