From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7919535AC14 for ; Sun, 15 Mar 2026 17:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773596262; cv=none; b=dXTnGflZsDjDtyAACECZ/aYXeMkPBBPa40PeQhTXeVgXSqHLX9cSW50D0SFecDMtD0DedqmbNC6uiHI+gUrlxc3liNpkUKVKKFFZID83BZ7+p8d3pj+F0oonF6gsFNpKr/XTGtgdk3dUXT5GZcL6JORyTnl3HtvxeLm8gA7aMEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773596262; c=relaxed/simple; bh=S3dXxNJCx4acRNCg1w4yENmiBu/qwKD0SFkfXfV4eQw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type:Content-Disposition; b=CREQYAQsAlUMiFGUCKMOKRaC8fkooKTR5vA1oJNpmKQbTEeWhd+wF2k+0s6L1IjPC5aerQdrhv9oxXsjv/LUR5BiQhn2FPFITzzUtJTiFrZelfieWadOo6oB4KlzLugWaTF2bIfv/xqnrmjKKYHR20mTimXkb9KAci45g2cbBjU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kBNyqNZE; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kBNyqNZE" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4852e9ca034so34476265e9.2 for ; Sun, 15 Mar 2026 10:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773596260; x=1774201060; darn=vger.kernel.org; h=content-transfer-encoding:content-disposition:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=3yYNk160Sxp9/a10Ag7sfuG1cP+ZxZO0UiKhGgYxHE4=; b=kBNyqNZEBDg0XMqvUxdsHb+90WpCwjsSkbHvL3/6LB052rgQ2D/DxtIWNrATyaJq5t GHkCxrGkfPS4FJz3qyFHX4YFeoNzjHK+RTQP3iUKO4I7kf2+MJx/wlo2KwWDwr1j6R1U +5VYo4qNuQpYSjdXkiLwzz1dJFB2vJs85UuPvbZc9Rodrz+Th1OTC85Kqong89tVfbWc fNsBgwSKug2yYY7pdAOb7OuCGYGAvCZk0NipGBeKzYPll1hiDVcoXMlli6d+YF6sGrzo 38dsWVL7BIykYnZP6hISSS0dM305oaKDYXTqXEKs2YOzBLGwbGjPqSnXm1S3qdtGMV8M j3VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773596260; x=1774201060; h=content-transfer-encoding:content-disposition:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3yYNk160Sxp9/a10Ag7sfuG1cP+ZxZO0UiKhGgYxHE4=; b=DR46N3qDZsSDZlahtVWWG3QUQPaVfE0dj/sSniHRXv5aQSHbUP+XkHpcPT+pdyO64/ 19O0SGfBwlYWkJxwJad/UB1gsOMWthx3jPt+4b72L7ZiPa/QRAmnqNieiCu5QZJqLI2A G9agdo63UKveW0gtsRKVrFNgKbIh4DYYqend0UVWAiSR0FZsxU0536H7Vc4UT1oXDU8g IiN6PKvsize3YJBSsCm5sTJNM141RNv60XM5jdD1JfFKApIma1RLUz5bz78B2O9GgctS /UXA2AVYAwBFwT+cBNu4Z2WypPKTRvW3Tx9HWgy7PuvZ6gDjEqKzppAGDREIt2Oi3aL9 r2og== X-Forwarded-Encrypted: i=1; AJvYcCXJWvQIqDW5mFkhaKrukc3OIvzzVVhKN6zA5llN+2noDc04nPijqpt6NTdgRxtBWbAyYFPp9A0XmfOmDD8=@vger.kernel.org X-Gm-Message-State: AOJu0YzqBeMam9cKvhp9L5UzfcCzbrnaEYMWysEhfVRPz8ElQfOikmEi p/hnCYGhTp6CcugplT8qlBPyQ1NN/U9Be3Hz2J6zIjrlqp00d9LErmTd X-Gm-Gg: ATEYQzxEz489xRQ3WCvV2B8/3tITFuMMtpwbbL2FU+4f7q7C4Odb9ugMUjOIvMBqni2 /La53vrQYyU/J06jiXbK+SyRftn66vl+Ye1aR7adfQ5JT/LUCeFXFU2kaUvCTNULcVB4n+gGm0R YHAqd/bAHLUZRkhySfI5KosTmQSOuFL0otf/xT92yl7h0cSLU3p0RX2JEzP4VyGGxd3Tcf1oedv g5rOlKAsMlhfBxKyx8mXtJb6QiYTmZtU/+YcGuRSHt/X7lusOCiTjwvdiYgp/kahCSgDA6EfRfV Buj3OkfJiIycqxTxyQnB7Le6GIzIIWppgZ7nifyVY5HD1zEidnmeCvJb07/xLJ4hn9MU6hju1R3 n+1bAbzMpDxmNf7HYR7+OquVTfLKXeh+jJcJFkce8SkAxa4hl3hnzsaWb5VMaSqGeTH7/ReZV+D Z7ivLDsWOgSBrF7bXXFzq9eu9JYPN9DOpYC5w= X-Received: by 2002:a05:600c:4689:b0:477:9b35:3e49 with SMTP id 5b1f17b1804b1-485566cf80dmr169209065e9.3.1773596259736; Sun, 15 Mar 2026 10:37:39 -0700 (PDT) Received: from WindFlash.powerhub ([2a0a:ef40:1b2a:fa01:9944:6a8c:dc37:eba5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b3d427457sm10797759f8f.3.2026.03.15.10.37.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2026 10:37:39 -0700 (PDT) From: Leonardo Bras To: "Vlastimil Babka (SUSE)" Cc: Leonardo Bras , Marcelo Tosatti , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Thomas Gleixner , Waiman Long , Boqun Feun , Frederic Weisbecker Subject: Re: [PATCH v2 2/5] Introducing qpw_lock() and per-cpu queue & flush work Date: Sun, 15 Mar 2026 14:37:29 -0300 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: <26662caf-de09-4f13-b374-dc7f879b7829@kernel.org> References: <20260302154945.143996316@redhat.com> <20260302155105.214878062@redhat.com> <26662caf-de09-4f13-b374-dc7f879b7829@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Mar 11, 2026 at 08:58:05AM +0100, Vlastimil Babka (SUSE) wrote: > On 3/2/26 16:49, Marcelo Tosatti wrote: > > Index: linux/Documentation/admin-guide/kernel-parameters.txt > > =================================================================== > > --- linux.orig/Documentation/admin-guide/kernel-parameters.txt > > +++ linux/Documentation/admin-guide/kernel-parameters.txt > > @@ -2840,6 +2840,16 @@ Kernel parameters > > > > The format of is described above. > > > > + qpw= [KNL,SMP] Select a behavior on per-CPU resource sharing > > + and remote interference mechanism on a kernel built with > > + CONFIG_QPW. > > + Format: { "0" | "1" } > > + 0 - local_lock() + queue_work_on(remote_cpu) > > + 1 - spin_lock() for both local and remote operations > > + > > + Selecting 1 may be interesting for systems that want > > + to avoid interruption & context switches from IPIs. > Requiring a new boot option is always a nuissance. The cpu isolation is > AFAIK difficult enough to setup already. Could the default be that qpw will > auto-enable if there are isolated cpus configured? The option could still be > useful for overriding that automatic decision to both 0 and 1 for testing > etc, but not requried for the expected usecase? I think it's okay, as something like this? (should work for nohz_full and isolcpus) ###### diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index 81bc8b329ef17..6c9052c28e3e4 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -170,20 +170,23 @@ static int __init housekeeping_setup(char *str, unsigned long flags) for_each_set_bit(type, &iter_flags, HK_TYPE_MAX) housekeeping_setup_type(type, housekeeping_staging); } if ((flags & HK_FLAG_KERNEL_NOISE) && !(housekeeping.flags & HK_FLAG_KERNEL_NOISE)) tick_nohz_full_setup(non_housekeeping_mask); housekeeping.flags |= flags; err = 1; + if (IS_ENABLED(CONFIG_QPW_DEFAULT)) + qpw_setup("1"); + free_housekeeping_staging: free_bootmem_cpumask_var(housekeeping_staging); free_non_housekeeping_mask: free_bootmem_cpumask_var(non_housekeeping_mask); return err; } ###### We would only have to be sure that this runs before cmdline parses qpw=?, so user could disable qpw if wanted. Would that work? Thanks! Leo