netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/3] ice: lighter locking for PTP time reading
@ 2024-03-07 22:25 Michal Schmidt
  2024-03-07 22:25 ` [PATCH net-next v3 1/3] ice: add ice_adapter for shared data across PFs on the same NIC Michal Schmidt
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Michal Schmidt @ 2024-03-07 22:25 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: netdev, Jacob Keller, Jakub Kicinski, Jiri Pirko,
	Jesse Brandeburg, Arkadiusz Kubalewski, Karol Kolacinski

This series removes the use of the heavy-weight PTP hardware semaphore
in the gettimex64 path. Instead, serialization of access to the time
register is done using a host-side spinlock. The timer hardware is
shared between PFs on the PCI adapter, so the spinlock must be shared
between ice_pf instances too.

Replacing the PTP hardware semaphore entirely with a mutex is also
possible and you can see it done in my git branch[1], but I am not
posting those patches yet to keep the scope of this series limited.

[1] https://gitlab.com/mschmidt2/linux/-/commits/ice-ptp-host-side-lock-9

v3:
 - Longer variable name ("a" -> "adapter").
 - Propagate xarray error in ice_adapter_get with ERR_PTR.
 - Added kernel-doc comments for ice_adapter_{get,put}.

v2:
 - Patch 1: Rely on xarray's own lock. (Suggested by Jiri Pirko)
 - Patch 2: Do not use *_irqsave with ptp_gltsyn_time_lock, as it's used
   only in process contexts.

Michal Schmidt (3):
  ice: add ice_adapter for shared data across PFs on the same NIC
  ice: avoid the PTP hardware semaphore in gettimex64 path
  ice: fold ice_ptp_read_time into ice_ptp_gettimex64

 drivers/net/ethernet/intel/ice/Makefile      |   3 +-
 drivers/net/ethernet/intel/ice/ice.h         |   2 +
 drivers/net/ethernet/intel/ice/ice_adapter.c | 109 +++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_adapter.h |  28 +++++
 drivers/net/ethernet/intel/ice/ice_main.c    |   8 ++
 drivers/net/ethernet/intel/ice/ice_ptp.c     |  33 +-----
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c  |   3 +
 7 files changed, 156 insertions(+), 30 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/ice/ice_adapter.c
 create mode 100644 drivers/net/ethernet/intel/ice/ice_adapter.h

-- 
2.43.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-15  7:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-07 22:25 [PATCH net-next v3 0/3] ice: lighter locking for PTP time reading Michal Schmidt
2024-03-07 22:25 ` [PATCH net-next v3 1/3] ice: add ice_adapter for shared data across PFs on the same NIC Michal Schmidt
2024-03-08 10:57   ` [Intel-wired-lan] " Marcin Szycik
2024-03-08 13:35     ` Michal Schmidt
2024-03-08 12:17   ` Przemek Kitszel
2024-03-08 14:18     ` Michal Schmidt
2024-03-11 11:05       ` Przemek Kitszel
2024-03-07 22:25 ` [PATCH net-next v3 2/3] ice: avoid the PTP hardware semaphore in gettimex64 path Michal Schmidt
2024-03-07 22:25 ` [PATCH net-next v3 3/3] ice: fold ice_ptp_read_time into ice_ptp_gettimex64 Michal Schmidt
2024-03-15  7:29 ` [PATCH net-next v3 0/3] ice: lighter locking for PTP time reading Przemek Kitszel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).