2020-07-15 02:28:09

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the block tree

Hi all,

After merging the block tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

block/blk-timeout.c: In function 'blk_round_jiffies':
block/blk-timeout.c:96:14: error: 'CONFIG_HZ_ROUGH_MASK' undeclared (first use in this function)
96 | return (j + CONFIG_HZ_ROUGH_MASK) + 1;
| ^~~~~~~~~~~~~~~~~~~~

Caused by commit

91ba0f529364 ("block: relax jiffies rounding for timeouts")

CONFIG_HZ_ROUGH_MASK is not defined for this build even though
CONFIG_HZ_100 is set. The arm arch does not include kernel/Kconfig.hz.

I have reverted that commit for today.

--
Cheers,
Stephen Rothwell


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

2020-07-15 09:34:51

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On Wed, Jul 15, 2020 at 4:26 AM Stephen Rothwell <[email protected]> wrote:
> After merging the block tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> block/blk-timeout.c: In function 'blk_round_jiffies':
> block/blk-timeout.c:96:14: error: 'CONFIG_HZ_ROUGH_MASK' undeclared (first use in this function)
> 96 | return (j + CONFIG_HZ_ROUGH_MASK) + 1;
> | ^~~~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
> 91ba0f529364 ("block: relax jiffies rounding for timeouts")
>
> CONFIG_HZ_ROUGH_MASK is not defined for this build even though
> CONFIG_HZ_100 is set. The arm arch does not include kernel/Kconfig.hz.
>
> I have reverted that commit for today.

(as I don't have the original patch in my email, I'm commenting here)

+config HZ_ROUGH_MASK
+ int
+ default 127 if HZ_100
+ default 255 if HZ_250 || HZ_300
+ default 1023 if HZ_1000

What about other HZ_* values?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2020-07-15 15:14:46

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On 7/14/20 8:14 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the block tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> block/blk-timeout.c: In function 'blk_round_jiffies':
> block/blk-timeout.c:96:14: error: 'CONFIG_HZ_ROUGH_MASK' undeclared (first use in this function)
> 96 | return (j + CONFIG_HZ_ROUGH_MASK) + 1;
> | ^~~~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
> 91ba0f529364 ("block: relax jiffies rounding for timeouts")
>
> CONFIG_HZ_ROUGH_MASK is not defined for this build even though
> CONFIG_HZ_100 is set. The arm arch does not include kernel/Kconfig.hz.
>
> I have reverted that commit for today.

Thanks, I'll take a look.

--
Jens Axboe

2020-07-15 15:14:53

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On 7/15/20 3:24 AM, Geert Uytterhoeven wrote:
> On Wed, Jul 15, 2020 at 4:26 AM Stephen Rothwell <[email protected]> wrote:
>> After merging the block tree, today's linux-next build (arm
>> multi_v7_defconfig) failed like this:
>>
>> block/blk-timeout.c: In function 'blk_round_jiffies':
>> block/blk-timeout.c:96:14: error: 'CONFIG_HZ_ROUGH_MASK' undeclared (first use in this function)
>> 96 | return (j + CONFIG_HZ_ROUGH_MASK) + 1;
>> | ^~~~~~~~~~~~~~~~~~~~
>>
>> Caused by commit
>>
>> 91ba0f529364 ("block: relax jiffies rounding for timeouts")
>>
>> CONFIG_HZ_ROUGH_MASK is not defined for this build even though
>> CONFIG_HZ_100 is set. The arm arch does not include kernel/Kconfig.hz.
>>
>> I have reverted that commit for today.
>
> (as I don't have the original patch in my email, I'm commenting here)
>
> +config HZ_ROUGH_MASK
> + int
> + default 127 if HZ_100
> + default 255 if HZ_250 || HZ_300
> + default 1023 if HZ_1000
>
> What about other HZ_* values?

Which other ones do we have?

--
Jens Axboe

2020-07-15 15:20:25

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

Hi Jens,

On Wed, Jul 15, 2020 at 5:08 PM Jens Axboe <[email protected]> wrote:

