From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers
Date: Wed, 30 Aug 2023 13:44:16 -0500 [thread overview]
Message-ID: <20230830184416.GI7412@octiron.msp.redhat.com> (raw)
In-Reply-To: <5d4d7dea45c20d758a35756f2d3cc1e4f7a0db26.camel@suse.com>
On Tue, Aug 29, 2023 at 08:34:39PM +0000, Martin Wilck wrote:
> On Fri, 2023-07-28 at 14:05 -0500, Benjamin Marzinski wrote:
> > This patchset changes how prioritizers set their timeouts, to make
> > them
> > match how the checker functions work, and also cleans up some minor
> > timeout issues. I did this to make out timeouts consistent, but if
> > someone has a good reason to object to that, I don't feel
> > strongly that it's necessary, and I can resend just the bugfixes.
> >
>
> I don't object the idea, quite the contrary. But I would prefer a
> different solution.
>
> IMO we should treat the "io_timeout" as a path property, and add a
> field in "struct path" for it. It would be initialized from
> conf->checker_timeout, or if that's unset, from sysfs, and finally,
> DEF_TIMEOUT. By reading the sysfs value, we'd be able to accomodate
> different properties for different devices, but we'd not re-read this
> value repeatedly like we're doing now. IMO that would be more
> consistent with what we do for other device properties.
>
> We currently pass the timeout value down the call stack all the way
> from pathinfo() like this (for alua):
>
> pathinfo()
> get_prio()
> prio_getprio()
> p->getprio()
> get_alua_info()
> get_target_port_group()
> do_inquiry() (*)
> do_inquiry_sg()
> get_asymmetric_access_state()
> do_rtpg() (*)
>
> With the exception of the functions marked by (*), all these functions
> obtain a "struct path" argument, too. IIUC, the main reason we're doing
> this is to avoid stalled getprio() calls for paths that are down
> (bb935d4 ("libmultipath: change failed path prio timeout")).
>
> IMO it would make more sense to remove the "timeout" arguments from
> these functions, and just determine the timeout where it's needed. I
> don't think that's a layering violation; functions that receive a
> "struct path" can also handle PATH_DOWN. Thus we could write
>
> int get_prio_timeout_ms(const struct path *pp)
> {
> if (pp->state == PATH_DOWN)
> return 10;
> else
> return pp->io_timeout * 1000;
> }
>
> and use this function as far down the stack as we can.
>
> Furthermore, to improve code readability and avoid issues like in 3/4
> and 4, I think we should call all variables and fields that take
> millisecond values "timeout_ms".
>
> Thoughts?
Sure. I can rework this.
-Ben
>
> Martin
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
prev parent reply other threads:[~2023-08-30 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 19:05 [dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers Benjamin Marzinski
2023-07-28 19:05 ` [dm-devel] [RFC PATCH 1/4] libmultipath: don't bother to reset default timeout value Benjamin Marzinski
2023-08-29 19:51 ` Martin Wilck
2023-07-28 19:05 ` [dm-devel] [RFC PATCH 2/4] libmultipath: make prioritizer timeouts work like checker timeouts Benjamin Marzinski
2023-07-28 19:05 ` [dm-devel] [RFC PATCH 3/4] libmultipath: fix timeouts for detect_alua() Benjamin Marzinski
2023-07-28 19:05 ` [dm-devel] [RFC PATCH 4/4] libmultipath: fix timeouts for path_latency prioritizer Benjamin Marzinski
2023-08-24 14:37 ` [dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers Benjamin Marzinski
2023-08-29 20:34 ` Martin Wilck
2023-08-30 18:44 ` Benjamin Marzinski [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=20230830184416.GI7412@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=martin.wilck@suse.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