[dm-devel] 答复: [PATCH] libmultipath: multipath active paths count optimization
Chongyun Wu
wu.chongyun at h3c.com
Thu Sep 5 10:03:57 UTC 2019
Hi Martin,
Thanks a lot.
I think patch e224d57 "libmutipath: continue to use old state on PATH_PENDING" might fix our issue compare to our syslog output, I will cherry-pick it.
And also need cherry-pick 9b715bf "multipathd: Fix miscounting active paths" for good.
Regards
Chongyun Wu
-----邮件原件-----
发件人: Martin Wilck [mailto:Martin.Wilck at suse.com]
发送时间: 2019年9月5日 15:37
收件人: bmarzins at redhat.com; dm-devel at redhat.com; wuchongyun (Cloud) <wu.chongyun at h3c.com>
抄送: guozhonghua (Cloud) <guozhonghua at h3c.com>; likai (Cloud) <li.kai4 at h3c.com>; renqinwei (Cloud) <ren.qinwei at h3c.com>; liliang (Cloud) <li.liangA at h3c.com>; liucong (Cloud) <liu.cong at h3c.com>; wangyong (Cloud) <wang.yongD at h3c.com>; changlimin (Cloud) <changlimin at h3c.com>; zhangduan (Cloud) <zhang.duan at h3c.com>; huangyong (Cloud) <huang.yongA at h3c.com>; wangxibo (Cloud) <wang.xibo at h3c.com>; zhangguanghui (Cloud) <zhang.guanghui at h3c.com>; zhangcheng (Cloud) <zhang.chengA at h3c.com>
主题: Re: [dm-devel] [PATCH] libmultipath: multipath active paths count optimization
Hi Chongyun,
On Thu, 2019-09-05 at 02:58 +0000, Chongyun Wu wrote:
> Hi Martin, Ben and other viewers
>
> Cloud you help to view below patch which try to deal with a multipath
> active paths count not right issue, thanks a lot.
>
> From deee7196ece43b01b8ee635e60ce465080905b5e Mon Sep 17 00:00:00
> 2001
> From: Chongyun Wu <wu.chongyun at h3c.com>
> Date: Tue, 27 Aug 2019 13:58:33 +0800
> Subject: [PATCH] libmultipath: multipath active paths count
> optimization
>
> Really count multipath active paths not use mpp->nr_active++ or
> mpp->nr_active--, because there are other places might call pathinfo
> to change path state not only in check_path, if other places detect
> and changed path state but not do mpp->nr_active++ or
> mpp->nr_active--, the active paths might not right any more.
>
> We meet an issue which actually have three paths but after all paths
> down syslog report have three paths remaining so multipathd not send
> disable queueing to dm and this dm device been blocked.
> This patch might fix this issue.
>
> Signed-off-by: Chongyun Wu <wu.chongyun at h3c.com>
> ---
> libmultipath/structs_vec.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Thanks a lot for your patch. We've discussed this previously, and in general, there's little reason not to do it - pathcount() is fast, and could be made even faster. But if we do, we should ditch the nr_active field altogether - no need to carry it around if we re-calculate it anyway when we need it.
However, it worries me a bit that nr_active may go wrong. Both Ben and I have reviewed the code and we thought the nr_active tracking was correct. Something seems to happen in our code that we don't understand.
- can you please confirm that you are using the latest code, containing e224d57 "libmutipath: continue to use old state on PATH_PENDING", 9b715bf "multipathd: Fix miscounting active paths" and (in case you're using the marginal_paths options) also 7d4b40f and
058df77 ?
- If you have a reliable reproducer, would you mind adding log messages to the code you just submitted, so that we can observe how nr_active evolves in time, and perhaps understand why it's going wrong?
Regards
Martin
More information about the dm-devel
mailing list