Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934103AbdCJWDt (ORCPT ); Fri, 10 Mar 2017 17:03:49 -0500 Received: from mga11.intel.com ([192.55.52.93]:14880 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932789AbdCJWDo (ORCPT ); Fri, 10 Mar 2017 17:03:44 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,143,1486454400"; d="scan'208";a="58795219" Date: Fri, 10 Mar 2017 14:04:36 -0800 (PST) From: Shivappa Vikas X-X-Sender: vikas@vshiva-Udesk To: Thomas Gleixner cc: Vikas Shivappa , vikas.shivappa@intel.com, linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, andi.kleen@intel.com Subject: Re: [PATCH 5/8] x86/intel_rdt: info file support for MBA prepare In-Reply-To: Message-ID: References: <1487361535-9727-1-git-send-email-vikas.shivappa@linux.intel.com> <1487361535-9727-6-git-send-email-vikas.shivappa@linux.intel.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1538 Lines: 54 On Wed, 1 Mar 2017, Thomas Gleixner wrote: > On Fri, 17 Feb 2017, Vikas Shivappa wrote: > >> As a preparatory patch to MBA info file setup, generalize the info file >> setup to have the option to choose between different set of files. >> Although multiple cache resources have same info files, Memory resources >> have different set of info files. That way we have the option to choose >> between memory resource and cache resource info files. > > Sigh. > >> @@ -77,6 +77,8 @@ struct rftype { >> * @default_ctrl: Specifies default cache cbm or mem b/w percent. >> * @min_cbm_bits: Minimum number of consecutive bits to be set >> * in a cache bit mask >> + * @info_files: resctrl info files for the resource >> + * @infofiles_len: Number of info files > > len == length, nr == number. No? Too intuitive, right? Took it as len as the rdtgroup_add_files calls its parameter as len.. Will fix to nr_infofiles as that seems better. > > And no, not infofiles_nr. It wants to be nr_infofiles. And while at it > please either use infofiles or info_files, but not a mixture of > both. Random underscores are not enhancing readability at all. > >> +void rdt_get_cache_infofile(struct rdt_resource *r) >> +{ >> + r->info_files = &res_cache_info_files[0]; > > What's wrong with > > r->info_files = res_cache_info_files; > > Nothing, but it would be too easy to read. This is not the obfuscated > c-code contest. Will fix.. Thanks, Vikas > >> + r->infofiles_len = ARRAY_SIZE(res_cache_info_files); > > Thanks, > > tglx >