Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1429621lqh; Mon, 6 May 2024 07:32:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXthzMStiF1z0YQYYtENeMTrUB0AtGXrbf80Robob7E7jkOUH870nfdOVRfHIqzcVKWhKvA48vQdJMCd70TLmSq9rSy6nrpGVrEidY0+w== X-Google-Smtp-Source: AGHT+IEDt/gbcvDF8uHfPDwNT+I8o4k6soO0af9FVNLls52f9+0LvEXyb0VEYUONAjaHZ5KaS+EB X-Received: by 2002:a05:6a00:1907:b0:6f4:436d:fd1c with SMTP id y7-20020a056a00190700b006f4436dfd1cmr11983614pfi.16.1715005972989; Mon, 06 May 2024 07:32:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715005972; cv=pass; d=google.com; s=arc-20160816; b=a0NBOxomyf+2Fy8VcFjDN7jt/iFfnMY7bFuZLwqtHjHMAYB7n0ikETBS8rghNRo2pQ JwGNrP9natmwy+9eFh9/QMDq6uggufm8yNtVNh6KXdf79HUqLLK1cwtK4SZwqHHZUPJR 3dOpv7gfgjjZRnZpZXqFkfOaXAZvgFd7VLF/y8vBUfRFmISqw7qR/hrzwRSPBNTpl74R hOsSfpyKZ/uhC6hYkUfYQuWlvaQ4rSYOLVuvy/DWrfQjC023EsMpzBblBIrOQARpNv5b 4X5++NfhoEsJEwHaGtQ3VAMx3pNM2SxEVlsVRKHMbTK+czJKXQgOnNHVCKcSIN0WQXcD FkeQ== 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 :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=8RNjOYzfjfWWOz+mVPO4NC1Z3oW0pU1HAk6sk3HjlxM=; fh=WJCz135M68vD/8DYTnMQlNzWuueW2AJfGZ2dEOYOl8I=; b=pV3d8X4OeINnHjwZv2YPf/0nKsHkMtR2XDXPOvyLkUtYHG2fXKUnaGdu65FvkdYwos hPBCkMxqBUFZ9ZSnAhnIzLGHNIN3oKc9UocvdRrqn6V+0OQ4qlc7BvN1t5obU/3jO0eV sE01mAS0yh/IlUU2j/+hseDXerEIEExad0B+bYiM3HP/JcVxY0hBzzT+MooXs8DH5F/p mUqRBOH5a2kEHXXD6yBuEjupYwGmIZ3/IrSthXRegH2PZEm+M1JWk51VTR4NMH1B1BUv MbaW84uRICG4dWLKTs8mZe3+33wP61JEt1noYBK5rR5KAYE5qCChCXaFwARM1o7qZ4YP MQMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g6vWxl9z; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-169952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169952-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u184-20020a6379c1000000b005dc505aef9asi8169564pgc.354.2024.05.06.07.32.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 07:32:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g6vWxl9z; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-169952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169952-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6DFA4B22DDE for ; Mon, 6 May 2024 14:12:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EE5413C3D8; Mon, 6 May 2024 14:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="g6vWxl9z" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 7184B13BC1D for ; Mon, 6 May 2024 14:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715004728; cv=none; b=ZnC7a12M7R8FpJpWL7DvJ3dkFNWVFS7/pFMwI+AqeSEw2Xrv4PXmylrCasvbLKnEM+wyMwtnP7QtyWvmwXdvrx2jVQv8uof2oMeyx38xe40UadcNZrQrWXav6owE6cvUZFaUUJ4JhbAbFT95OnlwEsKfP5OcqNGjT4Ck4toCA3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715004728; c=relaxed/simple; bh=ThLfe4up5kK6vDGqsyUeVI6Q46LMoQLl5Y50PLa53uY=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=n+71yW2EcoHIY+S0XL0NXav5O+iRechz7CJZpPjkzDLQlEDgYfbUVRE7PQSCR6zSGkjqKh8JkN8kYeYXRZ4Y25+2QN0p03WBkPHy6oCz+2KXP49RfY54uznJJBSkOrDBiz18Y/fzKFoYV6DRsrE+5XFgQx9NFXgxMdwX4wnVpcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=g6vWxl9z; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715004725; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=8RNjOYzfjfWWOz+mVPO4NC1Z3oW0pU1HAk6sk3HjlxM=; b=g6vWxl9zIahgkaYob69Aq8q+K3E+5Q6+LFW4b3UDmw5SU34I+zY7FTkm8Lvgt60QLAUY9O TI0t9BhCAo/5MmfprQwriPzvyyFv9gF66VUct+uRvFF6fufiRzcWrWPSmW3LasGxqyheU9 B6TK+6HwV0ODMCnrZssMSfb8JyVZWCU= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-333-GR7tE4EFOYmb6oxDf0UtEA-1; Mon, 06 May 2024 10:12:04 -0400 X-MC-Unique: GR7tE4EFOYmb6oxDf0UtEA-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2e096468605so3044591fa.3 for ; Mon, 06 May 2024 07:12:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715004722; x=1715609522; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8RNjOYzfjfWWOz+mVPO4NC1Z3oW0pU1HAk6sk3HjlxM=; b=ufj9a+fjTsSgF0hoIfhnRH0btAdcfIb/fWMq2MJuIm1y4uMXg8y2J6rFPYvsavIrnQ EdIKHXCV6a0TVxOhb9Wy0BicAbxtoKM13uVD6yGQPNAYN0y1ORZqnDTbK3aD+11TPrbK +HzQHOAyrj+JQ3F8upG53Li9Y3sLqvIGuJO59qkXAJ3KUj4WTgpOlDB1PabovvL1HDC5 naaObdRciwYCE2MTGHOmKkrm06PsICO5J+/4ZbgtenBhFokWMxraRT3P+kUN3EBlwILE ZL9uWbikIgIxhuKLDVK7r0nNjXsuusLnm8c8JC21kcejA+47zG/2f2IXtdHgkAN/QDkf FUbA== X-Gm-Message-State: AOJu0Yx5jupxsNoMiX7/G0+E2SmY2CTh8CxgD59di7X1M7CELErabQB1 x2Ot7zfldbSPl4x2HF8fohhosmJEcMA3BYM4MfEFzwmXr2L+3jt7t6xBqjTaR6rCtX2PtBL7OJa 4hKEo/onEdKICbA2fpTbItnQ376eRg7YtcmnwoOW/8EAiRHSPzAP/xTLN66W+lA== X-Received: by 2002:a05:6512:32ac:b0:51f:103b:532b with SMTP id q12-20020a05651232ac00b0051f103b532bmr7337899lfe.3.1715004722623; Mon, 06 May 2024 07:12:02 -0700 (PDT) X-Received: by 2002:a05:6512:32ac:b0:51f:103b:532b with SMTP id q12-20020a05651232ac00b0051f103b532bmr7337871lfe.3.1715004722105; Mon, 06 May 2024 07:12:02 -0700 (PDT) Received: from gerbillo.redhat.com ([2a0d:3341:b09b:b810::f71]) by smtp.gmail.com with ESMTPSA id bd23-20020a05600c1f1700b0041bfb176a87sm20016866wmb.27.2024.05.06.07.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 07:12:01 -0700 (PDT) Message-ID: <7d46b465dd986bdf07330a7ed8d466674dec4859.camel@redhat.com> Subject: Re: [PATCH v2 net-next 00/15] locking: Introduce nested-BH locking. From: Paolo Abeni To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Boqun Feng , Daniel Borkmann , Eric Dumazet , Frederic Weisbecker , Ingo Molnar , Jakub Kicinski , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon Date: Mon, 06 May 2024 16:12:00 +0200 In-Reply-To: <20240506093828.OLP2KzcG@linutronix.de> References: <20240503182957.1042122-1-bigeasy@linutronix.de> <0d2eca9e80ae644583248a9e4a4bdee94999a8f8.camel@redhat.com> <20240506093828.OLP2KzcG@linutronix.de> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV8Hf8mUwubihiJB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SxN1nABoutHEO/N87fpIbpbZaIdinF7b9srwUvDOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-05-06 at 11:38 +0200, Sebastian Andrzej Siewior wrote: > On 2024-05-06 10:43:49 [+0200], Paolo Abeni wrote: > > On Fri, 2024-05-03 at 20:25 +0200, Sebastian Andrzej Siewior wrote: > > > Disabling bottoms halves acts as per-CPU BKL. On PREEMPT_RT code with= in > > > local_bh_disable() section remains preemtible. As a result high prior > > > tasks (or threaded interrupts) will be blocked by lower-prio task (or > > > threaded interrupts) which are long running which includes softirq > > > sections. > > >=20 > > > The proposed way out is to introduce explicit per-CPU locks for > > > resources which are protected by local_bh_disable() and use those onl= y > > > on PREEMPT_RT so there is no additional overhead for !PREEMPT_RT buil= ds. > >=20 > > Let me rephrase to check I understood the plan correctly. > >=20 > > The idea is to pair 'bare' local_bh_{disable,enable} with local lock > > and late make local_bh_{disable,enable} no ops (on RT). > >=20 > > With 'bare' I mean not followed by a spin_lock() - which is enough to > > ensure mutual exclusion vs BH on RT build - am I correct? >=20 > I might have I misunderstood your rephrase. But to make it clear: > > $ git grep -p local_lock\( kernel/softirq.c > > kernel/softirq.c=3Dvoid __local_bh_disable_ip(unsigned long ip, unsigne= d int cnt) > > kernel/softirq.c: local_lock(&softirq_ctrl.lock); >=20 > this is what I want to remove. This is upstream RT only (not RT queue > only). !RT builds are not affected by this change. I was trying to describe the places that need the additional local_lock(), but I think we are on the same page WRT the overall semantic. > >=20 > > Note that some callers use local_bh_disable(), no additional lock, and > > there is no specific struct to protect, but enforce explicit > > serialization vs bh to a bunch of operation, e.g. the > > local_bh_disable() in inet_twsk_purge(). > >=20 > > I guess such call site should be handled, too? >=20 > Yes but I didn't find much. inet_twsk_purge() is the first item from my > list. On RT spin_lock() vs spin_lock_bh() is the first item from my > list. On RT spin_lock() vs spin_lock_bh() usage does not deadlock and > could be mixed. >=20 > The only resources that can be protected by disabling BH are per-CPU > resources. Either explicit defined (such as napi_alloc_cache) or > implicit by other means of per-CPU usage such as a CPU-bound timer, > worker, =E2=80=A6. Protecting global variables by disabling BH is broken = on SMP > (see the CAN gw example) so I am not too worried about those. > Unless you are aware of a category I did not think of. I think sometimes the stack could call local_bh_enable() after a while WRT the paired spin lock release, to enforce some serialization - alike what inet_twsk_purge() is doing - but I can't point to any specific line on top of my head. A possible side-effect you should/could observe in the final tree is more pressure on the process scheduler, as something alike: local_bh_disable() local_bh_enable() could results in more invocation of the scheduler, right?=20 Cheers, Paolo