On Wed, Feb 21, 2018 at 04:26:06PM +0100, Oliver Westermann wrote:
> This work queue is handled by the phy_change() function (in phy.c), which
> in a subfunction retrieves the timestamp from the phy (this is the
> add_event call from the trace above). This is delayed by 4ms.

That code in phy.c is for the phy state machine.  It is not time
critical, and so using a work item is appropriate.

However your packet time stamps *are* time critical.  I wouldn't put
the time stamp code there.  You can't really increase the scheduling
priority of work queues.

We have a ready made kworker in ptp_clock.c.

                ptp->kworker = kthread_create_worker(0, worker_name ?
                                                     worker_name : info->name);

You can use that, and then set the priority of the kthread using chrt.

HTH,
Richard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to