Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp522028rdb; Thu, 22 Feb 2024 10:39:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUYx8tQ8+EQrHDX97+DbuViOxzVAkKn7j4O4LbMFa0M4krxkpc5b+lbvsDcwIeMTcoxUWqNtHGGxPVIWOTD6mLMduvqlayUAdUbhKRKwQ== X-Google-Smtp-Source: AGHT+IHgNg6VdwRa0aBm/fCpz3v4J+uj00c/7foXqWF1yf06jy65vwy5Jz3syV4K8a1011a554k9 X-Received: by 2002:a17:903:264f:b0:1dc:42da:bad with SMTP id je15-20020a170903264f00b001dc42da0badmr3789191plb.62.1708627171308; Thu, 22 Feb 2024 10:39:31 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jv11-20020a170903058b00b001da17ce989dsi10605589plb.278.2024.02.22.10.39.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 10:39:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77143-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@redhat.com header.s=mimecast20190719 header.b=eXh++oq4; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-77143-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 035E128835D for ; Thu, 22 Feb 2024 18:39:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51FEB13BAF9; Thu, 22 Feb 2024 18:29:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eXh++oq4" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 F0A8513BAE2 for ; Thu, 22 Feb 2024 18:29:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708626555; cv=none; b=qyEDC3aEAtvZ5nptMtTfCFbRqvg2ID52buvMSM7PbdxKOBaXD1J/Rx67Oy8p0FfXhgg+3WFUDD2d4ndd7UKWB+dTShVun/u7KcAfdolUuPACk0HFp+RZfqvaVSxtM5VHHRKnwpgod7B5lIAd3u9Rg+sa2IYY6GnoNgCEZ2gn1zE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708626555; c=relaxed/simple; bh=eLoDaQ5497vWFnwGoufOSzIwFNqonoZsFTnjZb28mwc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Q3wMShyJZuZrVkJ54YuWWIeN3OyGo5Q9+jJruQqBS9Psm2uVcB3bEm4jTGtvnnw0755FkciAc5ttiW0GoGQzkGZ/Fo/8PwPe7YHCrGtBUK6FrSeVZQIdtnClgQ+MUZu+m6PieXiCncXHZj+9QbESSABbYh98tNFrGwj5nGNPgR0= 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=eXh++oq4; arc=none smtp.client-ip=170.10.133.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=1708626552; 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: in-reply-to:in-reply-to:references:references; bh=Vr8Yn1Cpu8PQZblyo7wqABSOEVcJb2+/02KvtI4t3EE=; b=eXh++oq4/Te0G6UJlSqbhECU4UC+OF7NTb+CQiYmwMTjlPR0+Rm28RF3szhiJ/H/JfLWa5 awH3lc9/bYWL1/clR3GGSLM50KRC+L1vsAs+dzzTcACXzHcsKZa/IZNIsOhUW/TTJvc9W5 0Vt6+s5jBWxEUPQb3G87d7sC6WhvPzQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-472-GzxCAY4_N0yjQ7_gGkJu6Q-1; Thu, 22 Feb 2024 13:29:09 -0500 X-MC-Unique: GzxCAY4_N0yjQ7_gGkJu6Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 29FE828EA6F8; Thu, 22 Feb 2024 18:29:09 +0000 (UTC) Received: from tpad.localdomain (unknown [10.96.133.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E5355200B436; Thu, 22 Feb 2024 18:29:08 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 2D740400E4EBE; Thu, 22 Feb 2024 14:52:11 -0300 (-03) Date: Thu, 22 Feb 2024 14:52:11 -0300 From: Marcelo Tosatti To: Willem de Bruijn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jakub Kicinski , Eric Dumazet , Frederic Weisbecker , Valentin Schneider Subject: Re: [PATCH] net/core/dev.c: enable timestamp static key if CPU isolation is configured Message-ID: References: <65d7640c7983b_2bd671294c3@willemb.c.googlers.com.notmuch> 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 In-Reply-To: <65d7640c7983b_2bd671294c3@willemb.c.googlers.com.notmuch> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 On Thu, Feb 22, 2024 at 10:11:08AM -0500, Willem de Bruijn wrote: > Marcelo Tosatti wrote: > > 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 > > IPIs to isolated CPUs. > > This refers to SOF_TIMESTAMPING_RX_SOFTWARE, not SOF_TIMESTAMPING_OPT_TX_SWHW. > See also sock_set_timestamping. Willem, This test program does trigger the static key change: int main (void) { int option = SOF_TIMESTAMPING_OPT_TX_SWHW; int sock_fd; int ret; int pid_fd; pid_t pid; char buf[50]; .. /* set the timestamping option * this is to trigger the IPIs that notify all cpus of the change */ if (setsockopt(sock_fd, SOL_SOCKET, SO_TIMESTAMP, &option, sizeof (option)) < 0) { printf("Could not enable timestamping option %x", (unsigned int)option); close(sock_fd); return 0; } ..