Re: [PATCH v2] Btrfs: use do_div to avoid compile errors on 32bit box

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 20, 2011 at 5:21 AM, Josef Bacik <josef@xxxxxxxxxx> 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-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux