Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559755

Re: [PATCH 3/8] x86/intel_rdt/mba: Improvements to handle more RDT resources like MBA

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 3/8] x86/intel_rdt/mba: Improvements to handle more RDT resources like MBA
Date 2017-01-16 15:00 +0100
Message-ID <t0fZf-186-9@gated-at.bofh.it> (permalink)
References <sYaqZ-5m6-3@gated-at.bofh.it> <sYar0-5m6-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 10 Jan 2017, Vikas Shivappa wrote:
> This patch does some changes to get ready to handle more resources like
> Memory b/w allocation(MBA).
> 
> -Update the control registers only when user changes the controls(cbm for
> Cache resources and Mem b/w for memory). Hence not sending IPIs on all
> domains when user updates the control vals.
> -Introduce next_enabled_resource rather than looping through all
> resources while parsing each schemata line. The order of resources
> should be anyways the same as the root schemata.
> -Return error as soon as we detect a resource not entering all domain
> values in schemata rather than waiting till we parse all resources.

That looks all like reasonable optimizations and I have a hard time to
understand why this is a prerequisite for the bandwidth support.

And each of these changes is independent so they should be in seperate
patches.

> +/*
> + * Parameter r must be NULL or pointing to
> + * a valid rdt_resource_all entry.
> + * Points r to the next enabled RDT resource at the end.
> + */
> +#define next_enabled_rdt_resource(r)					\
> +do {									\
> +	if (!r)								\
> +		r = rdt_resources_all;					\
> +	else								\
> +		r++;							\
> +	for (; r < rdt_resources_all + RDT_NUM_RESOURCES; r++)		\
> +		if (r->enabled)						\
> +			break;						\
> +} while (0)


This is crap, really. What the heck is wrong with a proper function?

static struct rdt_resource *get_next_enabled_resource(struct rdt_resource *r)
{
	....

	return r;
}

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/8] x86/intel_rdt/mba: Improvements to handle more RDT resources like MBA Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-01-10 20:40 +0100
  Re: [PATCH 3/8] x86/intel_rdt/mba: Improvements to handle more RDT  resources like MBA Thomas Gleixner <tglx@linutronix.de> - 2017-01-16 15:00 +0100
    Re: [PATCH 3/8] x86/intel_rdt/mba: Improvements to handle more RDT  resources like MBA Shivappa Vikas <vikas.shivappa@intel.com> - 2017-01-18 02:00 +0100
      Re: [PATCH 3/8] x86/intel_rdt/mba: Improvements to handle more RDT  resources like MBA Thomas Gleixner <tglx@linutronix.de> - 2017-01-18 10:10 +0100

csiph-web