mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Morse <james.morse@arm.com>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Fenghua Yu <fenghua.yu@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86/resctrl: Preserve CDP enable over cpuhp
Date: Fri, 14 Feb 2020 18:12:43 +0000	[thread overview]
Message-ID: <75bcb664-d840-96ed-c49f-34eefa010143@arm.com> (raw)
In-Reply-To: <1e1ee570-8deb-688e-1875-94b84eef7641@intel.com>

Hi Reinette,

On 13/02/2020 19:45, Reinette Chatre wrote:
> On 2/13/2020 9:42 AM, James Morse wrote:
>> On 12/02/2020 22:53, Reinette Chatre wrote:
>>> On 2/12/2020 10:53 AM, James Morse wrote:
>>>> mounted, and that cpus remember their CDP-enabled state over cpu
>>>> hotplug.
>>>>
>>>> This goes wrong when resctrl's CDP-enabled state changes while all
>>>> the cpus in a domain are offline.
>>>>
>>>> When a domain comes online, enable (or disable!) CDP to match resctrl's
>>>> current setting.

>> ... I think you're describing adding:

[...]

>> to rdtgroup.c and using that from core.c?
> 
> If I understand this correctly the CDP configuration will be done twice
> for each CDP resource, and four times for each CDP resource on a system
> supporting both L2 and L3 CDP. I think it is possible to do
> configuration once for each. Also take care on systems that support MBA
> that would not be caught by the first if statement. A system supporting
> MBA and CDP may thus attempt the configuration even more. It should be
> possible to use the resource parameter for a positive test and then just
> let the other resources fall through? Considering this, what do you
> think of something like below?
> 
> void rdt_domain_reconfigure_cdp(struct rdt_resource *r)
> {
> 	if (!r->alloc_capable)
> 		return;
> 
> 	if (r == &rdt_resources_all[RDT_RESOURCE_L2DATA])
> 		l2_qos_cfg_update(&r->alloc_enabled);
> 
> 	if (r == &rdt_resources_all[RDT_RESOURCE_L3DATA])
> 		l3_qos_cfg_update(&r->alloc_enabled);
> }

Sold!

(the !r->alloc_capable are already filtered out by the caller, but checking is the
least-surprise option)

I'll send a v2 shortly with your suggested-by. I'd like to keep the lockdep annotations as
the MPAM tree tries to stop the arch code taking the rdtgroup_mutex. Those patches
changing these annotations makes it nice and clear what is going on.



Thanks,

James

      reply	other threads:[~2020-02-14 18:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 18:53 James Morse
2020-02-12 22:53 ` Reinette Chatre
2020-02-13 17:42   ` James Morse
2020-02-13 19:45     ` Reinette Chatre
2020-02-14 18:12       ` James Morse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75bcb664-d840-96ed-c49f-34eefa010143@arm.com \
    --to=james.morse@arm.com \
    --cc=bp@alien8.de \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®