2014-05-27 16:47:07

by Eric Sandeen

[permalink] [raw]
Subject: jbd2 batch time tuning behavior question

Question for Ted: With this commit, you introduced some documentation and some code which are not consistent AFAICT:


commit 30773840c19cea60dcef39545960d541b1ac1cf8
Author: Theodore Ts'o <[email protected]>
Date: Sat Jan 3 20:27:38 2009 -0500

ext4: add fsync batch tuning knobs

<snip>

+ the transaction. The commit time is capped by
+ the max_batch_time, which defaults to 15000us
+ (15ms). This optimization can be turned off
+ entirely by setting max_batch_time to 0.

<snip>

+ case Opt_max_batch_time:
+ if (match_int(&args[0], &option))
+ return 0;
+ if (option < 0)
+ return 0;
+ if (option == 0)
+ option = EXT4_DEF_MAX_BATCH_TIME;
+ sbi->s_max_batch_time = option;
+ break;

Docs say "0" turns it off, but option handling turns "0" into
EXT4_DEF_MAX_BATCH_TIME. What was the real intent here; should the
docs or the behavior be changed?

Thanks,
-Eric


2014-06-02 14:42:12

by Theodore Ts'o

[permalink] [raw]
Subject: Re: jbd2 batch time tuning behavior question

On Tue, May 27, 2014 at 11:47:06AM -0500, Eric Sandeen wrote:
>
> Docs say "0" turns it off, but option handling turns "0" into
> EXT4_DEF_MAX_BATCH_TIME. What was the real intent here; should the
> docs or the behavior be changed?

Nice catch! I would think it's probably better if we make the
behavior change to match the docs.

Want to send a patch, since you found the problem, or shall I create a
patch myself to fix things up?

Thanks,

- Ted

2014-06-02 15:00:07

by Eric Sandeen

[permalink] [raw]
Subject: Re: jbd2 batch time tuning behavior question

On 6/2/14, 9:42 AM, Theodore Ts'o wrote:
> On Tue, May 27, 2014 at 11:47:06AM -0500, Eric Sandeen wrote:
>>
>> Docs say "0" turns it off, but option handling turns "0" into
>> EXT4_DEF_MAX_BATCH_TIME. What was the real intent here; should the
>> docs or the behavior be changed?
>
> Nice catch! I would think it's probably better if we make the
> behavior change to match the docs.
>
> Want to send a patch, since you found the problem, or shall I create a
> patch myself to fix things up?
>
> Thanks,
>
> - Ted
>

I can send the patch, I just wondered what the intent was.

Thanks,
-Eric