From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EA60ECD6C7 for ; Wed, 11 Feb 2026 16:29:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 019BA411E5; Wed, 11 Feb 2026 16:29:49 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id IJpDYY3souto; Wed, 11 Feb 2026 16:29:48 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3D2AC40DA7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1770827388; bh=tQv05ILMKxllfl45z92SDOph56g77ozE9I5ricXOpDE=; h=Date:From:To:Cc:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=esjOjeCnQmYUQIHR33QHzSGzuteAnXl7mrk7QwhHTNImlg2HPstXKCQYhhZcMcukf 1BZCTcNNFnM8L0x1STbQ39mNA7ZTw5FYuxSQ9mVAzV+jVsZ07ZuU1gv4tIkswrRCSZ rpMomJqyCIVTLTjQYrs47ivh4p/G2gKnqBzJUGKk+iWk8JjpXogc0JUZf6oIdLbYjg IEf0No1KOS785nhURrZ6a0bmcCzeftAa1OESGwH3P96PdeSfDWT/WckdFgK2ndGhMU X1a/z1RzerkDJ5LV7f83t6JQvQv2F858g4PO5R7XWpzPAKS8oJQ6okpjeQUhEga5X4 z0pJDQz7jz3bw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 3D2AC40DA7; Wed, 11 Feb 2026 16:29:48 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 8BB0CBE for ; Wed, 11 Feb 2026 16:29:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6F71740DA7 for ; Wed, 11 Feb 2026 16:29:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id R8OBw6QcJ0gl for ; Wed, 11 Feb 2026 16:29:46 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::112f; helo=mail-yw1-x112f.google.com; envelope-from=willemdebruijn.kernel@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 979AC40D92 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 979AC40D92 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by smtp4.osuosl.org (Postfix) with ESMTPS id 979AC40D92 for ; Wed, 11 Feb 2026 16:29:46 +0000 (UTC) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-796d0395828so3442557b3.2 for ; Wed, 11 Feb 2026 08:29:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770827385; x=1771432185; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tQv05ILM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Fal QedLOX10fBAAsKeXaesKf5xiQBy17aBfaGoNkADinW7QqvD+MpAAll00qgGzMcD8YreoOEjxM= X-Received: by 2002:a05:690c:6602:b0:794:d887:726e with SMTP id 00721157ae682-7952ab3c507mr154210237b3.57.1770827385211; Wed, 11 Feb 2026 08:29:45 -0800 (PST) Received: from gmail.com (21.33.48.34.bc.googleusercontent.com. [34.48.33.21]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-7966c16e7c6sm21293957b3.1.2026.02.11.08.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 08:29:44 -0800 (PST) Date: Wed, 11 Feb 2026 11:29:43 -0500 From: Willem de Bruijn To: Kurt Kanzenbach , Willem de Bruijn , Sebastian Andrzej Siewior , Willem de Bruijn Cc: Vadim Fedorenko , Willem de Bruijn , Jakub Kicinski , Paolo Abeni , Eric Dumazet , "David S. Miller" , "Loktionov, Aleksandr" , "Nguyen, Anthony L" , "Kitszel, Przemyslaw" , Paul Menzel , "Gomes, Vinicius" , "netdev@vger.kernel.org" , Richard Cochran , "linux-kernel@vger.kernel.org" , Andrew Lunn , "intel-wired-lan@lists.osuosl.org" , "Keller, Jacob E" Message-ID: In-Reply-To: <87qzqr5vos.fsf@jax.kurt.home> References: <20260205164341.pJvni8kA@linutronix.de> <76acd5cc-eb6f-4c56-a5e6-f6413736afbb@linux.dev> <601f0c4b-52d8-4b60-96bf-f2d65f8073d8@linux.dev> <20260209090621.GiZqTiMJ@linutronix.de> <8e762437-69f9-40d7-bb75-3a45bef1d5d6@linux.dev> <20260209114836.GPU-vnnh@linutronix.de> <78e2af2c-40e6-43f1-9471-42f350e69389@linux.dev> <20260210121207.9kLHroS0@linutronix.de> <87qzqr5vos.fsf@jax.kurt.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770827385; x=1771432185; darn=lists.osuosl.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=tQv05ILMKxllfl45z92SDOph56g77ozE9I5ricXOpDE=; b=Xcles/uvv25nGkmxWBuYPvxPhkchIZQhmc3V8bxuefy6Rgvbn0OtCjLQ+nTxAsY0tn LWdfF0+hj+ViUbYMK6/fYg4c2YvmObg9onRZGen8hQNuDXKdFSeReppNE63Bri/mCJLJ tlMTA0m5x+p+jo3Po0JsOMtva4aqrboEAfJsIU7IBI5/49K1B5jUT3D7tzRbtRMFZIo9 CJ9/toOAHqjxEl/9euly/RFcYXbhmqvUUDMw4l1jw1nghezCymE1rpUdC5w+IEflqBy+ T53tJWHoIyBWm7YZ4NQXpIetA4V8OLo471h45rHIy+aExsZ6igelQH6+YUFNZbkSCFAd e8tw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Xcles/uv Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3] igb: Retrieve Tx timestamp directly from interrupt for i210 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Kurt Kanzenbach wrote: > On Tue Feb 10 2026, Willem de Bruijn wrote: > > The core issue seems to be that the ptp_tx_work is not scheduled > > quickly enough. I wonder if that is the issue to be fixed. When/why > > is this too slow? > > The igb driver uses schedule_work() for the Tx timestamp retrieval. That > means the ptp_tx_work item is queued to the kernel-global workqueue. In > case there is load on the system, the kworker which handles ptp_tx_work > might be delayed too much, which results in ptp4l timeouts. > > Easy solution would be to tune the priority/affinity of the > kworker. However, we have to figure which kworker it is. Furthermore, > this kworker might handle other things as well, which are not related to > igb timestamping at all. Therefore, tuning the priority of the kworker > is not practical. > > Moving the timestamping in IRQ looked like a good solution, because the > device already signals that the Tx timestamp is available now. No need > to schedule any worker/work at all. So, it'd be very nice if > skb_tstamp_tx() could be called from IRQ context. BTW other drivers like > igc call this function in IRQ context as well. > > Alternative solution for igb is to move from schedule_work() to PTP AUX > worker. That is a dedicated PTP worker thread called ptpX, which could > handle the timestamping. This can be easily tuned with taskset and > chrt. However, there's one difference to the kworker approach: The > kworker always runs on the same CPU, where the IRQ triggered, the AUX > worker not necessarily. This means, Miroslav needs to be aware of this > and tune the AUX worker for his NTP use cases. > > I hope, that makes the motivation for this patch and discussion clear. It does thanks. I think we should look at the locking. It is not clear to me that sk_callback_lock needs to be held here at all. >From the lock documentation itself its use is more limited. sk->sk_socket->file is indeed dereferenced elsewhere without holding such locks. sk_capable is another indication.