lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 20 Aug 2011 18:04:51 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Josef Bacik <josef@...hat.com>
Cc:	Liu Bo <liubo2009@...fujitsu.com>, linux-kernel@...r.kernel.org,
	mingo@...nel.org, jwboyer@...il.com, linux-btrfs@...r.kernel.org,
	chris.mason@...cle.com, dave@...os.cz
Subject: Re: [PATCH v2] Btrfs: use do_div to avoid compile errors on 32bit box

On Sat, Aug 20, 2011 at 5:21 AM, Josef Bacik <josef@...hat.com> wrote:
>
> I think Linus was less complaining about how you're dividing here and
> more about the fact that you are.  A divide by 2 is the same as a >> 1.
>  I'll send a patch to fix this.  Thanks,

Indeed. A single-bit 64-bit "double shift" may be a few cycles, but
it's still pretty damn cheap. Especially when compared to a 64x32 bit
divide. We absolutely don't want to do "do_div()" in order to divide
by the constant 2.

                     Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