mbox series

[PATCHv3,for-next,0/4] New multipath policy for RTRS client

Message ID 20210407113444.150961-1-gi-oh.kim@ionos.com (mailing list archive)
Headers show
Series New multipath policy for RTRS client | expand

Message

Gioh Kim April 7, 2021, 11:34 a.m. UTC
This patch set introduces new multipath policy 'min-latency'.
The latency is a time calculated by the heart-beat messages. Whenever
the client sends heart-beat message, it checks the time gap between
sending the heart-beat message and receiving the ACK. So this value
can be changed regularly.
If client has multi-path, it can send IO via a path having the least
latency.

V3->V2: use sysfs_emit instead of scnprintf
V2->V1: use sysfs_emit instead of sprintf

Gioh Kim (3):
  RDMA/rtrs-clt: Add a minimum latency multipath policy
  RDMA/rtrs-clt: new sysfs attribute to print the latency of each path
  Documentation/ABI/rtrs-clt: Add descriptions for min-latency policy

Md Haris Iqbal (1):
  RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
    stats

 .../ABI/testing/sysfs-class-rtrs-client       | 12 ++++
 drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c  | 35 ++++++++++-
 drivers/infiniband/ulp/rtrs/rtrs-clt.c        | 60 ++++++++++++++++++-
 drivers/infiniband/ulp/rtrs/rtrs-clt.h        |  1 +
 drivers/infiniband/ulp/rtrs/rtrs-pri.h        |  2 +
 drivers/infiniband/ulp/rtrs/rtrs.c            |  3 +
 6 files changed, 109 insertions(+), 4 deletions(-)

Comments

Jason Gunthorpe April 13, 2021, 10:47 p.m. UTC | #1
On Wed, Apr 07, 2021 at 01:34:40PM +0200, Gioh Kim wrote:
> This patch set introduces new multipath policy 'min-latency'.
> The latency is a time calculated by the heart-beat messages. Whenever
> the client sends heart-beat message, it checks the time gap between
> sending the heart-beat message and receiving the ACK. So this value
> can be changed regularly.
> If client has multi-path, it can send IO via a path having the least
> latency.
> 
> V3->V2: use sysfs_emit instead of scnprintf
> V2->V1: use sysfs_emit instead of sprintf
> 
> Gioh Kim (3):
>   RDMA/rtrs-clt: Add a minimum latency multipath policy
>   RDMA/rtrs-clt: new sysfs attribute to print the latency of each path
>   Documentation/ABI/rtrs-clt: Add descriptions for min-latency policy

Applied to for-next, thanks

Please be mindful about the subjects, rdma subject start with a
capital letter after the tag

> Md Haris Iqbal (1):
>   RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
>     stats

This one was replaced by that other patch

Jason
Gioh Kim April 14, 2021, 4:59 a.m. UTC | #2
On Wed, Apr 14, 2021 at 12:47 AM Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> On Wed, Apr 07, 2021 at 01:34:40PM +0200, Gioh Kim wrote:
> > This patch set introduces new multipath policy 'min-latency'.
> > The latency is a time calculated by the heart-beat messages. Whenever
> > the client sends heart-beat message, it checks the time gap between
> > sending the heart-beat message and receiving the ACK. So this value
> > can be changed regularly.
> > If client has multi-path, it can send IO via a path having the least
> > latency.
> >
> > V3->V2: use sysfs_emit instead of scnprintf
> > V2->V1: use sysfs_emit instead of sprintf
> >
> > Gioh Kim (3):
> >   RDMA/rtrs-clt: Add a minimum latency multipath policy
> >   RDMA/rtrs-clt: new sysfs attribute to print the latency of each path
> >   Documentation/ABI/rtrs-clt: Add descriptions for min-latency policy
>
> Applied to for-next, thanks
>
> Please be mindful about the subjects, rdma subject start with a
> capital letter after the tag
>
> > Md Haris Iqbal (1):
> >   RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
> >     stats
>
> This one was replaced by that other patch

Hi Jason,

"RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its stats"
This patch is still necessary. Please apply that patch.

As I wrote in the description of patch
"RDMA/rtrs-clt: destroy sysfs after removing session from active list",
each function still should check the session status because closing
or error recovery paths can change the status.

For example, the client sends the heart-beat and does not get the
response, it changes the session status and stops IO processing.
It is ok if the status is changed after checking status because
the error recovery path does not free memory and only tries to
reconnection.

And closing the session changes the session status and flush all IO,
and then free memory.