> On 7/15/20 3:24 AM, Geert Uytterhoeven wrote:
> > On Wed, Jul 15, 2020 at 4:26 AM Stephen Rothwell <[email protected]> wrote:
> >> After merging the block tree, today's linux-next build (arm
> >> multi_v7_defconfig) failed like this:
> >>
> >> block/blk-timeout.c: In function 'blk_round_jiffies':
> >> block/blk-timeout.c:96:14: error: 'CONFIG_HZ_ROUGH_MASK' undeclared (first use in this function)
> >> 96 | return (j + CONFIG_HZ_ROUGH_MASK) + 1;
> >> | ^~~~~~~~~~~~~~~~~~~~
> >>
> >> Caused by commit
> >>
> >> 91ba0f529364 ("block: relax jiffies rounding for timeouts")
> >>
> >> CONFIG_HZ_ROUGH_MASK is not defined for this build even though
> >> CONFIG_HZ_100 is set. The arm arch does not include kernel/Kconfig.hz.
> >>
> >> I have reverted that commit for today.
> >
> > (as I don't have the original patch in my email, I'm commenting here)
> >
> > +config HZ_ROUGH_MASK
> > + int
> > + default 127 if HZ_100
> > + default 255 if HZ_250 || HZ_300
> > + default 1023 if HZ_1000
> >
> > What about other HZ_* values?
>
> Which other ones do we have?

$ git grep "\<HZ_[0-9]" -- "*Kconf*"
arch/alpha/Kconfig: default HZ_128 if ALPHA_QEMU
arch/alpha/Kconfig: default HZ_1200 if ALPHA_RAWHIDE
arch/alpha/Kconfig: default HZ_1024
arch/alpha/Kconfig: config HZ_32
arch/alpha/Kconfig: config HZ_64
arch/alpha/Kconfig: config HZ_128
arch/alpha/Kconfig: config HZ_256
arch/alpha/Kconfig: config HZ_1024
arch/alpha/Kconfig: config HZ_1200
arch/alpha/Kconfig: default 32 if HZ_32
arch/alpha/Kconfig: default 64 if HZ_64
arch/alpha/Kconfig: default 128 if HZ_128
arch/alpha/Kconfig: default 256 if HZ_256
arch/alpha/Kconfig: default 1200 if HZ_1200
arch/arm/Kconfig:config HZ_100
arch/arm/Kconfig:config HZ_200
arch/arm/Kconfig:config HZ_250
arch/arm/Kconfig:config HZ_300
arch/arm/Kconfig:config HZ_500
arch/arm/Kconfig:config HZ_1000
arch/arm/Kconfig: default 100 if HZ_100
arch/arm/Kconfig: default 200 if HZ_200
arch/arm/Kconfig: default 250 if HZ_250
arch/arm/Kconfig: default 300 if HZ_300
arch/arm/Kconfig: default 500 if HZ_500
arch/mips/Kconfig: default HZ_250
arch/mips/Kconfig: config HZ_24
arch/mips/Kconfig: config HZ_48
arch/mips/Kconfig: config HZ_100
arch/mips/Kconfig: config HZ_128
arch/mips/Kconfig: config HZ_250
arch/mips/Kconfig: config HZ_256
arch/mips/Kconfig: config HZ_1000
arch/mips/Kconfig: config HZ_1024
arch/mips/Kconfig: default 24 if HZ_24
arch/mips/Kconfig: default 48 if HZ_48
arch/mips/Kconfig: default 100 if HZ_100
arch/mips/Kconfig: default 128 if HZ_128
arch/mips/Kconfig: default 250 if HZ_250
arch/mips/Kconfig: default 256 if HZ_256
arch/mips/Kconfig: default 1000 if HZ_1000
arch/mips/Kconfig: default 1024 if HZ_1024
kernel/Kconfig.hz: default HZ_250
kernel/Kconfig.hz: config HZ_100
kernel/Kconfig.hz: config HZ_250
kernel/Kconfig.hz: config HZ_300
kernel/Kconfig.hz: config HZ_1000
kernel/Kconfig.hz: default 100 if HZ_100
kernel/Kconfig.hz: default 250 if HZ_250
kernel/Kconfig.hz: default 300 if HZ_300
kernel/Kconfig.hz: default 1000 if HZ_1000

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2020-07-15 15:23:08

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

Hi Jens,

