Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2622158rbb; Wed, 28 Feb 2024 07:33:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWzXfy6uLtV6tlaN8zKXDeIi6vZoapKgr4ZRKvKAJMTvtwom8nosC/+VDmXzqKapvcsQJPTfpjt41Y6B3T99aA2OK0Z+b9IgFmRhhrHSQ== X-Google-Smtp-Source: AGHT+IElz/lB1+bXqDC1PpXvhoy/Ik3Bxx5myhMYPtx0xtsCB3RFI/D8NDlU+t+FNg56lg96hLEh X-Received: by 2002:a05:620a:11ac:b0:787:b0ac:475b with SMTP id c12-20020a05620a11ac00b00787b0ac475bmr5825745qkk.7.1709134390028; Wed, 28 Feb 2024 07:33:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709134390; cv=pass; d=google.com; s=arc-20160816; b=xMCHFplnsbMAT14jvWz+hrFb+w2gWNXIgXZq+/X/tIqydYvxhf5x84YYdXMqet98Jc 9tQ/g9Lqrn2aO/9eVFMYEmtDyvAUkIKPLDIxEErVUGeG0jfIjtzHLBLOR5MfMoln0l3k AU2gaZQxt4Nh7Yxf7igq1DVCOli68nyfrVFT3aGfXMytu4rAA1cjXR3PKrBmY7HOPmk6 rNN/iuhVQQjBChvAgb9xsmeykAomqLedLz9X5Gm4bZ+YoIAwtTCdNZzvh3UwUtiKL+H0 biicqi4lQorOYmFyF6mVJAbbCcbNtCJuE47dtMwYcbRGVjTWOqg3f7SYnHDP/tJw5pne 8/Qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:from:date:dkim-signature; bh=KPdHn4gLfwbF9NBUo162FC73q3tXtmG68jirZU3UGyE=; fh=ZPG6wGLkW+f1YLwvMoGXVb+jf4qATwubpFMfpLq7ZUY=; b=lVAa/DkOHWAUMYqBmMNHRmILFeZc4IWtgLoDH0bYhIY9cQZX42+wGq3Yc2UnW21OQ0 glVim4jS5VmetlakE7S9gh/RZubwmlzwGenFH5tSDN8FFz0fOI3W9NeNbPxCR/LcQwcH D3F+K71cxUiSWvKDKLuN15SyABkTondSw/cav9cpESBtTxWNVJgkPDKaOv+mCrvNRL96 V5zUypmp0CR0S6qyXraL0Y/58kQZiJdXh75+sAWc/JdX5Ct6Wkz9Guh47TmepkU0egWB 1YW2KfUbIUtpqBqNrdJcevQ/T1ksdq1JLdNampkLdrg75mzB11sPevNBenvI0QimYy0r V3FA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Zi2m/Hfe"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-85264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vw3-20020a05620a564300b00787f168e94dsi1255615qkn.222.2024.02.28.07.33.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 07:33:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Zi2m/Hfe"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-85264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C56F91C228B6 for ; Wed, 28 Feb 2024 15:33:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5BE515CD59; Wed, 28 Feb 2024 15:33:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Zi2m/Hfe" Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 73CA42CCDF; Wed, 28 Feb 2024 15:32:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709134379; cv=none; b=JfYFHcLy82oxqj9MVGSdnw2UpoFVVEK647jQMkQ7yzBLoeB1KbC9OgnGWYA5oGQTzWKnFYsVTLkvfL0M7s52de95+mTnIc6A/DhqL52vkyqEAfGTBNdBPbunQm+vPcNJxXx+c8cFCw0z+8uydbdRHTMElBHMgPOvFttGs0S1fGk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709134379; c=relaxed/simple; bh=eMOXCVDBo6+1DuKmb5bWVTwZLMGsk/p0Tc8klb/hjMs=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: Mime-Version:Content-Type; b=R2ES3xsgjHXPMMQYiEG6eniBtXWW9ZSkMT411MyycVsPl0kXu528x3NkiVbkOJrElBfHMT8wDWN2YDjYH2cfVVs9OE4+gnNj66rfAjXnFdTGJ2oUCruCkV+cO3GqsqU3PlaZ7KxPAaj4D0IKYWspLTmsg4IiUXMnCoI2xAP48RY= 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=Zi2m/Hfe; arc=none smtp.client-ip=209.85.219.49 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 Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-6900f479e3cso26096636d6.0; Wed, 28 Feb 2024 07:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709134377; x=1709739177; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=KPdHn4gLfwbF9NBUo162FC73q3tXtmG68jirZU3UGyE=; b=Zi2m/HfefMFUFaUZ1Ok/mc64Mi6OxLr+xP5k5gyko36hpcr4nc4Rt5I5a/TYpkyChf ZRoHD8CAXtIQWkcrHA3Aziz1i5JEwKSjmCCIABuUa9b2SfNzgw0MCb7HnnN8n0+SXwGg iRUOEfACdivYp16Fl75nw9WRoiu+QBKFJkhkBH9F1DUy/Dua3vdyaKGRykt6prnBiIKO vQO69RT8oc/pwoFIxY6VfgKdtWqGmYr8V7BmpSVMLyBZJSKh+03HfmLaysT/O9va/kwh Y5cSguR0QatQm66Y5ItuXEafZFvJYxmBJ+G+kgnoKpip7/WsfCTuq8cCvE5pGn1zYghw PpHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709134377; x=1709739177; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KPdHn4gLfwbF9NBUo162FC73q3tXtmG68jirZU3UGyE=; b=bcd5CnUASz2oWkmBAaDsWEqT/TWSW16u8V1hZpm+NBEkdnOBH/8aoUS1sd7rKCanb6 G8zM2WvcBD9NGBkl5IpkcZmW2C7uy+voH+HTiQRIV5fPhHgeoICN+mnJCXF3s+8l026O QAMjTYxnKkjYQv/Rzem5NclVydHyKNqsEocX+Axhn2ewTMuyfY4evczPTuO0wcRHMmE2 hMhfzwJrgR/kNA/IBSCtfQklVk5dnTpX9zlN7kW/4BshlO7CjvdVfoYfcDrQAm5Yz995 XRqpm9Ky212BZcsw9iO3ruEUj/pJIw280tqzwZF6GlR7Fs1pIJ27xffpJRkBB+XmAKOl d4kA== X-Forwarded-Encrypted: i=1; AJvYcCU4anYRuvILkEAvn8T+jtpMU8/mKCltTLfW5WoA79/k0z6jaOW4IuHfHzk3IRP21CRQgryDhVAULaGwvfjP627BymWtdEpmvusVyl0rkW2UTc5CSofIvbyaRGrgNj6RmMzzpN1G X-Gm-Message-State: AOJu0YxVK3qMaVZMyKbL7JfzwH6HeLSuTqMAlsM+YS2HjgPdDeAqlOug HB1tD25ppsrYBDeR7mD96iArHlprxlOXsxHsRexvYrxSh8yys3bj X-Received: by 2002:a0c:f144:0:b0:68f:3919:ebc2 with SMTP id y4-20020a0cf144000000b0068f3919ebc2mr6014087qvl.39.1709134377262; Wed, 28 Feb 2024 07:32:57 -0800 (PST) Received: from localhost (56.148.86.34.bc.googleusercontent.com. [34.86.148.56]) by smtp.gmail.com with ESMTPSA id ks30-20020a056214311e00b0068fa4534070sm5319436qvb.83.2024.02.28.07.32.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 07:32:56 -0800 (PST) Date: Wed, 28 Feb 2024 10:32:56 -0500 From: Willem de Bruijn To: Marcelo Tosatti , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Willem de Bruijn , Jakub Kicinski , Eric Dumazet , Frederic Weisbecker , Valentin Schneider , Paolo Abeni Message-ID: <65df52286736b_7162829478@willemb.c.googlers.com.notmuch> In-Reply-To: References: Subject: Re: [PATCH -v2 net-next] net/core/dev.c: enable timestamp static key if CPU isolation is configured 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=utf-8 Content-Transfer-Encoding: 7bit Marcelo Tosatti wrote: > > For systems that use CPU isolation (via nohz_full), creating or destroying > a socket with timestamping (SOCK_TIMESTAMPING_RX_SOFTWARE and > SOF_TIMESTAMPING_OPT_TX_SWHW) might cause a Again, SOF_TIMESTAMPING_OPT_TX_SWHW is irrelevant here. See Documentation/networking/timestamping.rst for a definition of the various flags. > static key to be enabled/disabled. This in turn causes undesired > IPIs to isolated CPUs. > > So enable the static key unconditionally, if CPU isolation is enabled, > thus avoiding the IPIs. > > Signed-off-by: Marcelo Tosatti > > --- > v2: mention SOF_TIMESTAMPING_OPT_TX_SWHW in the commit log (Willem de Bruijn / Paolo Abeni) I did not suggest that The subject line is slightly corrupted: net-next -v2 > > diff --git a/net/core/dev.c b/net/core/dev.c > index c588808be77f..15a32f5900e6 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -155,6 +155,7 @@ > #include > #include > #include > +#include > > #include "dev.h" > #include "net-sysfs.h" > @@ -11851,3 +11852,14 @@ static int __init net_dev_init(void) > } > > subsys_initcall(net_dev_init); > + > +static int __init net_dev_late_init(void) > +{ > + /* avoid static key IPIs to isolated CPUs */ > + if (housekeeping_enabled(HK_TYPE_MISC)) > + net_enable_timestamp(); > + > + return 0; > +} > + > +late_initcall(net_dev_late_init); >