* [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-17 11:25 ` Xiu Jianfeng
0 siblings, 0 replies; 9+ messages in thread
From: Xiu Jianfeng @ 2022-05-17 11:25 UTC (permalink / raw)
To: tj, lizefan.x, hannes; +Cc: cgroups, linux-kernel
Make cgroup_debug static since it's only used in cgroup.c
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
kernel/cgroup/cgroup-internal.h | 1 -
kernel/cgroup/cgroup.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h
index 6e36e854b512..5da09c74228d 100644
--- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h
@@ -12,7 +12,6 @@
#define TRACE_CGROUP_PATH_LEN 1024
extern spinlock_t trace_cgroup_path_lock;
extern char trace_cgroup_path[TRACE_CGROUP_PATH_LEN];
-extern bool cgroup_debug;
extern void __init enable_debug_cgroup(void);
/*
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index adb820e98f24..a97fd051430b 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -96,7 +96,7 @@ EXPORT_SYMBOL_GPL(css_set_lock);
DEFINE_SPINLOCK(trace_cgroup_path_lock);
char trace_cgroup_path[TRACE_CGROUP_PATH_LEN];
-bool cgroup_debug __read_mostly;
+static bool cgroup_debug __read_mostly;
/*
* Protects cgroup_idr and css_idr so that IDs can be released without
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-17 11:25 ` Xiu Jianfeng
0 siblings, 0 replies; 9+ messages in thread
From: Xiu Jianfeng @ 2022-05-17 11:25 UTC (permalink / raw)
To: tj-DgEjT+Ai2ygdnm+yROfE0A, lizefan.x-EC8Uxl6Npydl57MIdRCFDg,
hannes-druUgvl0LCNAfugRpC6u6w
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA
Make cgroup_debug static since it's only used in cgroup.c
Signed-off-by: Xiu Jianfeng <xiujianfeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
kernel/cgroup/cgroup-internal.h | 1 -
kernel/cgroup/cgroup.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h
index 6e36e854b512..5da09c74228d 100644
--- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h
@@ -12,7 +12,6 @@
#define TRACE_CGROUP_PATH_LEN 1024
extern spinlock_t trace_cgroup_path_lock;
extern char trace_cgroup_path[TRACE_CGROUP_PATH_LEN];
-extern bool cgroup_debug;
extern void __init enable_debug_cgroup(void);
/*
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index adb820e98f24..a97fd051430b 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -96,7 +96,7 @@ EXPORT_SYMBOL_GPL(css_set_lock);
DEFINE_SPINLOCK(trace_cgroup_path_lock);
char trace_cgroup_path[TRACE_CGROUP_PATH_LEN];
-bool cgroup_debug __read_mostly;
+static bool cgroup_debug __read_mostly;
/*
* Protects cgroup_idr and css_idr so that IDs can be released without
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-17 17:06 ` Tejun Heo
0 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2022-05-17 17:06 UTC (permalink / raw)
To: Xiu Jianfeng; +Cc: lizefan.x, hannes, cgroups, linux-kernel
On Tue, May 17, 2022 at 07:25:23PM +0800, Xiu Jianfeng wrote:
> Make cgroup_debug static since it's only used in cgroup.c
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
The only thing it does is gating CFTYPE_DEBUG which isn't used anymore.
Can you remove both CFTYPE_DEBUG and cgroup_debug() instead?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-17 17:06 ` Tejun Heo
0 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2022-05-17 17:06 UTC (permalink / raw)
To: Xiu Jianfeng
Cc: lizefan.x-EC8Uxl6Npydl57MIdRCFDg, hannes-druUgvl0LCNAfugRpC6u6w,
cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Tue, May 17, 2022 at 07:25:23PM +0800, Xiu Jianfeng wrote:
> Make cgroup_debug static since it's only used in cgroup.c
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
The only thing it does is gating CFTYPE_DEBUG which isn't used anymore.
Can you remove both CFTYPE_DEBUG and cgroup_debug() instead?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-18 6:48 ` xiujianfeng
0 siblings, 0 replies; 9+ messages in thread
From: xiujianfeng @ 2022-05-18 6:48 UTC (permalink / raw)
To: Tejun Heo; +Cc: lizefan.x, hannes, cgroups, linux-kernel
在 2022/5/18 1:06, Tejun Heo 写道:
> On Tue, May 17, 2022 at 07:25:23PM +0800, Xiu Jianfeng wrote:
>> Make cgroup_debug static since it's only used in cgroup.c
>>
>> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> The only thing it does is gating CFTYPE_DEBUG which isn't used anymore.
> Can you remove both CFTYPE_DEBUG and cgroup_debug() instead?
It's ok to me, but I found CFTYPE_DEBUG is still used in cpuset subsys,
.name = "cpus.subpartitions",
.seq_show = cpuset_common_seq_show,
.private = FILE_SUBPARTS_CPULIST,
.flags = CFTYPE_DEBUG,
if remove CFTYPE_DEBUG and cgroup_debug, cpus.subpartitions will be
showed by default, is this ok?
>
> Thanks.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-18 6:48 ` xiujianfeng
0 siblings, 0 replies; 9+ messages in thread
From: xiujianfeng @ 2022-05-18 6:48 UTC (permalink / raw)
To: Tejun Heo
Cc: lizefan.x-EC8Uxl6Npydl57MIdRCFDg, hannes-druUgvl0LCNAfugRpC6u6w,
cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
在 2022/5/18 1:06, Tejun Heo 写道:
> On Tue, May 17, 2022 at 07:25:23PM +0800, Xiu Jianfeng wrote:
>> Make cgroup_debug static since it's only used in cgroup.c
>>
>> Signed-off-by: Xiu Jianfeng <xiujianfeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> The only thing it does is gating CFTYPE_DEBUG which isn't used anymore.
> Can you remove both CFTYPE_DEBUG and cgroup_debug() instead?
It's ok to me, but I found CFTYPE_DEBUG is still used in cpuset subsys,
.name = "cpus.subpartitions",
.seq_show = cpuset_common_seq_show,
.private = FILE_SUBPARTS_CPULIST,
.flags = CFTYPE_DEBUG,
if remove CFTYPE_DEBUG and cgroup_debug, cpus.subpartitions will be
showed by default, is this ok?
>
> Thanks.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-18 16:57 ` Tejun Heo
0 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2022-05-18 16:57 UTC (permalink / raw)
To: xiujianfeng; +Cc: lizefan.x, hannes, cgroups, linux-kernel
On Wed, May 18, 2022 at 02:48:36PM +0800, xiujianfeng wrote:
>
> 在 2022/5/18 1:06, Tejun Heo 写道:
> > On Tue, May 17, 2022 at 07:25:23PM +0800, Xiu Jianfeng wrote:
> > > Make cgroup_debug static since it's only used in cgroup.c
> > >
> > > Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> > The only thing it does is gating CFTYPE_DEBUG which isn't used anymore.
> > Can you remove both CFTYPE_DEBUG and cgroup_debug() instead?
>
> It's ok to me, but I found CFTYPE_DEBUG is still used in cpuset subsys,
>
> .name = "cpus.subpartitions",
> .seq_show = cpuset_common_seq_show,
> .private = FILE_SUBPARTS_CPULIST,
> .flags = CFTYPE_DEBUG,
>
> if remove CFTYPE_DEBUG and cgroup_debug, cpus.subpartitions will be showed
> by default, is this ok?
Ah, I missed that. You're right. Lemme apply the original path.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] cgroup: Make cgroup_debug static
@ 2022-05-18 16:57 ` Tejun Heo
0 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2022-05-18 16:57 UTC (permalink / raw)
To: xiujianfeng
Cc: lizefan.x-EC8Uxl6Npydl57MIdRCFDg, hannes-druUgvl0LCNAfugRpC6u6w,
cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Wed, May 18, 2022 at 02:48:36PM +0800, xiujianfeng wrote:
>
> 在 2022/5/18 1:06, Tejun Heo 写道:
> > On Tue, May 17, 2022 at 07:25:23PM +0800, Xiu Jianfeng wrote:
> > > Make cgroup_debug static since it's only used in cgroup.c
> > >
> > > Signed-off-by: Xiu Jianfeng <xiujianfeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> > The only thing it does is gating CFTYPE_DEBUG which isn't used anymore.
> > Can you remove both CFTYPE_DEBUG and cgroup_debug() instead?
>
> It's ok to me, but I found CFTYPE_DEBUG is still used in cpuset subsys,
>
> .name = "cpus.subpartitions",
> .seq_show = cpuset_common_seq_show,
> .private = FILE_SUBPARTS_CPULIST,
> .flags = CFTYPE_DEBUG,
>
> if remove CFTYPE_DEBUG and cgroup_debug, cpus.subpartitions will be showed
> by default, is this ok?
Ah, I missed that. You're right. Lemme apply the original path.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] cgroup: Make cgroup_debug static
2022-05-17 11:25 ` Xiu Jianfeng
(?)
(?)
@ 2022-05-18 17:03 ` Tejun Heo
-1 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2022-05-18 17:03 UTC (permalink / raw)
To: Xiu Jianfeng; +Cc: lizefan.x, hannes, cgroups, linux-kernel
On Tue, May 17, 2022 at 07:25:23PM +0800, Xiu Jianfeng wrote:
> Make cgroup_debug static since it's only used in cgroup.c
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Applied to cgroup/for-5.19.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-05-18 17:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 11:25 [PATCH -next] cgroup: Make cgroup_debug static Xiu Jianfeng
2022-05-17 11:25 ` Xiu Jianfeng
2022-05-17 17:06 ` Tejun Heo
2022-05-17 17:06 ` Tejun Heo
2022-05-18 6:48 ` xiujianfeng
2022-05-18 6:48 ` xiujianfeng
2022-05-18 16:57 ` Tejun Heo
2022-05-18 16:57 ` Tejun Heo
2022-05-18 17:03 ` Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.