PSI: select KERNFS as needed

Message ID 20230731030740.12411-1-rdunlap@infradead.org
State New
Headers
Series PSI: select KERNFS as needed |

Commit Message

Randy Dunlap July 31, 2023, 3:07 a.m. UTC
  Users of KERNFS should select it to enforce its being built, so
do this to prevent a build error.

In file included from ../kernel/sched/build_utility.c:97:
../kernel/sched/psi.c: In function 'psi_trigger_poll':
../kernel/sched/psi.c:1479:17: error: implicit declaration of function 'kernfs_generic_poll' [-Werror=implicit-function-declaration]
 1479 |                 kernfs_generic_poll(t->of, wait);

Fixes: aff037078eca ("sched/psi: use kernfs polling functions for PSI trigger polling")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: lore.kernel.org/r/202307310732.r65EQFY0-lkp@intel.com
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
---
 init/Kconfig |    1 +
 1 file changed, 1 insertion(+)
  

Comments

Suren Baghdasaryan July 31, 2023, 6:14 p.m. UTC | #1
On Sun, Jul 30, 2023 at 8:07 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Users of KERNFS should select it to enforce its being built, so
> do this to prevent a build error.
>
> In file included from ../kernel/sched/build_utility.c:97:
> ../kernel/sched/psi.c: In function 'psi_trigger_poll':
> ../kernel/sched/psi.c:1479:17: error: implicit declaration of function 'kernfs_generic_poll' [-Werror=implicit-function-declaration]
>  1479 |                 kernfs_generic_poll(t->of, wait);
>
> Fixes: aff037078eca ("sched/psi: use kernfs polling functions for PSI trigger polling")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Link: lore.kernel.org/r/202307310732.r65EQFY0-lkp@intel.com
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Suren Baghdasaryan <surenb@google.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>

Acked-by: Suren Baghdasaryan <surenb@google.com>

Thanks!


> ---
>  init/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
>
> diff -- a/init/Kconfig b/init/Kconfig
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -629,6 +629,7 @@ config TASK_IO_ACCOUNTING
>
>  config PSI
>         bool "Pressure stall information tracking"
> +       select KERNFS
>         help
>           Collect metrics that indicate how overcommitted the CPU, memory,
>           and IO capacity are in the system.
  
Suren Baghdasaryan July 31, 2023, 6:17 p.m. UTC | #2
On Mon, Jul 31, 2023 at 11:14 AM Suren Baghdasaryan <surenb@google.com> wrote:
>
> On Sun, Jul 30, 2023 at 8:07 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >
> > Users of KERNFS should select it to enforce its being built, so
> > do this to prevent a build error.
> >
> > In file included from ../kernel/sched/build_utility.c:97:
> > ../kernel/sched/psi.c: In function 'psi_trigger_poll':
> > ../kernel/sched/psi.c:1479:17: error: implicit declaration of function 'kernfs_generic_poll' [-Werror=implicit-function-declaration]
> >  1479 |                 kernfs_generic_poll(t->of, wait);
> >
> > Fixes: aff037078eca ("sched/psi: use kernfs polling functions for PSI trigger polling")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Reported-by: kernel test robot <lkp@intel.com>

shouldn't this include:
Closes: https://lore.kernel.org/oe-kbuild-all/202307310732.r65EQFY0-lkp@intel.com/
?

> > Link: lore.kernel.org/r/202307310732.r65EQFY0-lkp@intel.com
> > Cc: Johannes Weiner <hannes@cmpxchg.org>
> > Cc: Suren Baghdasaryan <surenb@google.com>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Juri Lelli <juri.lelli@redhat.com>
> > Cc: Vincent Guittot <vincent.guittot@linaro.org>
>
> Acked-by: Suren Baghdasaryan <surenb@google.com>
>
> Thanks!
>
>
> > ---
> >  init/Kconfig |    1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff -- a/init/Kconfig b/init/Kconfig
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -629,6 +629,7 @@ config TASK_IO_ACCOUNTING
> >
> >  config PSI
> >         bool "Pressure stall information tracking"
> > +       select KERNFS
> >         help
> >           Collect metrics that indicate how overcommitted the CPU, memory,
> >           and IO capacity are in the system.
  
Randy Dunlap July 31, 2023, 11:13 p.m. UTC | #3
On 7/31/23 11:17, Suren Baghdasaryan wrote:
> On Mon, Jul 31, 2023 at 11:14 AM Suren Baghdasaryan <surenb@google.com> wrote:
>>
>> On Sun, Jul 30, 2023 at 8:07 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>>
>>> Users of KERNFS should select it to enforce its being built, so
>>> do this to prevent a build error.
>>>
>>> In file included from ../kernel/sched/build_utility.c:97:
>>> ../kernel/sched/psi.c: In function 'psi_trigger_poll':
>>> ../kernel/sched/psi.c:1479:17: error: implicit declaration of function 'kernfs_generic_poll' [-Werror=implicit-function-declaration]
>>>  1479 |                 kernfs_generic_poll(t->of, wait);
>>>
>>> Fixes: aff037078eca ("sched/psi: use kernfs polling functions for PSI trigger polling")
>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>>> Reported-by: kernel test robot <lkp@intel.com>
> 
> shouldn't this include:
> Closes: https://lore.kernel.org/oe-kbuild-all/202307310732.r65EQFY0-lkp@intel.com/
> ?
> 

