LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ariel Levkovich <lariel@mellanox.com>
To: Leon Romanovsky <leon@kernel.org>, Michal Kubecek <mkubecek@suse.cz>
Cc: Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mlx5: avoid 64-bit division
Date: Tue, 28 May 2019 14:44:09 +0000	[thread overview]
Message-ID: <849F6C89-EB21-4EAA-A1C0-1E4941B4812E@mellanox.com> (raw)
In-Reply-To: <20190528140145.GO4633@mtr-leonro.mtl.com>


   On Mon, May 20, 2019 at 02:28:35PM +0300, Leon Romanovsky wrote:
    > > On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote:
    > > > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
    > > > breaks i386 build by introducing three 64-bit divisions. As the divisor
    > > > is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace
    > > > the division with bit operations.
    > >
    > > Interesting, we tried to solve it differently.
    > > I added it to our regression to be on the same side.
    
    > This patch works for us.
    
   Yes, this value is guaranteed to be a power of 2.  We safely use round_up() instead as suggested in the patch.


  reply	other threads:[~2019-05-28 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 11:19 Michal Kubecek
2019-05-20 11:28 ` Leon Romanovsky
2019-05-28 14:01   ` Leon Romanovsky
2019-05-28 14:44     ` Ariel Levkovich [this message]
2019-05-27 18:15 ` Jason Gunthorpe
2019-05-27 20:47   ` Michal Kubecek
2019-05-29 16:08 ` Jason Gunthorpe

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=849F6C89-EB21-4EAA-A1C0-1E4941B4812E@mellanox.com \
    --to=lariel@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --subject='Re: [PATCH] mlx5: avoid 64-bit division' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).