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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 76749ECD6DA for ; Wed, 11 Feb 2026 18:54:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0C02A8102A; Wed, 11 Feb 2026 18:54:51 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id VtULQRHt-SLc; Wed, 11 Feb 2026 18:54:49 +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 smtp1.osuosl.org 36A1F80ECC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1770836089; bh=pRaFhJt63dV4qDJigIGmoVP/O1i7rIuTA9/Er5lJpZ0=; h=Date:From:To:Cc:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QHBPwcpOx2vsRv4zQyw2LqsLeWduP2ipW7fV0AfyiF/hTh38xiIKvRXNCiHV/bIB7 a3baFS2hFehHaJXhbCzejX0OMDktnq2W6914GSiKdWlAy3J+16dDp0knZVwogJyv6y rX0MVNLDbH/eRaSGaZJwzAI6sjTG80CGwKJC10xcG6+mC8AV7e4woeGPRmfvYfSICB eUAS6JZcVaXGDuaOxUZOrKoo8Mec72QwQZ12ECw/yWMxNtwsfvIAh2cGQ8USkUB6K+ vmnTmBr0vJ3M8Jnq+W/pguZ20b3SOvGTafutJGtK+dWU2oVUF416eYgNgHfiiACJIv suEAaGTDQl/Kw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 36A1F80ECC; Wed, 11 Feb 2026 18:54:49 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 3657E1F6 for ; Wed, 11 Feb 2026 18:54:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 17E7A41B65 for ; Wed, 11 Feb 2026 18:54:48 +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 2s8y1OhV4ABB for ; Wed, 11 Feb 2026 18:54:47 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 4ECDC41B5F DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4ECDC41B5F Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4ECDC41B5F for ; Wed, 11 Feb 2026 18:54:47 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 3885660010; Wed, 11 Feb 2026 18:54:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29DC4C4CEF7; Wed, 11 Feb 2026 18:54:45 +0000 (UTC) Date: Wed, 11 Feb 2026 10:54:44 -0800 From: Jakub Kicinski To: Kurt Kanzenbach Cc: Willem de Bruijn , Sebastian Andrzej Siewior , Vadim Fedorenko , Willem de Bruijn , 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: <20260211105444.1e370abd@kernel.org> 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=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770836085; bh=bwCaj3+4l+nv+6bgxf4XJU2CWB0++YRNTmcoh/FySrs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UIn44EGPl5OkdSl5yJAa36h95nEdNJ9pFUNFqV7XgaMk1bozEbHB0Vm45KmR9mDah mRFxB4QnhcHQNDhxGzDQkgkDSmzSeWAI4qVYv+HseRO4YUfbr6nYboHJPx8/9PpgJK HDp9bXCBkPs7ilXbgQon3x/FhE/GdAV181ueeJpcnhQVdRRWpYc2ut20jykDIjNp3n yLkPdGKKdL+ZFCRWhB29POHVEd/KbUYxV/TCzg3or+D7ngPZvR8+yR5MSs5Vus8rc3 6ys9zdJJB2w0tvC9ZiDbQUJrlrtHBPQX4Kq2yoS8afA5aQBRMqR33Jbp2vPo4Wsaiw XLtYNdEWKFWtA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=UIn44EGP 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" On Wed, 11 Feb 2026 13:08:51 +0100 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. Are you concerned about the latency of delivering the TS to the user space app / socket? Or purely reading the TS out of the HW fifo to make space for another packet to be timestamped?