From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Dennis Dalessandro
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mike Marciniszyn
<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Kaike Wan <kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH for-next 1/2] IB/rdmavt: Setting of QP timeout can overflow jiffies computation
Date: Sat, 22 Jul 2017 13:44:02 -0400 [thread overview]
Message-ID: <a1660c46-98b1-9d2e-b488-ecd2bbc71b1a@redhat.com> (raw)
In-Reply-To: <20170617173723.17658.85726.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1124 bytes --]
On 6/17/2017 1:37 PM, Dennis Dalessandro wrote:
> From: Kaike Wan <kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Current computation of qp->timeout_jiffies in rvt_modify_qp() will cause
> overflow due to the fact that the input to the function usecs_to_jiffies
> is only 32-bit ( unsigned int). Overflow will occur when attr->timeout is
> equal to or greater than 30. The consequence is unnecessarily excessive
> retry and thus degradation of the system performance.
>
> This patch fixes the problem by limiting the input to 5-bit and calling
> usecs_to_jiffies() before multiplying the scaling factor.
>
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Kaike Wan <kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
This was accepted into 4.13-rc, thanks.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG Key ID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
next prev parent reply other threads:[~2017-07-22 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-17 17:37 [PATCH for-next 0/2] IB/hfi1,rdmavt: patches for next 06/17/2017 Dennis Dalessandro
[not found] ` <20170617173620.17658.5173.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-06-17 17:37 ` [PATCH for-next 1/2] IB/rdmavt: Setting of QP timeout can overflow jiffies computation Dennis Dalessandro
[not found] ` <20170617173723.17658.85726.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-07-22 17:44 ` Doug Ledford [this message]
2017-06-17 17:37 ` [PATCH for-next 2/2] IB/hfi1: Add receiving queue info to qp_stats Dennis Dalessandro
[not found] ` <20170617173731.17658.61784.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-07-28 18:01 ` Doug Ledford
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=a1660c46-98b1-9d2e-b488-ecd2bbc71b1a@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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