mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] libceph: support pg_upmap_primary (the read balancer)
@ 2026-11-30  6:12 Xiubo Li via B4 Relay
  2026-11-30  6:12 ` [PATCH 1/2] libceph: decode and apply pg_upmap_primary mappings Xiubo Li via B4 Relay
  2026-11-30  6:12 ` [PATCH 2/2] libceph: advertise SERVER_REEF Xiubo Li via B4 Relay
  0 siblings, 2 replies; 3+ messages in thread
From: Xiubo Li via B4 Relay @ 2026-11-30  6:12 UTC (permalink / raw)
  To: Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko
  Cc: ceph-devel, linux-kernel, Xiubo Li

Since reef, the mgr read balancer ("ceph balancer mode read" or
"upmap-read") and "ceph osd pg-upmap-primary" choose the primary of
each PG explicitly, so that reads, which normally go to the primary,
are spread evenly over the OSDs.

Kernel clients cannot take part today.  libceph does not decode
pg_upmap_primary and does not advertise SERVER_REEF, the feature the
monitors require from every client once the OSDMap holds such an
entry.  So "ceph osd set-require-min-compat-client reef" is refused
while kernel clients are connected, and a kernel client can neither
mount CephFS nor map an rbd image on a cluster that already uses the
read balancer:

  libceph: RADOS feature set mismatch: server's required > my supported 0x2f018fb87aa4aafe, missing 0x80000000
  libceph: mon0 (2)127.0.0.1:17300 missing required protocol features

Patch 1 decodes the mappings from full and incremental maps and
applies them the way OSDMap::_apply_upmap() does.  Patch 2 advertises
SERVER_REEF, which towards clients only selects the OSDMap encodings
that carry pg_upmap_primary.

Tested with the series applied to a 7.2-based tree, built as the
libceph, ceph and rbd modules, against a 3-OSD tentacle cluster:
CephFS mounts and rbd maps work with the read balancer on, the
kernel's pg_upmap_primary entries follow the cluster through full and
incremental maps, and all I/O of a PG goes to the chosen primary.
Without entries, krbd fio and an IO500 run show no difference from the
unpatched modules.  The read balancer numbers are in patch 2.

---
Xiubo Li (2):
      libceph: decode and apply pg_upmap_primary mappings
      libceph: advertise SERVER_REEF

 include/linux/ceph/ceph_features.h |  4 +-
 include/linux/ceph/osdmap.h        |  4 ++
 net/ceph/debugfs.c                 |  7 +++
 net/ceph/osdmap.c                  | 99 +++++++++++++++++++++++++++++++++++++-
 4 files changed, 112 insertions(+), 2 deletions(-)
---
base-commit: 3f90412e989cb381d4bf96260468f5c7b2d08655
change-id: 20261130-b4-libceph-upmap-primary-9fc9dbab8652

Best regards,
--  
Xiubo Li <xiubo.li@clyso.com>



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

end of thread, other threads:[~2026-11-30  6:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30  6:12 [PATCH 0/2] libceph: support pg_upmap_primary (the read balancer) Xiubo Li via B4 Relay
2026-11-30  6:12 ` [PATCH 1/2] libceph: decode and apply pg_upmap_primary mappings Xiubo Li via B4 Relay
2026-11-30  6:12 ` [PATCH 2/2] libceph: advertise SERVER_REEF Xiubo Li via B4 Relay

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®