* [PATCH] sched: Make cookie functions static
@ 2021-09-22 8:57 Shaokun Zhang
2021-09-22 12:50 ` Peter Zijlstra
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Shaokun Zhang @ 2021-09-22 8:57 UTC (permalink / raw)
To: linux-kernel
Cc: Shaokun Zhang, Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
Make cookie functions static as these are no longer invoked directly
by other code.
No functional change intended.
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>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
kernel/sched/core_sched.c | 9 +++++----
kernel/sched/sched.h | 5 -----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
index 9a80e9a474c0..48ac72696012 100644
--- a/kernel/sched/core_sched.c
+++ b/kernel/sched/core_sched.c
@@ -11,7 +11,7 @@ struct sched_core_cookie {
refcount_t refcnt;
};
-unsigned long sched_core_alloc_cookie(void)
+static unsigned long sched_core_alloc_cookie(void)
{
struct sched_core_cookie *ck = kmalloc(sizeof(*ck), GFP_KERNEL);
if (!ck)
@@ -23,7 +23,7 @@ unsigned long sched_core_alloc_cookie(void)
return (unsigned long)ck;
}
-void sched_core_put_cookie(unsigned long cookie)
+static void sched_core_put_cookie(unsigned long cookie)
{
struct sched_core_cookie *ptr = (void *)cookie;
@@ -33,7 +33,7 @@ void sched_core_put_cookie(unsigned long cookie)
}
}
-unsigned long sched_core_get_cookie(unsigned long cookie)
+static unsigned long sched_core_get_cookie(unsigned long cookie)
{
struct sched_core_cookie *ptr = (void *)cookie;
@@ -53,7 +53,8 @@ unsigned long sched_core_get_cookie(unsigned long cookie)
*
* Returns: the old cookie
*/
-unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie)
+static unsigned long sched_core_update_cookie(struct task_struct *p,
+ unsigned long cookie)
{
unsigned long old_cookie;
struct rq_flags rf;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index cae475ff28b5..a09d11d41e4c 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1260,11 +1260,6 @@ extern void sched_core_dequeue(struct rq *rq, struct task_struct *p);
extern void sched_core_get(void);
extern void sched_core_put(void);
-extern unsigned long sched_core_alloc_cookie(void);
-extern void sched_core_put_cookie(unsigned long cookie);
-extern unsigned long sched_core_get_cookie(unsigned long cookie);
-extern unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie);
-
#else /* !CONFIG_SCHED_CORE */
static inline bool sched_core_enabled(struct rq *rq)
--
2.33.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: Make cookie functions static
2021-09-22 8:57 [PATCH] sched: Make cookie functions static Shaokun Zhang
@ 2021-09-22 12:50 ` Peter Zijlstra
2021-09-23 3:30 ` Shaokun Zhang
2021-10-01 15:05 ` [tip: sched/core] " tip-bot2 for Shaokun Zhang
2021-10-05 14:11 ` tip-bot2 for Shaokun Zhang
2 siblings, 1 reply; 5+ messages in thread
From: Peter Zijlstra @ 2021-09-22 12:50 UTC (permalink / raw)
To: Shaokun Zhang; +Cc: linux-kernel, Ingo Molnar, Juri Lelli, Vincent Guittot
On Wed, Sep 22, 2021 at 04:57:35PM +0800, Shaokun Zhang wrote:
> Make cookie functions static as these are no longer invoked directly
> by other code.
Yeah, this was supposed to get used from the cgroup code, but that never
happened. I suppose we can do this for now, easy enough to revert
if/when etc..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: Make cookie functions static
2021-09-22 12:50 ` Peter Zijlstra
@ 2021-09-23 3:30 ` Shaokun Zhang
0 siblings, 0 replies; 5+ messages in thread
From: Shaokun Zhang @ 2021-09-23 3:30 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: linux-kernel, Ingo Molnar, Juri Lelli, Vincent Guittot
Hi Peter,
On 2021/9/22 20:50, Peter Zijlstra wrote:
> On Wed, Sep 22, 2021 at 04:57:35PM +0800, Shaokun Zhang wrote:
>> Make cookie functions static as these are no longer invoked directly
>> by other code.
>
> Yeah, this was supposed to get used from the cgroup code, but that never
> happened. I suppose we can do this for now, easy enough to revert
Got it,
Thanks your reply.
> if/when etc..
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: sched/core] sched: Make cookie functions static
2021-09-22 8:57 [PATCH] sched: Make cookie functions static Shaokun Zhang
2021-09-22 12:50 ` Peter Zijlstra
@ 2021-10-01 15:05 ` tip-bot2 for Shaokun Zhang
2021-10-05 14:11 ` tip-bot2 for Shaokun Zhang
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Shaokun Zhang @ 2021-10-01 15:05 UTC (permalink / raw)
To: linux-tip-commits
Cc: Shaokun Zhang, Peter Zijlstra (Intel), x86, linux-kernel
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 1bc687b27bac7fabcc2b0a1a8efad5cf875ac769
Gitweb: https://git.kernel.org/tip/1bc687b27bac7fabcc2b0a1a8efad5cf875ac769
Author: Shaokun Zhang <zhangshaokun@hisilicon.com>
AuthorDate: Wed, 22 Sep 2021 16:57:35 +08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Fri, 01 Oct 2021 13:58:06 +02:00
sched: Make cookie functions static
Make cookie functions static as these are no longer invoked directly
by other code.
No functional change intended.
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210922085735.52812-1-zhangshaokun@hisilicon.com
---
kernel/sched/core_sched.c | 9 +++++----
kernel/sched/sched.h | 5 -----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
index 9a80e9a..48ac726 100644
--- a/kernel/sched/core_sched.c
+++ b/kernel/sched/core_sched.c
@@ -11,7 +11,7 @@ struct sched_core_cookie {
refcount_t refcnt;
};
-unsigned long sched_core_alloc_cookie(void)
+static unsigned long sched_core_alloc_cookie(void)
{
struct sched_core_cookie *ck = kmalloc(sizeof(*ck), GFP_KERNEL);
if (!ck)
@@ -23,7 +23,7 @@ unsigned long sched_core_alloc_cookie(void)
return (unsigned long)ck;
}
-void sched_core_put_cookie(unsigned long cookie)
+static void sched_core_put_cookie(unsigned long cookie)
{
struct sched_core_cookie *ptr = (void *)cookie;
@@ -33,7 +33,7 @@ void sched_core_put_cookie(unsigned long cookie)
}
}
-unsigned long sched_core_get_cookie(unsigned long cookie)
+static unsigned long sched_core_get_cookie(unsigned long cookie)
{
struct sched_core_cookie *ptr = (void *)cookie;
@@ -53,7 +53,8 @@ unsigned long sched_core_get_cookie(unsigned long cookie)
*
* Returns: the old cookie
*/
-unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie)
+static unsigned long sched_core_update_cookie(struct task_struct *p,
+ unsigned long cookie)
{
unsigned long old_cookie;
struct rq_flags rf;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 71bc710..3213e23 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1258,11 +1258,6 @@ extern void sched_core_dequeue(struct rq *rq, struct task_struct *p);
extern void sched_core_get(void);
extern void sched_core_put(void);
-extern unsigned long sched_core_alloc_cookie(void);
-extern void sched_core_put_cookie(unsigned long cookie);
-extern unsigned long sched_core_get_cookie(unsigned long cookie);
-extern unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie);
-
#else /* !CONFIG_SCHED_CORE */
static inline bool sched_core_enabled(struct rq *rq)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip: sched/core] sched: Make cookie functions static
2021-09-22 8:57 [PATCH] sched: Make cookie functions static Shaokun Zhang
2021-09-22 12:50 ` Peter Zijlstra
2021-10-01 15:05 ` [tip: sched/core] " tip-bot2 for Shaokun Zhang
@ 2021-10-05 14:11 ` tip-bot2 for Shaokun Zhang
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Shaokun Zhang @ 2021-10-05 14:11 UTC (permalink / raw)
To: linux-tip-commits
Cc: Shaokun Zhang, Peter Zijlstra (Intel), x86, linux-kernel
The following commit has been merged into the sched/core branch of tip:
Commit-ID: d07b2eee4501c393cbf5bfcad36143310cfd72f9
Gitweb: https://git.kernel.org/tip/d07b2eee4501c393cbf5bfcad36143310cfd72f9
Author: Shaokun Zhang <zhangshaokun@hisilicon.com>
AuthorDate: Wed, 22 Sep 2021 16:57:35 +08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 05 Oct 2021 15:52:07 +02:00
sched: Make cookie functions static
Make cookie functions static as these are no longer invoked directly
by other code.
No functional change intended.
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210922085735.52812-1-zhangshaokun@hisilicon.com
---
kernel/sched/core_sched.c | 9 +++++----
kernel/sched/sched.h | 5 -----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
index 9a80e9a..48ac726 100644
--- a/kernel/sched/core_sched.c
+++ b/kernel/sched/core_sched.c
@@ -11,7 +11,7 @@ struct sched_core_cookie {
refcount_t refcnt;
};
-unsigned long sched_core_alloc_cookie(void)
+static unsigned long sched_core_alloc_cookie(void)
{
struct sched_core_cookie *ck = kmalloc(sizeof(*ck), GFP_KERNEL);
if (!ck)
@@ -23,7 +23,7 @@ unsigned long sched_core_alloc_cookie(void)
return (unsigned long)ck;
}
-void sched_core_put_cookie(unsigned long cookie)
+static void sched_core_put_cookie(unsigned long cookie)
{
struct sched_core_cookie *ptr = (void *)cookie;
@@ -33,7 +33,7 @@ void sched_core_put_cookie(unsigned long cookie)
}
}
-unsigned long sched_core_get_cookie(unsigned long cookie)
+static unsigned long sched_core_get_cookie(unsigned long cookie)
{
struct sched_core_cookie *ptr = (void *)cookie;
@@ -53,7 +53,8 @@ unsigned long sched_core_get_cookie(unsigned long cookie)
*
* Returns: the old cookie
*/
-unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie)
+static unsigned long sched_core_update_cookie(struct task_struct *p,
+ unsigned long cookie)
{
unsigned long old_cookie;
struct rq_flags rf;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index e5c4d4d..a00fc70 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1258,11 +1258,6 @@ extern void sched_core_dequeue(struct rq *rq, struct task_struct *p);
extern void sched_core_get(void);
extern void sched_core_put(void);
-extern unsigned long sched_core_alloc_cookie(void);
-extern void sched_core_put_cookie(unsigned long cookie);
-extern unsigned long sched_core_get_cookie(unsigned long cookie);
-extern unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie);
-
#else /* !CONFIG_SCHED_CORE */
static inline bool sched_core_enabled(struct rq *rq)
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-05 14:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 8:57 [PATCH] sched: Make cookie functions static Shaokun Zhang
2021-09-22 12:50 ` Peter Zijlstra
2021-09-23 3:30 ` Shaokun Zhang
2021-10-01 15:05 ` [tip: sched/core] " tip-bot2 for Shaokun Zhang
2021-10-05 14:11 ` tip-bot2 for Shaokun Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).