mbox series

[0/5] libceph: support for replica reads

Message ID 20200529151952.15184-1-idryomov@gmail.com (mailing list archive)
Headers show
Series libceph: support for replica reads | expand

Message

Ilya Dryomov May 29, 2020, 3:19 p.m. UTC
Hello,

This adds support for replica reads (balanced and localized reads)
to rbd and ceph.  crush_location syntax is slightly different, see
patch 3 for details.

Thanks,

                Ilya


Ilya Dryomov (5):
  libceph: add non-asserting rbtree insertion helper
  libceph: decode CRUSH device/bucket types and names
  libceph: crush_location infrastructure
  libceph: support for balanced and localized reads
  libceph: read_policy option

 include/linux/ceph/libceph.h    |  13 +-
 include/linux/ceph/osd_client.h |   1 +
 include/linux/ceph/osdmap.h     |  19 +-
 include/linux/crush/crush.h     |   6 +
 net/ceph/ceph_common.c          |  51 +++++
 net/ceph/crush/crush.c          |   3 +
 net/ceph/debugfs.c              |   6 +-
 net/ceph/osd_client.c           |  92 +++++++-
 net/ceph/osdmap.c               | 361 +++++++++++++++++++++++++++-----
 9 files changed, 491 insertions(+), 61 deletions(-)

Comments

Ilya Dryomov May 29, 2020, 5:21 p.m. UTC | #1
On Fri, May 29, 2020 at 6:57 PM Jason Dillaman <jdillama@redhat.com> wrote:
>
> lgtm -- couple questions:
>
> 1) the client adding the options will be responsible for determining if it's safe to enable read-from-replica/balanced reads (i.e. OSDs >= octopus)?

Yes, we can't easily check require_osd_release or similar in the
kernel.  This is opt-in, and I'll add a warning together with the
description of the new options to the man page.

> 2) is there a way to determine if the kernel supports the new options (or will older kernels just ignore the options w/o complaining)? i.e. can ceph-csi safely add the argument regardless?

No, older kernels will error out.  I think ceph-csi would handle
this the same way ceph quotas are handled (i.e. with the list of
known "good" kernel versions) or alternatively just attempt to map
with and then without crush_location and read_balance=localize
(probably less appealing given that the kernel version list
infrastructure is already in place).

Thanks,

                Ilya
Ilya Dryomov May 29, 2020, 5:25 p.m. UTC | #2
On Fri, May 29, 2020 at 7:21 PM Ilya Dryomov <idryomov@gmail.com> wrote:
>
> On Fri, May 29, 2020 at 6:57 PM Jason Dillaman <jdillama@redhat.com> wrote:
> >
> > lgtm -- couple questions:
> >
> > 1) the client adding the options will be responsible for determining if it's safe to enable read-from-replica/balanced reads (i.e. OSDs >= octopus)?
>
> Yes, we can't easily check require_osd_release or similar in the
> kernel.  This is opt-in, and I'll add a warning together with the
> description of the new options to the man page.
>
> > 2) is there a way to determine if the kernel supports the new options (or will older kernels just ignore the options w/o complaining)? i.e. can ceph-csi safely add the argument regardless?
>
> No, older kernels will error out.  I think ceph-csi would handle
> this the same way ceph quotas are handled (i.e. with the list of
> known "good" kernel versions) or alternatively just attempt to map
> with and then without crush_location and read_balance=localize
                                               ^^^
Typo, read_policy=localize.

Thanks,

                Ilya