Thank you for the review.
Jason Gunthorpe April 27, 2021, 6:59 p.m. UTC | #3
On Wed, Apr 14, 2021 at 06:59:59AM +0200, Gioh Kim wrote:
> On Wed, Apr 14, 2021 at 12:47 AM Jason Gunthorpe <jgg@nvidia.com> wrote:
> >
> > On Wed, Apr 07, 2021 at 01:34:40PM +0200, Gioh Kim wrote:
> > > This patch set introduces new multipath policy 'min-latency'.
> > > The latency is a time calculated by the heart-beat messages. Whenever
> > > the client sends heart-beat message, it checks the time gap between
> > > sending the heart-beat message and receiving the ACK. So this value
> > > can be changed regularly.
> > > If client has multi-path, it can send IO via a path having the least
> > > latency.
> > >
> > > V3->V2: use sysfs_emit instead of scnprintf
> > > V2->V1: use sysfs_emit instead of sprintf
> > >
> > > Gioh Kim (3):
> > >   RDMA/rtrs-clt: Add a minimum latency multipath policy
> > >   RDMA/rtrs-clt: new sysfs attribute to print the latency of each path
> > >   Documentation/ABI/rtrs-clt: Add descriptions for min-latency policy
> >
> > Applied to for-next, thanks
> >
> > Please be mindful about the subjects, rdma subject start with a
> > capital letter after the tag
> >
> > > Md Haris Iqbal (1):
> > >   RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
> > >     stats
> >
> > This one was replaced by that other patch
> 
> Hi Jason,
> 
> "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its stats"
> This patch is still necessary. Please apply that patch.
> 
> As I wrote in the description of patch
> "RDMA/rtrs-clt: destroy sysfs after removing session from active list",
> each function still should check the session status because closing
> or error recovery paths can change the status.
> 
> For example, the client sends the heart-beat and does not get the
> response, it changes the session status and stops IO processing.
> It is ok if the status is changed after checking status because
> the error recovery path does not free memory and only tries to
> reconnection.
> 
> And closing the session changes the session status and flush all IO,
> and then free memory.

You need to resend it with out the oops message, a patch like this
cannot be correctly fixing an oops like it presents. Confirm you do
not have the oops now that the other patch is merged.

Please explain carefully what it is trying to do

Jason
Gioh Kim April 28, 2021, 4:59 a.m. UTC | #4
On Tue, Apr 27, 2021 at 9:00 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Wed, Apr 14, 2021 at 06:59:59AM +0200, Gioh Kim wrote:
> > On Wed, Apr 14, 2021 at 12:47 AM Jason Gunthorpe <jgg@nvidia.com> wrote:
> > >
> > > On Wed, Apr 07, 2021 at 01:34:40PM +0200, Gioh Kim wrote:
> > > > This patch set introduces new multipath policy 'min-latency'.
> > > > The latency is a time calculated by the heart-beat messages. Whenever
> > > > the client sends heart-beat message, it checks the time gap between
> > > > sending the heart-beat message and receiving the ACK. So this value
> > > > can be changed regularly.
> > > > If client has multi-path, it can send IO via a path having the least
> > > > latency.
> > > >
> > > > V3->V2: use sysfs_emit instead of scnprintf
> > > > V2->V1: use sysfs_emit instead of sprintf
> > > >
> > > > Gioh Kim (3):
> > > >   RDMA/rtrs-clt: Add a minimum latency multipath policy
> > > >   RDMA/rtrs-clt: new sysfs attribute to print the latency of each path
> > > >   Documentation/ABI/rtrs-clt: Add descriptions for min-latency policy
> > >
> > > Applied to for-next, thanks
> > >
> > > Please be mindful about the subjects, rdma subject start with a
> > > capital letter after the tag
> > >
> > > > Md Haris Iqbal (1):
> > > >   RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
> > > >     stats
> > >
> > > This one was replaced by that other patch
> >
> > Hi Jason,
> >
> > "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its stats"
> > This patch is still necessary. Please apply that patch.
> >
> > As I wrote in the description of patch
> > "RDMA/rtrs-clt: destroy sysfs after removing session from active list",
> > each function still should check the session status because closing
> > or error recovery paths can change the status.
> >
> > For example, the client sends the heart-beat and does not get the
> > response, it changes the session status and stops IO processing.
> > It is ok if the status is changed after checking status because
> > the error recovery path does not free memory and only tries to
> > reconnection.
> >
> > And closing the session changes the session status and flush all IO,
> > and then free memory.
>
> You need to resend it with out the oops message, a patch like this
> cannot be correctly fixing an oops like it presents. Confirm you do
> not have the oops now that the other patch is merged.

Yes, that oops is prevented by another patch.
I will change the commit message and send it to you.

>
> Please explain carefully what it is trying to do

Ok, I will.


>
> Jason