> -----Original Message-----
> From: Plachno, Lukasz <lukasz.plac...@intel.com>
> Sent: Wednesday, July 19, 2023 9:48 AM
> To: linuxptp-devel@lists.sourceforge.net
> Cc: Kitszel, Przemyslaw <przemyslaw.kits...@intel.com>;
> richardcoch...@gmail.com; mac...@machnikowski.net; Keller, Jacob E
> <jacob.e.kel...@intel.com>; Plachno, Lukasz <lukasz.plac...@intel.com>
> Subject: [PATCH 2/2] ptp4l: Add description for setting kthreads priorities
> 
> As tx timestamp timeout is something multiple users encounter,
> provide information for configuring kthread priorities in manual
> for ptp4l where tx_timestamp_timeout is already described.
> 
> Signed-off-by: Lukasz Plachno <lukasz.plac...@intel.com>
> ---
>  ptp4l.8 | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/ptp4l.8 b/ptp4l.8
> index 09ff108af102..02143eec36a2 100644
> --- a/ptp4l.8
> +++ b/ptp4l.8
> @@ -1032,6 +1032,26 @@ to maintain the correct offset between UTC and PTP
> times. See
>  .BR phc2sys (8)
>  manual page for more details.
> 
> +.SH KTHREAD PRIORITY
> +
> +In case of following log:
> +.br
> +.I timed out while polling for tx timestamp
> +.I increasing tx_timestamp_timeout or increasing
> +.I kworker priority may correct this issue,
> +.I but a driver bug likely causes it
> +.br
> +one of possible causes is kworker processing timestamps being starved,
> +user might try manually increasing the priority of the kworker.
> +
> +Example for Intel E810 card:
> +.br
> +.I pgrep \-fl ice-ptp | cut \-f1 \-d' ' | xargs \-I {} sudo chrt \-r \-\-pid 
> 30 {}
> +
> +Each NIC driver assigns a different name for kworkers, in some cases
> +processing timestamps might not be using kworker at all. Also assigning
> +too high priority might lead to system becoming unstable.
> +

Strictly, drivers which make use of the kthread created by PTP stack would be 
uniform. The only reason ice doesn't do such is because of needing to operate 
on both ports which have a PTP clock and on ports which do not (due to its 
cross PF interaction). I think it would be good to mention that thread name as 
first, and have the example for ice separate since its more unique. I suppose 
this could be refactored to expose the kworker now that I think of it... Hmm.

These threads are named "ptp<N>" matching the PTP clock name, and since these 
are part of the standard PTP_1588_CLOCK interface, we should mention them first.

Thanks,
Jake

>  .SH SEE ALSO
>  .BR pmc (8),
>  .BR phc2sys (8)
> --
> 2.34.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to