From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966277AbcIHKbp (ORCPT ); Thu, 8 Sep 2016 06:31:45 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:43451 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965016AbcIHKbo (ORCPT ); Thu, 8 Sep 2016 06:31:44 -0400 Date: Thu, 8 Sep 2016 12:29:05 +0200 (CEST) From: Thomas Gleixner To: Fenghua Yu cc: "H. Peter Anvin" , Ingo Molnar , Tony Luck , 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 16/33] x86/intel_rdt: Class of service and capacity bitmask management for CDP In-Reply-To: <1473328647-33116-17-git-send-email-fenghua.yu@intel.com> Message-ID: References: <1473328647-33116-1-git-send-email-fenghua.yu@intel.com> <1473328647-33116-17-git-send-email-fenghua.yu@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Sep 2016, Fenghua Yu wrote: > Add support to manage CLOSid(CLass Of Service id) and capacity > bitmask(cbm) for code data prioritization(CDP). I manage to understand that. > Closid management includes changes to allocating, freeing closid and > closid_get and closid_put and changes to closid availability map during > CDP set up. But this is just a random sequence of word, function names and a reference to the availability map which is not touched at all in this patch. > CDP has a separate cbm for code and data. > +/* > + * When cdp mode is enabled, refcnt is maintained in the dcache_cbm entry. Sorry. I really cannot figure out what that means. > + */ > static inline void closid_get(u32 closid) > { > - struct clos_cbm_table *cct = &cctable[closid]; > + struct clos_cbm_table *cct = &cctable[DCBM_TABLE_INDEX(closid)]; > > lockdep_assert_held(&rdtgroup_mutex); > > @@ -139,7 +155,7 @@ static int closid_alloc(u32 *closid) > static inline void closid_free(u32 closid) > { > clear_bit(closid, cconfig.closmap); > - cctable[closid].cbm = 0; > + cctable[DCBM_TABLE_INDEX(closid)].cbm = 0; > > if (WARN_ON(!cconfig.closids_used)) > return; > @@ -149,7 +165,7 @@ static inline void closid_free(u32 closid) > > static void closid_put(u32 closid) > { > - struct clos_cbm_table *cct = &cctable[closid]; > + struct clos_cbm_table *cct = &cctable[DCBM_TABLE_INDEX(closid)]; So if CDP is disabled we look at table[closid] and if it's enabled we look at table[closid << 1]. What is managing the interleaved entries in the table? Thanks, tglx