From: Ivan Vecera <ivecera@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Donald Hunter <donald.hunter@gmail.com>,
Eric Dumazet <edumazet@google.com>, Jiri Pirko <jiri@resnulli.us>,
Michal Schmidt <mschmidt@redhat.com>,
Paolo Abeni <pabeni@redhat.com>,
Pasi Vaananen <pvaanane@redhat.com>, Petr Oros <poros@redhat.com>,
Prathosh Satish <Prathosh.Satish@microchip.com>,
Simon Horman <horms@kernel.org>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 3/4] dpll: zl3073x: add per-DPLL serialization lock
Date: Thu, 4 Jun 2026 16:57:40 +0200 [thread overview]
Message-ID: <2960f14c-df57-4cb8-a7e5-4b715e475b13@redhat.com> (raw)
In-Reply-To: <20260603184046.4c834317@kernel.org>
On 6/4/26 3:40 AM, Jakub Kicinski wrote:
> On Sun, 31 May 2026 21:44:22 +0200 Ivan Vecera wrote:
>> Add a per-DPLL mutex that serializes all operations on a given DPLL
>> channel across DPLL netlink callbacks, the periodic kthread worker,
>
> Sounds like there are already two entities accessing the state?
> If so why is this not a fix?
Yes, but prior NCO pin implementation (patch 4) this was not a problem.
1. All DPLL callbacks are serialized by the DPLL subsys mutex and they
- read status and measurements from cache (ref, chan, out and synth)
- writes config into HW and cache
2. Periodic function
- reads config from cache (...)
- reads status and measurements from HW and writes to cache (...)
- emits notifications when something was changed
All accesses to cache objects' fields are atomic.
With patch 4 there is a change because at least df_offset can be written
by both (DPLL callback during switching or periodic function during
measurement). At this point it is reasonable and safe to do explicit
locking on DPLL level.
And the next series I have in my queue (that depends on this series)
introduces the PHC support into zl3073x and there will be a need to
serialize DPLL and PTP callbacks.
Thanks,
Ivan
next prev parent reply other threads:[~2026-06-04 14:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 19:44 [PATCH net-next v5 0/4] dpll: add NCO pin type and zl3073x support Ivan Vecera
2026-05-31 19:44 ` [PATCH net-next v5 1/4] dpll: add DPLL_PIN_TYPE_INT_NCO pin type Ivan Vecera
2026-06-04 1:50 ` Jakub Kicinski
2026-06-04 15:01 ` Ivan Vecera
2026-06-04 15:16 ` Jakub Kicinski
2026-06-04 16:42 ` Ivan Vecera
2026-06-08 11:33 ` Vadim Fedorenko
2026-06-08 15:30 ` Ivan Vecera
2026-06-09 10:24 ` Vadim Fedorenko
2026-06-09 15:09 ` Ivan Vecera
2026-06-09 11:06 ` Jiri Pirko
2026-06-29 10:53 ` Vadim Fedorenko
2026-06-08 14:43 ` Kubalewski, Arkadiusz
2026-06-08 15:48 ` Ivan Vecera
2026-06-08 17:03 ` Kubalewski, Arkadiusz
2026-06-09 8:51 ` Jiri Pirko
2026-06-09 14:00 ` Kubalewski, Arkadiusz
2026-06-09 14:58 ` Ivan Vecera
2026-06-10 13:04 ` Kubalewski, Arkadiusz
2026-06-10 15:45 ` Ivan Vecera
2026-06-11 12:09 ` Jiri Pirko
2026-06-15 12:00 ` Ivan Vecera
2026-06-17 11:59 ` Kubalewski, Arkadiusz
2026-06-19 17:07 ` Ivan Vecera
2026-06-22 14:47 ` Kubalewski, Arkadiusz
2026-06-23 10:37 ` Jiri Pirko
2026-06-24 15:57 ` Vadim Fedorenko
2026-06-24 16:42 ` Ivan Vecera
2026-06-25 8:45 ` Jiri Pirko
2026-06-29 9:36 ` Vadim Fedorenko
2026-05-31 19:44 ` [PATCH net-next v5 2/4] dpll: zl3073x: use per-operation poll timeouts Ivan Vecera
2026-05-31 19:44 ` [PATCH net-next v5 3/4] dpll: zl3073x: add per-DPLL serialization lock Ivan Vecera
2026-06-04 1:40 ` Jakub Kicinski
2026-06-04 14:57 ` Ivan Vecera [this message]
2026-06-04 1:51 ` Jakub Kicinski
2026-06-04 15:12 ` Ivan Vecera
2026-05-31 19:44 ` [PATCH net-next v5 4/4] dpll: zl3073x: add NCO virtual input pin Ivan Vecera
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=2960f14c-df57-4cb8-a7e5-4b715e475b13@redhat.com \
--to=ivecera@redhat.com \
--cc=Prathosh.Satish@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=pvaanane@redhat.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
all inboxes | Powered by JetHome®