From nobody Sat Feb 7 13:41:39 2026 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 EE77A12C7FB for ; Fri, 16 Feb 2024 15:02:54 +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=1708095777; cv=none; b=Km6koc1UUq0I6cpzPdKBchO1uDb5MqYTPwDQYTN7bb+JxZ2lf2dX+KkAoC3l38083R/TQ/7UmOAHpPHEbyl3nqZ7HpNthz3vSvW7BqIiwnwvUbagaNj6U8qpk3GQgdGGkZrmThJNiv/2zrO5dfaF9omIBlEBJ+X4FSeID7Wgreo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708095777; c=relaxed/simple; bh=GqVjIc3Y9GJCrVy/nye5izgJbw3sIDygaE+0C7huDFg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=kA20wpgxmszgwj3IbS1hNtO7AHufvJo9QrR0u1qBBw8ABNw7f6p9clrswY1CUP0lp5Ly5OweCKnWbcAil56qdmU3oja53OpsI+zqRo3IRDd0seqYgwCqb05loULvyauMGXnZUBP5donCMFtc3EhAdRfxAzB73t2wUHjoUgR0YUM= 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=Y+i/G1OA; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Y+i/G1OA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708095773; 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; bh=aZ1RnOnTSLBiglbkhX1NHskWW94OsYikvhSwmo5Uu90=; b=Y+i/G1OAhEhbfjjwzvvNOl/sHLxJfT+AtT3zfVECWlDpHoBeEjeZ0LsD2XsxS+batTiLHw OowJj+qZRPXBDWHqLqiIEiiqMX1kub07CGUCuoeOZfejL0UtWjWIAtV/fFan9WMrEjF0C7 qS1LLY7+iYmD2R19V8Wd8PevVklB/OY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-329-W3BTSf1FMa6m6Uev6EHpOg-1; Fri, 16 Feb 2024 10:02:51 -0500 X-MC-Unique: W3BTSf1FMa6m6Uev6EHpOg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F014684AE4A; Fri, 16 Feb 2024 15:02:50 +0000 (UTC) Received: from tpad.localdomain (unknown [10.96.133.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDB1240C9444; Fri, 16 Feb 2024 15:02:50 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id B80BE4086D5AC; Fri, 16 Feb 2024 12:02:15 -0300 (-03) Date: Fri, 16 Feb 2024 12:02:15 -0300 From: Marcelo Tosatti To: linux-kernel@vger.kernel.org Cc: Jakub Kicinski , Eric Dumazet , Frederic Weisbecker , Valentin Schneider Subject: [PATCH] net/core/dev.c: enable timestamp static key if CPU isolation is configured Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For systems that use CPU isolation (via nohz_full), creating or destroying a socket with timestamping (SOF_TIMESTAMPING_OPT_TX_SWHW) might cause a static key to be enabled/disabled. This in turn causes undesired=20 IPIs to isolated CPUs. So enable the static key unconditionally, if CPU isolation is enabled, thus avoiding the IPIs. Signed-off-by: Marcelo Tosatti diff --git a/net/core/dev.c b/net/core/dev.c index 0d548431f3fa..cc9a77b4aa4e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -153,6 +153,7 @@ #include #include #include +#include =20 #include "dev.h" #include "net-sysfs.h" @@ -11601,3 +11602,14 @@ static int __init net_dev_init(void) } =20 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);