From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 32ACA4611E8 for ; Fri, 22 May 2026 14:25:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779459916; cv=none; b=RI1926pfmX4EAOh1WCyGjzuhdTjDUXHj3HdImFKUr+8JAcOVesOeJ8TIuH58+J1f8tlTNCPzfUvJl2uubV3KtkR6m6fYI5N3bHBVEZvrNHiSEFosdFsjNn/eC+9dcvt+PJvCJTRdGr1aicKKwwafdyiXF4Quvcr6LwRk2BSk8qI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779459916; c=relaxed/simple; bh=o1uLb24XiK/DUQEvRtLuhOSA8VlQzKQXtkejsO6Yk/Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gzxSDCT8jJVPlZ5p7rTsRpAM/aTfkiAOFHUd4NUZQxPYU5uusqNdDKxfQLTWa1C2FmfV1mBlPBRKCr9Nk2nMbyZC+ixeLnuxAsma7M0BsPkdg1QcXRaXut2ehGtPL3S9lk6sUD9bcDHQBvFH0h6yn+veri5pCmgCSuihnV79KJM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xbvpi87u; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=gwk0yGPI; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xbvpi87u"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gwk0yGPI" Date: Fri, 22 May 2026 16:25:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1779459913; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o1uLb24XiK/DUQEvRtLuhOSA8VlQzKQXtkejsO6Yk/Y=; b=xbvpi87u8YZQFlm5qz+aQ/q+fvwxnata205lAwzMUfa9SVXvTxLcq0K0KSGJvWYjipXINJ C4bVTRWR5iTs0MHi4o0ibTfMJdPbIA947j59O7GGYQjZpZ3etsGjJLWVDgaMJkhhmlL5du 6XcFR3SvIUnRVyjtLx6Fmk0K1A/iCV7/1Rr3iAoIiYFRYBhTLDOtURqMGMMEduJmAhb5jZ 907mipF4xtejvGEbFJ5UDFZwykzInXZ/2HUqHSjDBJ8UCmmRQPYkibhDcnMzqqfN3nZJjs pz7HnJMjcIRJLDCQMqXS8XOIBNxabcy0+c6VYXQv0WFP9wiUzocPPesn5hvNaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1779459913; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o1uLb24XiK/DUQEvRtLuhOSA8VlQzKQXtkejsO6Yk/Y=; b=gwk0yGPInR0qf3t8aiBXK8Rt4dawPKd9VAnqb+FdMGcTbqSkJ8CG+MlaIUsV7HNda3xOJN hcVgHCw613Y6O1Dg== From: Sebastian Andrzej Siewior To: Michael Byczkowski Cc: Rodolfo Giometti , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/3] pps: pps-gpio: split IRQ handler into hardirq and threaded parts Message-ID: <20260522142512.aXmXwoH8@linutronix.de> References: <719A31CE-CA58-45C3-A013-1BFE81F724C5@by-online.de> 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-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: On 2026-04-25 19:19:19 [+0200], Michael Byczkowski wrote: > On PREEMPT_RT, all IRQ handlers are force-threaded. The current > pps_gpio_irq_handler captures the PPS timestamp via pps_get_ts() > inside the handler, but on RT this runs in thread context =E2=80=94 after > a scheduling delay that adds variable latency (jitter) to the > timestamp. >=20 > Split the handler into a hardirq primary (pps_gpio_irq_hardirq) > that only captures the timestamp, and a threaded handler > (pps_gpio_irq_thread) that processes the event. With > request_threaded_irq(), the primary handler runs in hardirq context > even on PREEMPT_RT, preserving nanosecond timestamp precision. >=20 > On non-RT kernels, request_threaded_irq with an explicit primary > handler behaves identically to the previous request_irq call. No sure if this is wrong wording or so. You end up with a primary handler in hardirq context and a threaded handler. So have both with and without PREEMPT_RT. But the change makes sense. > Signed-off-by: Michael Byczkowski > Acked-by: Rodolfo Giometti > Tested-by: Michael Byczkowski > Tested-by: Calvin Owens Sebastian