sched/psi: make psi_cgroups_enabled static

Message ID 20230525103428.49712-1-linmiaohe@huawei.com
State New
Headers
Series sched/psi: make psi_cgroups_enabled static |

Commit Message

Miaohe Lin May 25, 2023, 10:34 a.m. UTC
  The static key psi_cgroups_enabled is only used inside file psi.c.
Make it static.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 kernel/sched/psi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Suren Baghdasaryan May 25, 2023, 5:43 p.m. UTC | #1
On Wed, May 24, 2023 at 7:43 PM Miaohe Lin <linmiaohe@huawei.com> wrote:
>
> The static key psi_cgroups_enabled is only used inside file psi.c.
> Make it static.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

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

> ---
>  kernel/sched/psi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
> index 81fca77397f6..2ccb0b2ebd78 100644
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -140,7 +140,7 @@
>  static int psi_bug __read_mostly;
>
>  DEFINE_STATIC_KEY_FALSE(psi_disabled);
> -DEFINE_STATIC_KEY_TRUE(psi_cgroups_enabled);
> +static DEFINE_STATIC_KEY_TRUE(psi_cgroups_enabled);
>
>  #ifdef CONFIG_PSI_DEFAULT_DISABLED
>  static bool psi_enable;
> --
> 2.27.0
>
  
Johannes Weiner May 25, 2023, 5:49 p.m. UTC | #2
On Thu, May 25, 2023 at 06:34:28PM +0800, Miaohe Lin wrote:
> The static key psi_cgroups_enabled is only used inside file psi.c.
> Make it static.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

This was previously submitted by Tom:
https://lore.kernel.org/lkml/20230405163602.1939400-1-trix@redhat.com/

Peter, could you please pick this up?

Thanks!
  
Miaohe Lin June 17, 2023, 2:01 a.m. UTC | #3
On 2023/5/26 1:49, Johannes Weiner wrote:
> On Thu, May 25, 2023 at 06:34:28PM +0800, Miaohe Lin wrote:
>> The static key psi_cgroups_enabled is only used inside file psi.c.
>> Make it static.
>>
>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> 
> This was previously submitted by Tom:
> https://lore.kernel.org/lkml/20230405163602.1939400-1-trix@redhat.com/
> 
> Peter, could you please pick this up?
> 

friendly ping.. :)

> Thanks!
> .
>
  
Peter Zijlstra July 6, 2023, 10:29 a.m. UTC | #4
On Thu, May 25, 2023 at 01:49:37PM -0400, Johannes Weiner wrote:
> On Thu, May 25, 2023 at 06:34:28PM +0800, Miaohe Lin wrote:
> > The static key psi_cgroups_enabled is only used inside file psi.c.
> > Make it static.
> > 
> > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> 
> This was previously submitted by Tom:
> https://lore.kernel.org/lkml/20230405163602.1939400-1-trix@redhat.com/
> 
> Peter, could you please pick this up?

Found it, will queue after -rc1.
  

Patch

diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index 81fca77397f6..2ccb0b2ebd78 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -140,7 +140,7 @@ 
 static int psi_bug __read_mostly;
 
 DEFINE_STATIC_KEY_FALSE(psi_disabled);
-DEFINE_STATIC_KEY_TRUE(psi_cgroups_enabled);
+static DEFINE_STATIC_KEY_TRUE(psi_cgroups_enabled);
 
 #ifdef CONFIG_PSI_DEFAULT_DISABLED
 static bool psi_enable;