Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2514209rdb; Mon, 12 Feb 2024 07:19:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpsvxErQ4tWaV0ncdr2A9h/1F3e9uF4lpKQvtzAhrz2a4jE87QOqTu21fLxrk0zYc0bCUn X-Received: by 2002:a05:6402:2707:b0:561:8535:766e with SMTP id y7-20020a056402270700b005618535766emr3659775edd.41.1707751168036; Mon, 12 Feb 2024 07:19:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707751168; cv=pass; d=google.com; s=arc-20160816; b=SOLvWd17x4HdTZ7dMDpqQAFiiAA6P3SsQ/iD1fJtKxvS6OBxwBSaHIroGCVP7g7mMx 2u8nHqGq5oD/f1QvQGqzYg76VQ8g9Cpnc+L1JhmSwPGiHN8oPawA0RqtUv4HuoojOX4n GHSg1CaWMs4+EjsNo+hbsdCAs6177xSyJ0e/ryIzahKyhH8B0fH39qfxXTtTK4VDyzfs vzgixsKjZE+joAaWzH2aBpLbH+K5XPk4R5QeUU7ADuwRY8LDZn198TJdFgSIjrKWo70E D7glz0e2IedENzE4kbElPlYcgLIK9OAkoUlDMbLYD+i417MbemDlCd1O9RVIWFr4v4QH h6Ww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=UyXyo1etyHMz/yg/tu7sBloltjY/h+rwAvfUJRR+na8=; fh=oiukEund3TspUcc7hFeGr2NpiVSlUfDha/NuIT7YDKQ=; b=O8pit5z4EOBOVdCJH73I3ExZzkS+6CPrtSicTQM0WPYcMTAk+jB7P7wngJ6a4qf/K+ /wkeor5NYp1w7qW6hQqQZsrTVm7pjbApI0L0ka4uL1l5t17Wnu+WB3sCUcAosMn3dePk 0nVaVR3ZuB6dXjoQR5LDrf7FU1Www8xER3NqZEM9ZW78iC7G+dorpLZyW6TF6jntVygm +tzIaDPmfjNnQw1BeAtBjBYUz1TEYJLnPAxcBVOlCGTRL96tBW6Nbh7Kl0QmlY7L8lX4 fSYXd3wZHb9O1t74o6sEDlOAo+B347aJKGrSghrpQ/WElPBfK3NzzWGZiQo2nXNt4wHB wiYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=V6p6bOXR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=1Ep3TZrj; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-61882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61882-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCU1P08Cvau8MhywtaVEMqxMF0+BmLATgaLLdEpBsHFE//73XQZFcRg0Kuv0fVsOlHOwYRKlWf8RPCF/B9MLWktGr6Hy0Q872WSJ8LAMdQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w20-20020a056402269400b0056177d63f7bsi2413277edd.620.2024.02.12.07.19.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=V6p6bOXR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=1Ep3TZrj; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-61882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61882-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C449D1F22959 for ; Mon, 12 Feb 2024 15:19:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA91B3C478; Mon, 12 Feb 2024 15:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="V6p6bOXR"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1Ep3TZrj" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E02936B08 for ; Mon, 12 Feb 2024 15:19:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707751163; cv=none; b=qerOXb8uzqeTASa8+s/PpUj/BBFndULEwsrOQA7AqnwD44tPx55Bg+ehUbxlzeKGhU+o6qsde5dHtS2KQgl5P4qm4jakVIoV4iYOAwer52L3kCvMt9UItV0Z3mynd9HHX7sQ95GqUrvgq+hBFIzUQu9ms7Jg3VGfQ7UhPnhavkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707751163; c=relaxed/simple; bh=+6mEziMxrgwQlUT5m/369TQaV/jXSqr2KuRfkgVOLr4=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:MIME-Version: Content-Type; b=b7SuSFAkPprNosf9gfHwEM9wpg1bvnG2KNtOppNbt/NoxBOg2hA4AxMt1crmSkOaYXatGsF0R7ukCoc+niWbLqdJigtQ2JOguOLdhcnR8ZP4kor/oC8ik1El0DOAlRFSSPlGpcdfP3VsSJknpYqOJJDfAPNdC+MGYHEdDHe2cqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=V6p6bOXR; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1Ep3TZrj; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707751159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=UyXyo1etyHMz/yg/tu7sBloltjY/h+rwAvfUJRR+na8=; b=V6p6bOXRiHiANMPQzZhVdmc/USqLcsQ9MGJk7DFfTQFodbmU8z+sgWFwHfsuBEvWitwNeX 3hzQN9GT9qKUznVXT73BFbbtIPTWLbSoYyatPheti/cOeJgLBLUQskdgMgOjOzogDSUxux 0yqomKqwH9VP++cdBQd609Uo9nsNPSSs6EkJTOucdeC7xHhzbxEHjEgRTH6HiGLlXj32C5 4hMXDO8vxggNMJ2PQJgV+85QlZYJU7DotLALYp6hiF3+H8nu+oYnS3OcET4ARKd2yE15+s NJxo01b/9dW+OFs+O5sjpSzSZzjnrXTk9msGpsQae0AsBJDEVky3Ibd6He/mhg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707751159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=UyXyo1etyHMz/yg/tu7sBloltjY/h+rwAvfUJRR+na8=; b=1Ep3TZrj7qzddX3YeYp1AVBoK6lOW0kT0Sn8NNOWpaVg4S8pVTJWKMSrljl4Fg9eG3eg6+ CG2BKl+sBDLWhxBg== To: Marcelo Tosatti , linux-kernel@vger.kernel.org Cc: Daniel Bristot de Oliveira , Juri Lelli , Valentin Schneider , Frederic Weisbecker , Leonardo Bras , Peter Zijlstra , Marcelo Tosatti Subject: Re: [patch 11/12] x86/resctrl: use smp_call_function_single_fail In-Reply-To: <20240206185710.116221062@redhat.com> Date: Mon, 12 Feb 2024 16:19:19 +0100 Message-ID: <87zfw5k8w8.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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 > > 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 > #include > #include > +#include > > #include > > @@ -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