From: Thomas Gleixner <tglx@linutronix.de>
To: Marcelo Tosatti <mtosatti@redhat.com>, linux-kernel@vger.kernel.org
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>,
Juri Lelli <juri.lelli@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
Frederic Weisbecker <frederic@kernel.org>,
Leonardo Bras <leobras@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [patch 11/12] x86/resctrl: use smp_call_function_single_fail
Date: Mon, 12 Feb 2024 16:19:19 +0100 [thread overview]
Message-ID: <87zfw5k8w8.ffs@tglx> (raw)
In-Reply-To: <20240206185710.116221062@redhat.com>
On Tue, Feb 06 2024 at 15:49, Marcelo Tosatti wrote:
> Convert update_task_closid_rmid from smp_call_function_single
> to smp_call_func_single_fail, which will fail in case
> the target CPU is tagged as block interference CPU.
You fail again to provide a rationale for this change.
What's worse is that you fail to explain why you think that creating
inconistent state is a valid approach.
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
> Index: linux-isolation/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> ===================================================================
> --- linux-isolation.orig/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> +++ linux-isolation/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> @@ -26,6 +26,7 @@
> #include <linux/slab.h>
> #include <linux/task_work.h>
> #include <linux/user_namespace.h>
> +#include <linux/sched/isolation.h>
>
> #include <uapi/linux/magic.h>
>
> @@ -551,12 +552,20 @@ static void _update_task_closid_rmid(voi
> resctrl_sched_in(task);
> }
>
> -static void update_task_closid_rmid(struct task_struct *t)
> +static int update_task_closid_rmid(struct task_struct *t)
> {
> - if (IS_ENABLED(CONFIG_SMP) && task_curr(t))
> - smp_call_function_single(task_cpu(t), _update_task_closid_rmid, t, 1);
> - else
> + int idx, ret = 0;
> +
> + if (IS_ENABLED(CONFIG_SMP) && task_curr(t)) {
> + idx = block_interf_srcu_read_lock();
> + ret = smp_call_function_single_fail(task_cpu(t),
> + _update_task_closid_rmid,
> + t, 1);
> + block_interf_srcu_read_unlock(idx);
> + } else
> _update_task_closid_rmid(t);
> +
> + return ret;
This is invoked _after_ the change has been committed to the in-memory
state so how is failing here correct?
Thanks,
tglx
next prev parent reply other threads:[~2024-02-12 15:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 18:49 [patch 00/12] cpu isolation: infra to block interference to select CPUs Marcelo Tosatti
2024-02-06 18:49 ` [patch 01/12] cpu isolation: basic block interference infrastructure Marcelo Tosatti
2024-02-06 18:49 ` [patch 02/12] introduce smp_call_func_single_fail Marcelo Tosatti
2024-02-06 18:49 ` [patch 03/12] Introduce _fail variants of stop_machine functions Marcelo Tosatti
2024-02-06 18:49 ` [patch 04/12] clockevent unbind: use smp_call_func_single_fail Marcelo Tosatti
2024-02-07 11:55 ` Thomas Gleixner
2024-02-07 12:51 ` Marcelo Tosatti
2024-02-11 8:52 ` Thomas Gleixner
2024-02-14 18:58 ` Marcelo Tosatti
2024-02-06 18:49 ` [patch 05/12] timekeeping_notify: use stop_machine_fail when appropriate Marcelo Tosatti
2024-02-07 11:57 ` Thomas Gleixner
2024-02-07 12:58 ` Marcelo Tosatti
2024-02-08 15:23 ` Thomas Gleixner
2024-02-09 15:30 ` Marcelo Tosatti
2024-02-12 15:29 ` Thomas Gleixner
2024-02-06 18:49 ` [patch 06/12] perf_event_open: check for block interference CPUs Marcelo Tosatti
2024-02-06 18:49 ` [patch 07/12] mtrr_add_page/mtrr_del_page: " Marcelo Tosatti
2024-02-06 18:49 ` [patch 08/12] arm64 kernel/topology: use smp_call_function_single_fail Marcelo Tosatti
2024-02-06 18:49 ` [patch 09/12] AMD MCE: use smp_call_func_single_fail Marcelo Tosatti
2024-02-06 18:49 ` [patch 10/12] x86/mce/inject.c: fail if target cpu is block interference Marcelo Tosatti
2024-02-06 18:49 ` [patch 11/12] x86/resctrl: use smp_call_function_single_fail Marcelo Tosatti
2024-02-12 15:19 ` Thomas Gleixner [this message]
2024-02-14 18:59 ` Marcelo Tosatti
2024-02-06 18:49 ` [patch 12/12] x86/cacheinfo.c: check for block interference CPUs Marcelo Tosatti
2024-02-07 12:41 ` Thomas Gleixner
2024-02-07 13:10 ` Marcelo Tosatti
2024-02-07 13:16 ` Marcelo Tosatti
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=87zfw5k8w8.ffs@tglx \
--to=tglx@linutronix.de \
--cc=bristot@kernel.org \
--cc=frederic@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=leobras@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=peterz@infradead.org \
--cc=vschneid@redhat.com \
/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