That's the same URL as the Link: below.
The difference(s) in Closes: and Link: are not clear to me,
other than Closes: is newer.

>>> Link: lore.kernel.org/r/202307310732.r65EQFY0-lkp@intel.com
>>> Cc: Johannes Weiner <hannes@cmpxchg.org>
>>> Cc: Suren Baghdasaryan <surenb@google.com>
>>> Cc: Ingo Molnar <mingo@redhat.com>
>>> Cc: Peter Zijlstra <peterz@infradead.org>
>>> Cc: Juri Lelli <juri.lelli@redhat.com>
>>> Cc: Vincent Guittot <vincent.guittot@linaro.org>
>>
>> Acked-by: Suren Baghdasaryan <surenb@google.com>
>>
>> Thanks!
>>
>>
>>> ---
>>>  init/Kconfig |    1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff -- a/init/Kconfig b/init/Kconfig
>>> --- a/init/Kconfig
>>> +++ b/init/Kconfig
>>> @@ -629,6 +629,7 @@ config TASK_IO_ACCOUNTING
>>>
>>>  config PSI
>>>         bool "Pressure stall information tracking"
>>> +       select KERNFS
>>>         help
>>>           Collect metrics that indicate how overcommitted the CPU, memory,
>>>           and IO capacity are in the system.
  
Suren Baghdasaryan July 31, 2023, 11:16 p.m. UTC | #4
On Mon, Jul 31, 2023 at 4:13 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 7/31/23 11:17, Suren Baghdasaryan wrote:
> > On Mon, Jul 31, 2023 at 11:14 AM Suren Baghdasaryan <surenb@google.com> wrote:
> >>
> >> On Sun, Jul 30, 2023 at 8:07 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>>
> >>> Users of KERNFS should select it to enforce its being built, so
> >>> do this to prevent a build error.
> >>>
> >>> In file included from ../kernel/sched/build_utility.c:97:
> >>> ../kernel/sched/psi.c: In function 'psi_trigger_poll':
> >>> ../kernel/sched/psi.c:1479:17: error: implicit declaration of function 'kernfs_generic_poll' [-Werror=implicit-function-declaration]
> >>>  1479 |                 kernfs_generic_poll(t->of, wait);
> >>>
> >>> Fixes: aff037078eca ("sched/psi: use kernfs polling functions for PSI trigger polling")
> >>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >
> > shouldn't this include:
> > Closes: https://lore.kernel.org/oe-kbuild-all/202307310732.r65EQFY0-lkp@intel.com/
> > ?
> >
>
> That's the same URL as the Link: below.
> The difference(s) in Closes: and Link: are not clear to me,
> other than Closes: is newer.

Either way, LGTM. Thanks!

>
> >>> Link: lore.kernel.org/r/202307310732.r65EQFY0-lkp@intel.com
> >>> Cc: Johannes Weiner <hannes@cmpxchg.org>
> >>> Cc: Suren Baghdasaryan <surenb@google.com>
> >>> Cc: Ingo Molnar <mingo@redhat.com>
> >>> Cc: Peter Zijlstra <peterz@infradead.org>
> >>> Cc: Juri Lelli <juri.lelli@redhat.com>
> >>> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> >>
> >> Acked-by: Suren Baghdasaryan <surenb@google.com>
> >>
> >> Thanks!
> >>
> >>
> >>> ---
> >>>  init/Kconfig |    1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff -- a/init/Kconfig b/init/Kconfig
> >>> --- a/init/Kconfig
> >>> +++ b/init/Kconfig
> >>> @@ -629,6 +629,7 @@ config TASK_IO_ACCOUNTING
> >>>
> >>>  config PSI
> >>>         bool "Pressure stall information tracking"
> >>> +       select KERNFS
> >>>         help
> >>>           Collect metrics that indicate how overcommitted the CPU, memory,
> >>>           and IO capacity are in the system.
>
> --
> ~Randy
  

Patch

diff -- a/init/Kconfig b/init/Kconfig
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -629,6 +629,7 @@  config TASK_IO_ACCOUNTING
 
 config PSI
 	bool "Pressure stall information tracking"
+	select KERNFS
 	help
 	  Collect metrics that indicate how overcommitted the CPU, memory,
 	  and IO capacity are in the system.