* The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?
@ 2014-12-02 8:43 zhangxiao
2014-12-02 14:00 ` Mike Snitzer
0 siblings, 1 reply; 5+ messages in thread
From: zhangxiao @ 2014-12-02 8:43 UTC (permalink / raw)
To: agk, snitzer, linux-kernel, NeilBrown, linux-raid, dm-devel
Hi Experts,
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?
2014-12-02 8:43 The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible? zhangxiao
@ 2014-12-02 14:00 ` Mike Snitzer
2014-12-03 14:19 ` [dm-devel] " Joe Thornber
0 siblings, 1 reply; 5+ messages in thread
From: Mike Snitzer @ 2014-12-02 14:00 UTC (permalink / raw)
To: zhangxiao; +Cc: agk, linux-kernel, NeilBrown, linux-raid, dm-devel
On Tue, Dec 02 2014 at 3:43am -0500,
zhangxiao <xiao.zhang@windriver.com> wrote:
> Hi Experts,
>
> 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?
No immediate plans.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dm-devel] The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?
2014-12-02 14:00 ` Mike Snitzer
@ 2014-12-03 14:19 ` Joe Thornber
2014-12-03 16:17 ` Mike Snitzer
2014-12-04 1:26 ` [dm-devel] " zhangxiao
0 siblings, 2 replies; 5+ messages in thread
From: Joe Thornber @ 2014-12-03 14:19 UTC (permalink / raw)
To: device-mapper development; +Cc: zhangxiao, linux-raid, linux-kernel, agk
On Tue, Dec 02, 2014 at 09:00:17AM -0500, Mike Snitzer wrote:
> On Tue, Dec 02 2014 at 3:43am -0500,
> zhangxiao <xiao.zhang@windriver.com> wrote:
>
> > Hi Experts,
> >
> > 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?
>
> No immediate plans.
That hash table has been replaced with a red/black tree.
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-for-3.19&id=4e420c452b11edf9d510c8180ac66f529e5b6206
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?
2014-12-03 14:19 ` [dm-devel] " Joe Thornber
@ 2014-12-03 16:17 ` Mike Snitzer
2014-12-04 1:26 ` [dm-devel] " zhangxiao
1 sibling, 0 replies; 5+ messages in thread
From: Mike Snitzer @ 2014-12-03 16:17 UTC (permalink / raw)
To: device-mapper development, zhangxiao, linux-raid, linux-kernel,
agk
On Wed, Dec 03 2014 at 9:19am -0500,
Joe Thornber <thornber@redhat.com> wrote:
> On Tue, Dec 02, 2014 at 09:00:17AM -0500, Mike Snitzer wrote:
> > On Tue, Dec 02 2014 at 3:43am -0500,
> > zhangxiao <xiao.zhang@windriver.com> wrote:
> >
> > > Hi Experts,
> > >
> > > 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?
> >
> > No immediate plans.
>
> That hash table has been replaced with a red/black tree.
>
> https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-for-3.19&id=4e420c452b11edf9d510c8180ac66f529e5b6206
Ah yes, you'd think I'd have remembered that change. Thanks for keeping
me honest Joe!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dm-devel] The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible?
2014-12-03 14:19 ` [dm-devel] " Joe Thornber
2014-12-03 16:17 ` Mike Snitzer
@ 2014-12-04 1:26 ` zhangxiao
1 sibling, 0 replies; 5+ messages in thread
From: zhangxiao @ 2014-12-04 1:26 UTC (permalink / raw)
To: device-mapper development, linux-raid, linux-kernel, agk
On 2014年12月03日 22:19, Joe Thornber wrote:
> On Tue, Dec 02, 2014 at 09:00:17AM -0500, Mike Snitzer wrote:
>> On Tue, Dec 02 2014 at 3:43am -0500,
>> zhangxiao <xiao.zhang@windriver.com> wrote:
>>
>>> Hi Experts,
>>>
>>> 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?
>>
>> No immediate plans.
>
> That hash table has been replaced with a red/black tree.
>
> https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-for-3.19&id=4e420c452b11edf9d510c8180ac66f529e5b6206
>
>
Great Thanks!
Best Regards
Xiao
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-04 1:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 8:43 The DM_BUFIO_HASH_BITS is defined as 20, any plan to make it flexible? zhangxiao
2014-12-02 14:00 ` Mike Snitzer
2014-12-03 14:19 ` [dm-devel] " Joe Thornber
2014-12-03 16:17 ` Mike Snitzer
2014-12-04 1:26 ` [dm-devel] " zhangxiao
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).