From: Petr Oros <poros@redhat.com>
To: Ivan Vecera <ivecera@redhat.com>, netdev@vger.kernel.org
Cc: Min Li <min.li@microchip.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
Richard Cochran <richardcochran@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] dpll: zl3073x: do not block DPLL callbacks while PTP ops wait
Date: Tue, 1 Dec 2026 09:42:38 +0100 [thread overview]
Message-ID: <f10f4595-2298-4a85-8aa7-dd532eaddc06@redhat.com> (raw)
In-Reply-To: <20261125154245.205758-1-ivecera@redhat.com>
On 11/25/26 4:42 PM, Ivan Vecera wrote:
> The PTP clock operations hold the channel lock while they wait for the
> device: up to 1 s for a pending ToD write to be applied on the next
> 1 Hz edge, up to 1 s for a previous TIE write and up to 3 s for a
> previous output phase step. The DPLL callbacks and the periodic state
> check of the channel take the same lock, so they wait as well. The DPLL
> callbacks wait under the global dpll_lock, which stalls the requests
> for all DPLL devices in the system.
>
> On a GNR-D system with a ZL30732, device-get requests for both DPLL
> channels and for a DPLL device of ice took 950 ms in median while
> settime() ran in a loop on the PTP clock of channel 0, and 2955 ms
> while adjtime() did output phase steps in NCO mode. With this change
> they take 2 ms in both cases.
>
> Only the PTP clock operations use the ToD, TIE and phase step
> registers. They need the channel lock only for the channel mode and
> the list of output pins.
>
> Serialize the PTP clock operations with a new per-channel ptp_lock and
> take the channel lock only to read the mode and the output pins and to
> issue a TIE write or the first phase step of an adjustment, which also
> steps the ToD. Wait for the previous TIE write or phase step before
> taking the channel lock, with tie_lock or phase_step_lock held, and
> check the mode again under it, so they are issued only in a mode that
> supports them. The phase steps for the other synthesizers move only
> the outputs and are issued in any mode, so all outputs get the same
> step even if the channel leaves NCO mode meanwhile. The lock order is
> ptp_lock, then tie_lock or phase_step_lock, then the channel lock.
>
Reviewed-by: Petr Oros <poros@redhat.com>
prev parent reply other threads:[~2026-12-01 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 15:42 [PATCH net v2] dpll: zl3073x: do not block DPLL callbacks while PTP ops wait Ivan Vecera
2026-12-01 8:42 ` Petr Oros [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f10f4595-2298-4a85-8aa7-dd532eaddc06@redhat.com \
--to=poros@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=min.li@microchip.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox