Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-06-02 Thread Greg KH
On Tue, Jun 02, 2020 at 07:51:52AM +0200, Christoph Hellwig wrote: > On Mon, Jun 01, 2020 at 10:44:26AM +0200, Greg KH wrote: > > But does this code path actually show up anywhere that is actually > > measurable as mattering? > > > > If so, please show that benchmark results. > > I think the

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-06-01 Thread Christoph Hellwig
On Mon, Jun 01, 2020 at 10:44:26AM +0200, Greg KH wrote: > But does this code path actually show up anywhere that is actually > measurable as mattering? > > If so, please show that benchmark results. I think the requests are starting to be a bit unreasonable. Tao is replacing a reimplementation

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-06-01 Thread Greg KH
On Mon, Jun 01, 2020 at 03:22:01PM +0800, Tao pilgrim wrote: > On Fri, May 29, 2020 at 10:13 PM Jens Axboe wrote: > > > > On 5/29/20 8:11 AM, Kaitao Cheng wrote: > > > There is a function named ilog2() exist which can replace blksize. > > > The generated code will be shorter and more efficient on

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-06-01 Thread Tao pilgrim
On Fri, May 29, 2020 at 10:13 PM Jens Axboe wrote: > > On 5/29/20 8:11 AM, Kaitao Cheng wrote: > > There is a function named ilog2() exist which can replace blksize. > > The generated code will be shorter and more efficient on some > > architecture, such as arm64. And ilog2() can be optimized

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Jens Axboe
On 5/29/20 4:27 PM, Bart Van Assche wrote: > On 2020-05-29 13:27, Matthew Wilcox wrote: >> On Fri, May 29, 2020 at 10:11:00PM +0800, Kaitao Cheng wrote: >>> There is a function named ilog2() exist which can replace blksize. >>> The generated code will be shorter and more efficient on some >>>

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Bart Van Assche
On 2020-05-29 13:27, Matthew Wilcox wrote: > On Fri, May 29, 2020 at 10:11:00PM +0800, Kaitao Cheng wrote: >> There is a function named ilog2() exist which can replace blksize. >> The generated code will be shorter and more efficient on some >> architecture, such as arm64. And ilog2() can be

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Matthew Wilcox
On Fri, May 29, 2020 at 10:11:00PM +0800, Kaitao Cheng wrote: > There is a function named ilog2() exist which can replace blksize. > The generated code will be shorter and more efficient on some > architecture, such as arm64. And ilog2() can be optimized according > to different architecture.

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Jens Axboe
On 5/29/20 8:11 AM, Kaitao Cheng wrote: > There is a function named ilog2() exist which can replace blksize. > The generated code will be shorter and more efficient on some > architecture, such as arm64. And ilog2() can be optimized according > to different architecture. When you posted this last

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Christoph Hellwig
> ns->size = i_size_read(ns->bdev->bd_inode); > - ns->blksize_shift = blksize_bits(bdev_logical_block_size(ns->bdev)); > + ns->blksize_shift = ilog2(bdev_logical_block_size(ns->bdev)); This should just be: ns->blksize_shift = ns->bdev->bd_inode->i_blkbits; > diff --git

[f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Kaitao Cheng
There is a function named ilog2() exist which can replace blksize. The generated code will be shorter and more efficient on some architecture, such as arm64. And ilog2() can be optimized according to different architecture. Signed-off-by: Kaitao Cheng --- changes in v2: Remove all