2014-12-02 08:32:54

by ZhangXiao

[permalink] [raw]
Subject: The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?

Hi NeilBrown,

See drivers/md/dm-bufio.c as below:
50 /*
51 * Buffer hash
52 */
53 #define DM_BUFIO_HASH_BITS 20
54 #define DM_BUFIO_HASH(block) \
55 ((((block) >> DM_BUFIO_HASH_BITS) ^ (block)) & \
56 ((1 << DM_BUFIO_HASH_BITS) - 1))
"drivers/md/dm-bufio.c" 1854L, 45375C


DM_BUFIO_HASH_BITS was defined as 20 and it maybe not fit for some
use case with limited resources. Do we have any plan to make it more
flexible? Like module parameter or something else?

Thanks
Xiao


2014-12-02 08:36:30

by NeilBrown

[permalink] [raw]
Subject: Re: The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?

On Tue, 2 Dec 2014 16:32:14 +0800 zhangxiao <[email protected]> wrote:

> Hi NeilBrown,
>
> See drivers/md/dm-bufio.c as below:
> 50 /*
> 51 * Buffer hash
> 52 */
> 53 #define DM_BUFIO_HASH_BITS 20
> 54 #define DM_BUFIO_HASH(block) \
> 55 ((((block) >> DM_BUFIO_HASH_BITS) ^ (block)) & \
> 56 ((1 << DM_BUFIO_HASH_BITS) - 1))
> "drivers/md/dm-bufio.c" 1854L, 45375C
>
>
> DM_BUFIO_HASH_BITS was defined as 20 and it maybe not fit for some
> use case with limited resources. Do we have any plan to make it more
> flexible? Like module parameter or something else?
>

Thanks, but this question should be address to:

DEVICE-MAPPER (LVM)
M: Alasdair Kergon <[email protected]>
M: Mike Snitzer <[email protected]>
M: [email protected]
L: [email protected]
W: http://sources.redhat.com/dm
Q: http://patchwork.kernel.org/project/dm-devel/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
T: quilt http://people.redhat.com/agk/patches/linux/editing/
S: Maintained
F: Documentation/device-mapper/
F: drivers/md/dm*
F: drivers/md/persistent-data/
F: include/linux/device-mapper.h
F: include/linux/dm-*.h
F: include/uapi/linux/dm-*.h

NeilBrown


Attachments:
(No filename) (811.00 B)
OpenPGP digital signature

2014-12-02 08:40:48

by ZhangXiao

[permalink] [raw]
Subject: Re: The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?

On 2014年12月02日 16:36, NeilBrown wrote:
> On Tue, 2 Dec 2014 16:32:14 +0800 zhangxiao <[email protected]> wrote:
>
>> Hi NeilBrown,
>>
>> See drivers/md/dm-bufio.c as below:
>> 50 /*
>> 51 * Buffer hash
>> 52 */
>> 53 #define DM_BUFIO_HASH_BITS 20
>> 54 #define DM_BUFIO_HASH(block) \
>> 55 ((((block) >> DM_BUFIO_HASH_BITS) ^ (block)) & \
>> 56 ((1 << DM_BUFIO_HASH_BITS) - 1))
>> "drivers/md/dm-bufio.c" 1854L, 45375C
>>
>>
>> DM_BUFIO_HASH_BITS was defined as 20 and it maybe not fit for some
>> use case with limited resources. Do we have any plan to make it more
>> flexible? Like module parameter or something else?
>>
>
> Thanks, but this question should be address to:
>
Thank you for your kindly remind. :-)

Regards
Xiao

> DEVICE-MAPPER (LVM)
> M: Alasdair Kergon <[email protected]>
> M: Mike Snitzer <[email protected]>
> M: [email protected]
> L: [email protected]
> W: http://sources.redhat.com/dm
> Q: http://patchwork.kernel.org/project/dm-devel/list/
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> T: quilt http://people.redhat.com/agk/patches/linux/editing/
> S: Maintained
> F: Documentation/device-mapper/
> F: drivers/md/dm*
> F: drivers/md/persistent-data/
> F: include/linux/device-mapper.h
> F: include/linux/dm-*.h
> F: include/uapi/linux/dm-*.h
>
> NeilBrown
>