From: Reinette Chatre <reinette.chatre@intel.com>
To: "Luck, Tony" <tony.luck@intel.com>,
Peter Newman <peternewman@google.com>,
"Yu, Fenghua" <fenghua.yu@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>,
"Babu Moger" <babu.moger@amd.com>,
James Morse <james.morse@arm.com>,
"Martin Kletzander" <nert.pinx@gmail.com>,
Shaopeng Tan <tan.shaopeng@fujitsu.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Eranian, Stephane" <eranian@google.com>
Subject: Re: [PATCH 2/2] x86/resctrl: Don't workqueue local event counter reads
Date: Tue, 5 Nov 2024 16:13:27 -0800 [thread overview]
Message-ID: <5ec7a1c1-43b1-4c18-9ba5-5cf4c42ba3f1@intel.com> (raw)
In-Reply-To: <SJ1PR11MB6083D1B48E48BBE797ACF21FFC522@SJ1PR11MB6083.namprd11.prod.outlook.com>
Hi Tony,
On 11/5/24 3:39 PM, Luck, Tony wrote:
>> I think this change already undoes the motivation for 09909e098113
>> ("x86/resctrl: Queue mon_event_read() instead of sending an IPI")? As you mention in
>> changelog the goal of that work was to enable resctrl_arch_rmid_read() to sleep.
>> This change will call resctrl_arch_rmid_read() with preemption disabled if
>> it happens to be called on CPU in monitoring domain. Would that not cause
>> MPAM monitor count reads from CPU in domain to be a bug?
>>
>> Could you please try out this patch with CONFIG_DEBUG_ATOMIC_SLEEP=y?
>
> How is this all going to look after the split into fs/resctrl and arch/* ?
Unclear to me at this point. Peter exposed an issue with current implementation
and this needs to be fixed. Since this involves preparatory work that impacts
systems currently supported we could also consider reverting to original behavior
and go back to drawing board with the preparatory work.
> Is the file system code going to have implementation choices that prevent
> performance sensitive users like Peter from optimizing monitor event
> reads by binding the monitor process to a CPU in the right domain
> to avoid IPI?
Apologies for not clearly stating it but I do agree that there is an issue
that needs to be fixed.
My response was not intended to be interpreted as a NACK but instead an attempt
to engage in discussion by pointing out that the proposed fix may not be ideal.
I tried out my own suggestion and indeed when just trying to mount resctrl
on x86 with this patch applied results in:
BUG: scheduling while atomic
I do not object to optimizing monitor event reads but the proposed fix
is not appropriate in its current form.
Reinette
next prev parent reply other threads:[~2024-11-06 0:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 14:25 [PATCH 1/2] selftests/resctrl: fastcat for benchmarking counter reads Peter Newman
2024-10-31 14:25 ` [PATCH 2/2] x86/resctrl: Don't workqueue local event " Peter Newman
2024-11-01 18:35 ` Luck, Tony
2024-11-04 22:36 ` Fenghua Yu
2024-11-04 22:56 ` Luck, Tony
2024-11-04 23:59 ` Fenghua Yu
2024-11-05 0:12 ` Luck, Tony
2024-11-05 3:29 ` Fenghua Yu
2024-11-05 11:25 ` Peter Newman
2024-11-05 23:20 ` Reinette Chatre
2024-11-05 23:39 ` Luck, Tony
2024-11-06 0:13 ` Reinette Chatre [this message]
2024-11-06 9:42 ` Peter Newman
2024-11-06 17:12 ` Luck, Tony
2024-11-06 15:52 ` Peter Newman
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=5ec7a1c1-43b1-4c18-9ba5-5cf4c42ba3f1@intel.com \
--to=reinette.chatre@intel.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nert.pinx@gmail.com \
--cc=peternewman@google.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.