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 2/2] libceph: advertise SERVER_REEF
Date: Mon, 30 Nov 2026 07:12:05 +0100 [thread overview]
Message-ID: <20261130-b4-libceph-upmap-primary-v1-2-247b0a3d2e13@clyso.com> (raw)
In-Reply-To: <20261130-b4-libceph-upmap-primary-v1-0-247b0a3d2e13@clyso.com>
From: Xiubo Li <xiubo.li@clyso.com>
Once the OSDMap holds a pg_upmap_primary entry, the monitors require
the SERVER_REEF feature from every client, and "ceph osd
set-require-min-compat-client reef", which pg-upmap-primary needs
first, is refused while clients without it are connected. So a
cluster with kernel clients cannot use the read balancer, and a kernel
client cannot connect to a cluster that already uses it.
SERVER_REEF reuses bit 31, whose first incarnation MON_SINGLE_PAXOS is
retired. Towards clients it only selects the OSDMap encodings that
carry pg_upmap_primary, which libceph decodes now, so advertise it.
Tested on a 3-OSD tentacle cluster with the read balancer
(osdmaptool --read) applied to its pools. Without this series the
monitors drop the session ("missing required protocol features",
0x80000000), so neither a CephFS mount nor an rbd map succeeds. With
it, both work; after the full map at mount time and after a burst of
22 incrementals the kernel's pg_upmap_primary list matches the
cluster's, all reads and writes of a PG go to the chosen primary, and
no OSD logs a misdirected op.
krbd fio on a 128-PG pool whose primaries were split 40/48/40, and
43/43/42 after the read balancer added 5 entries (O_DIRECT, 30 s,
median of 3 runs, MiB/s with p99 latency):
+-----------------------------+------------------+------------------+
| | primary reads | read balancer |
+-----------------------------+------------------+------------------+
| 4M seq read, 4 x qd16 | 4713 (163 ms) | 4995 (128 ms) |
| 4K random read, 4 x qd32 | 586 (1.93 ms) | 594 (1.73 ms) |
+-----------------------------+------------------+------------------+
4K random writes do not change beyond the run-to-run spread. The gain
follows how uneven the primaries were: the busiest OSD went from 37.5%
to 33.6% of the primaries here.
Signed-off-by: Xiubo Li <xiubo.li@clyso.com>
---
include/linux/ceph/ceph_features.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 1e4dce93a8a1..9202749a820d 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -118,7 +118,8 @@ DEFINE_CEPH_FEATURE_RETIRED(28, 1, OSD_HBMSGS, HAMMER, JEWEL)
DEFINE_CEPH_FEATURE(28, 2, SERVER_MIMIC)
DEFINE_CEPH_FEATURE(29, 1, MDSENC)
DEFINE_CEPH_FEATURE(30, 1, OSDHASHPSPOOL)
-DEFINE_CEPH_FEATURE(31, 1, MON_SINGLE_PAXOS) // deprecate me
+DEFINE_CEPH_FEATURE_RETIRED(31, 1, MON_SINGLE_PAXOS, NAUTILUS, PACIFIC)
+DEFINE_CEPH_FEATURE(31, 3, SERVER_REEF)
DEFINE_CEPH_FEATURE_RETIRED(32, 1, OSD_SNAPMAPPER, JEWEL, LUMINOUS)
DEFINE_CEPH_FEATURE_RETIRED(33, 1, MON_SCRUB, JEWEL, LUMINOUS)
@@ -210,6 +211,7 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
CEPH_FEATURE_CRUSH_TUNABLES2 | \
CEPH_FEATURE_REPLY_CREATE_INODE | \
CEPH_FEATURE_SERVER_MIMIC | \
+ CEPH_FEATURE_SERVER_REEF | \
CEPH_FEATURE_MDSENC | \
CEPH_FEATURE_OSDHASHPSPOOL | \
CEPH_FEATURE_OSD_CACHEPOOL | \
--
2.53.0
prev parent reply other threads:[~2026-11-30 6:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Xiubo Li via B4 Relay [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=20261130-b4-libceph-upmap-primary-v1-2-247b0a3d2e13@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®