mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 0/2] libceph: support pg_upmap_primary (the read balancer)
Date: Mon, 30 Nov 2026 07:12:03 +0100	[thread overview]
Message-ID: <20261130-b4-libceph-upmap-primary-v1-0-247b0a3d2e13@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

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>



             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 Xiubo Li via B4 Relay [this message]
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

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-0-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®