From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 529F73D7D64 for ; Wed, 4 Mar 2026 21:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772660692; cv=none; b=ezGGZ1fEa5kjRsU2SuolPg68WNkBDAn2Z4bLM2csi8eCgivU9j7YlP3A2xvJKlVrWhF3qeLtuQvxEii5SsRORowL8cgpwsM+/hT4i0EQaJBPy1yqEsYPuFUKcQ8/ne7Nf/U1MPnUd5XB7pGV/dZVhlLouxY0ZGOUFvdVbtMu4ic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772660692; c=relaxed/simple; bh=PcS5mLYUPXAnbl7k8XF3V5byX4FCrBsPOJjd42WKHcU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZFm9h0sgchYtWHduDl3+44xAUsN4sDUBQEGXsD34TavkKiUekE3mSwuRJVpVxq2F8GvWOc5jPWwyOGH426fza+KRxXhTym97GR6EhqL8KEnsb2cc9+0azklnQ1D/GZ97qD7sCZJnF5aV+5RId2WLZHtgWoEv33qOvRlL8puNvtg= 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=AzFMEST3; arc=none smtp.client-ip=209.85.221.53 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="AzFMEST3" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-439aeed8a5bso4383381f8f.3 for ; Wed, 04 Mar 2026 13:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772660690; x=1773265490; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=XBHy4//B0BVAaOjPVplq/WDAKnGbN6ejMvGH72LFAkg=; b=AzFMEST3zuiFDQ4q+oM+1xG3cpv7N5NnhQoLYAVJZbptPl9Wg3idk5Ui6FYSOWNMYV Eb0rHpiheJyjtPz8w5cR5UmQKHo20ZRpcY2yizeXCMdIn2YZZG9ku8OpHm0zvryLqQSC 6ufiiDn3zoZZQ9/Mz9eOsPP8uom+O6Y0ivwXASh2Sw2+govhoT4oNgZdWUExYwaa+wQP GB3a5zFvK4CvdT1lUKmBK2gBbwe2T+C1KRr9U2+OXEBgMjuG2bIdhxQgGXbqgo/PeQvT uyyM6mAY9TzHHnNdW8P61hEpK+nDRx0Xuak1OmdmFTxIgvNJ4tI3h1xSXhwJQvMgnhWR A4Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772660690; x=1773265490; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XBHy4//B0BVAaOjPVplq/WDAKnGbN6ejMvGH72LFAkg=; b=wcBuV/bZy2D7WsuuiCN2mYV6OTybRN3DlDDgoAC3ybCuTTRDb1158SlshnOsgMP/JQ 3Cmn0JGt9TK7YlAiy8R4cH8Ojy1UUK28BVtV6Y5zpfRMcORTzke3/fn9QkewxPcNL+za RZgEAr0L5cDww1mDpaIV6Yr2dDLcitKul9AVxXp4RZByQ7wl1mX0COVXP/Y19RPo9BJl ZR3Gk+wO9qjTy/lLDTePPNHNFnNmvrW2UKNzerh4ctTdYjo2+7N54/35velt6l6grl1U 0C5IyQsRFe34kpwpI4oqIEyt+Hg2mWiqEZug4qxxmHVPKq+1N3NwKsCCxkdPE3+s4S8z aVNg== X-Forwarded-Encrypted: i=1; AJvYcCXBPjTYh195dlofClsg1xOQQsjoEhHDCNPZ6tm/zWUfwaZpGE+5pbavFOikvkkQFAhgpnmuRygocLU5hRI=@vger.kernel.org X-Gm-Message-State: AOJu0YxkdjKIjtw0QnYSpHAlYBwYyWmWucXD33A0NzrHHPiafuvFOxOf 48KtkwQdcmowaMiG26lqLcch7RY0vl5uIK+SpvkYcAgpDtJFrOIYPFQV X-Gm-Gg: ATEYQzwTMyaluCM9ujryrux5tnr0ms9862OIpPyA1Z8eCc3GHmn5bFNuQ6iby0k09RM UeLYB2fJ3xV0rRnmXOW0NkKjjI2JmRgF/cAKfkwCQjEvqFuLJARR/yNyOVXgawEgSKol+IoUZlQ p3Vb5FLJ5ZV5I2gaPTKATqq9pUQ2GeYL/ZMkbEZ3BzO3iorrnWghFJynUkLW3vgTonMZoUROMT9 joLfYLG8f7Pp4ILGZw/ltXjKhd5LTQPX9vBO1EuHu3f2N8be5491WdYtGuvzfontr8j0KeiR0MM tmJpT7bUcD5WzlasDbXT8RlqOPAD/QRiyIbVOxa+KgUJt71EInq9jV5Cu0jO7zX3/362lB2xAF9 qiYLYN6IQIIJy3njFryIbPCh7/rUQ61NHqg7P9eimQd9QJ1pbnu8EtyJJA/04Kt+oGlk8V5efG3 oTGcxrJKbvv+hIaDq6P6Ji0cX93zff82y53wUA1Y2hHM38Dmjoy9ZVA4iQ9ujDqGiI X-Received: by 2002:a05:600c:46d2:b0:483:b505:9db4 with SMTP id 5b1f17b1804b1-485198a3d0emr61675375e9.31.1772660689592; Wed, 04 Mar 2026 13:44:49 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4851883a012sm148720885e9.3.2026.03.04.13.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 13:44:49 -0800 (PST) Date: Wed, 4 Mar 2026 21:44:47 +0000 From: David Laight To: Steven Rostedt Cc: Peter Zijlstra , Yafang Shao , mingo@redhat.com, will@kernel.org, boqun@kernel.org, longman@redhat.com, mhiramat@kernel.org, mark.rutland@arm.com, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [RFC PATCH 1/2] locking: add mutex_lock_nospin() Message-ID: <20260304214447.3e5817ea@pumpkin> In-Reply-To: <20260304155742.7b4de2d1@gandalf.local.home> References: <20260304074650.58165-1-laoar.shao@gmail.com> <20260304074650.58165-2-laoar.shao@gmail.com> <20260304090249.GN606826@noisy.programming.kicks-ass.net> <20260304095415.4d5f2528@pumpkin> <20260304155742.7b4de2d1@gandalf.local.home> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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-Transfer-Encoding: 7bit On Wed, 4 Mar 2026 15:57:42 -0500 Steven Rostedt wrote: > On Wed, 4 Mar 2026 09:54:15 +0000 > David Laight wrote: > > > That might still be an issue if a high priority process is spinning. > > But a %sys spike doesn't imply a latency spike. > > > > Is this using the osq_lock.c code? > > That will have problems on overprovisioned VMs, it tries to find out > > whether the hypervisor has switched out - but ISTR that is flawed. > > > > In reality a spin lock shouldn't be held for long enough to cause > > any kind latency issue. > > So something in the code that reads the list of filter functions > > needs to be done differently so that the lock isn't held for as long. > > It's not a spinlock, it's an adaptive mutex which spins while the owner of > the mutex is also still running on the CPU. If the spinner CPU triggers a > NEED_RESCHED or the owner goes to sleep, the spinner stops spinning and > goes to sleep too. I think half my brain knew that - otherwise I wouldn't have mentioned the osq_lock.c code. That all reminded me I've a patch that optimises that code a bit. But I do remember thinking it ought to have a 'I been spinning long enough, time to sleep' path. David > > Honestly, this still looks like a non-issue or a corner case that I don't > think requires these changes. > > This looks like one of those "Patient: Doctor it hurts me when I do this. > Doctor: Then don't do that." cases. > > Why is a production system having multiple users cat > avaliable_filter_functions to begin with? > > -- Steve