From: Xiubo Li via B4 Relay <devnull+xiubo.li.clyso.com@kernel.org>
To: Ilya Dryomov <idryomov@gmail.com>,
Alex Markuze <amarkuze@redhat.com>,
Viacheslav Dubeyko <slava@dubeyko.com>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiubo Li <xiubo.li@clyso.com>
Subject: [PATCH v2 0/4] libceph: support pg_upmap_primary (the read balancer)
Date: Thu, 03 Dec 2026 14:24:19 +0100 [thread overview]
Message-ID: <20261203-b4-libceph-upmap-primary-v2-0-8a15d2fc7318@clyso.com> (raw)
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
Patches 1 and 2 fix two older libceph problems that a changing primary
makes easier to hit. Patch 1 resends a balanced or localized read on
any new interval, as the replica drops it otherwise, also when only
the up set changes. Patch 2 asks for a full map when an incremental
fails to apply half way, instead of routing requests with the half
updated map. Patch 3 decodes the mappings from full and incremental
maps and applies them the way OSDMap::_apply_upmap() does. Patch 4
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 4.
---
Changes in v2:
- New patch 1: resend replica reads on a new interval, also when the
acting set does not change (Alex).
- New patch 2: get a full osdmap after failing to apply an
incremental, instead of keeping a partially applied map (Alex).
- Patches 3 and 4 are v1 patches 1 and 2; patch 3 only tab-aligns a
comment in osdmap.h.
- Link to v1: https://patch.msgid.link/20261130-b4-libceph-upmap-primary-v1-0-247b0a3d2e13@clyso.com
---
Xiubo Li (4):
libceph: resend replica reads on a new interval
libceph: get a full osdmap after failing to apply an incremental
libceph: decode and apply pg_upmap_primary mappings
libceph: advertise SERVER_REEF
include/linux/ceph/ceph_features.h | 4 +-
include/linux/ceph/osd_client.h | 1 +
include/linux/ceph/osdmap.h | 4 ++
net/ceph/debugfs.c | 12 ++++-
net/ceph/osd_client.c | 71 +++++++++++++++++++++------
net/ceph/osdmap.c | 99 +++++++++++++++++++++++++++++++++++++-
6 files changed, 173 insertions(+), 18 deletions(-)
---
base-commit: 3f90412e989cb381d4bf96260468f5c7b2d08655
change-id: 20261130-b4-libceph-upmap-primary-9fc9dbab8652
Best regards,
--
Xiubo Li <xiubo.li@clyso.com>
next reply other threads:[~2026-12-03 13:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 13:24 Xiubo Li via B4 Relay [this message]
2026-12-03 13:24 ` [PATCH v2 1/4] libceph: resend replica reads on a new interval Xiubo Li via B4 Relay
2026-12-03 13:24 ` [PATCH v2 2/4] libceph: get a full osdmap after failing to apply an incremental Xiubo Li via B4 Relay
2026-12-03 13:24 ` [PATCH v2 3/4] libceph: decode and apply pg_upmap_primary mappings Xiubo Li via B4 Relay
2026-12-03 13:24 ` [PATCH v2 4/4] libceph: advertise SERVER_REEF Xiubo Li via B4 Relay
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=20261203-b4-libceph-upmap-primary-v2-0-8a15d2fc7318@clyso.com \
--to=devnull+xiubo.li.clyso.com@kernel.org \
--cc=amarkuze@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=xiubo.li@clyso.com \
/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®