> On Wed, Jul 15, 2020 at 5:08 PM Jens Axboe <[email protected]> wrote:
> > On 7/15/20 3:24 AM, Geert Uytterhoeven wrote:
> > > On Wed, Jul 15, 2020 at 4:26 AM Stephen Rothwell <[email protected]> wrote:
> > >> After merging the block tree, today's linux-next build (arm
> > >> multi_v7_defconfig) failed like this:
> > >>
> > >> block/blk-timeout.c: In function 'blk_round_jiffies':
> > >> block/blk-timeout.c:96:14: error: 'CONFIG_HZ_ROUGH_MASK' undeclared (first use in this function)
> > >> 96 | return (j + CONFIG_HZ_ROUGH_MASK) + 1;
> > >> | ^~~~~~~~~~~~~~~~~~~~
> > >>
> > >> Caused by commit
> > >>
> > >> 91ba0f529364 ("block: relax jiffies rounding for timeouts")
> > >>
> > >> CONFIG_HZ_ROUGH_MASK is not defined for this build even though
> > >> CONFIG_HZ_100 is set. The arm arch does not include kernel/Kconfig.hz.
> > >>
> > >> I have reverted that commit for today.
> > >
> > > (as I don't have the original patch in my email, I'm commenting here)
> > >
> > > +config HZ_ROUGH_MASK
> > > + int
> > > + default 127 if HZ_100
> > > + default 255 if HZ_250 || HZ_300
> > > + default 1023 if HZ_1000
> > >
> > > What about other HZ_* values?
> >
> > Which other ones do we have?
>
> $ git grep "\<HZ_[0-9]" -- "*Kconf*"
> arch/alpha/Kconfig: default HZ_128 if ALPHA_QEMU
> arch/alpha/Kconfig: default HZ_1200 if ALPHA_RAWHIDE
> arch/alpha/Kconfig: default HZ_1024

And ARC allows you to enter any integer value:

config HZ
int "Timer Frequency"
default 100

So probably you want to derive something from the integer value itself.

Note that not all architectures include kernel/Kconfig.hz.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2020-07-15 15:26:09

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On 7/15/20 9:22 AM, Geert Uytterhoeven wrote:
> Hi Jens,
>
>> On Wed, Jul 15, 2020 at 5:08 PM Jens Axboe <[email protected]> wrote:
>>> On 7/15/20 3:24 AM, Geert Uytterhoeven wrote:
>>>> On Wed, Jul 15, 2020 at 4:26 AM Stephen Rothwell <[email protected]> wrote:
>>>>> After merging the block tree, today's linux-next build (arm
>>>>> multi_v7_defconfig) failed like this:
>>>>>
>>>>> block/blk-timeout.c: In function 'blk_round_jiffies':
>>>>> block/blk-timeout.c:96:14: error: 'CONFIG_HZ_ROUGH_MASK' undeclared (first use in this function)
>>>>> 96 | return (j + CONFIG_HZ_ROUGH_MASK) + 1;
>>>>> | ^~~~~~~~~~~~~~~~~~~~
>>>>>
>>>>> Caused by commit
>>>>>
>>>>> 91ba0f529364 ("block: relax jiffies rounding for timeouts")
>>>>>
>>>>> CONFIG_HZ_ROUGH_MASK is not defined for this build even though
>>>>> CONFIG_HZ_100 is set. The arm arch does not include kernel/Kconfig.hz.
>>>>>
>>>>> I have reverted that commit for today.
>>>>
>>>> (as I don't have the original patch in my email, I'm commenting here)
>>>>
>>>> +config HZ_ROUGH_MASK
>>>> + int
>>>> + default 127 if HZ_100
>>>> + default 255 if HZ_250 || HZ_300
>>>> + default 1023 if HZ_1000
>>>>
>>>> What about other HZ_* values?
>>>
>>> Which other ones do we have?
>>
>> $ git grep "\<HZ_[0-9]" -- "*Kconf*"
>> arch/alpha/Kconfig: default HZ_128 if ALPHA_QEMU
>> arch/alpha/Kconfig: default HZ_1200 if ALPHA_RAWHIDE
>> arch/alpha/Kconfig: default HZ_1024
>
> And ARC allows you to enter any integer value:
>
> config HZ
> int "Timer Frequency"
> default 100
>
> So probably you want to derive something from the integer value itself.
>
> Note that not all architectures include kernel/Kconfig.hz.

I've dropped the dependency on Kconfig solving it, and just made it
an initcall setup to generate the mask. That should work on all archs
and not be dependent on fixed HZ settings.

--
Jens Axboe