From: tip-bot for Li Zefan <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
peterz@infradead.org, tglx@linutronix.de, lizefan@huawei.com
Subject: [tip:sched/core] sched: Move struct sched_class to kernel/sched/ sched.h
Date: Wed, 6 Mar 2013 06:38:53 -0800 [thread overview]
Message-ID: <tip-c82ba9fa7588dfd02d4dc99ad1af486304bc424c@git.kernel.org> (raw)
In-Reply-To: <5135A79F.8090502@huawei.com>
Commit-ID: c82ba9fa7588dfd02d4dc99ad1af486304bc424c
Gitweb: http://git.kernel.org/tip/c82ba9fa7588dfd02d4dc99ad1af486304bc424c
Author: Li Zefan <lizefan@huawei.com>
AuthorDate: Tue, 5 Mar 2013 16:06:55 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 6 Mar 2013 11:24:33 +0100
sched: Move struct sched_class to kernel/sched/sched.h
It's used internally only.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/5135A79F.8090502@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/sched.h | 59 ---------------------------------------------------
kernel/sched/sched.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 59 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 863b505..04b834f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -917,65 +917,6 @@ struct mempolicy;
struct pipe_inode_info;
struct uts_namespace;
-struct rq;
-struct sched_domain;
-
-#define ENQUEUE_WAKEUP 1
-#define ENQUEUE_HEAD 2
-#ifdef CONFIG_SMP
-#define ENQUEUE_WAKING 4 /* sched_class::task_waking was called */
-#else
-#define ENQUEUE_WAKING 0
-#endif
-
-#define DEQUEUE_SLEEP 1
-
-struct sched_class {
- const struct sched_class *next;
-
- void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags);
- void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags);
- void (*yield_task) (struct rq *rq);
- bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt);
-
- void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags);
-
- struct task_struct * (*pick_next_task) (struct rq *rq);
- void (*put_prev_task) (struct rq *rq, struct task_struct *p);
-
-#ifdef CONFIG_SMP
- int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags);
- void (*migrate_task_rq)(struct task_struct *p, int next_cpu);
-
- void (*pre_schedule) (struct rq *this_rq, struct task_struct *task);
- void (*post_schedule) (struct rq *this_rq);
- void (*task_waking) (struct task_struct *task);
- void (*task_woken) (struct rq *this_rq, struct task_struct *task);
-
- void (*set_cpus_allowed)(struct task_struct *p,
- const struct cpumask *newmask);
-
- void (*rq_online)(struct rq *rq);
- void (*rq_offline)(struct rq *rq);
-#endif
-
- void (*set_curr_task) (struct rq *rq);
- void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
- void (*task_fork) (struct task_struct *p);
-
- void (*switched_from) (struct rq *this_rq, struct task_struct *task);
- void (*switched_to) (struct rq *this_rq, struct task_struct *task);
- void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
- int oldprio);
-
- unsigned int (*get_rr_interval) (struct rq *rq,
- struct task_struct *task);
-
-#ifdef CONFIG_FAIR_GROUP_SCHED
- void (*task_move_group) (struct task_struct *p, int on_rq);
-#endif
-};
-
struct load_weight {
unsigned long weight, inv_weight;
};
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 4e5c2af..eca526d 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -951,6 +951,61 @@ enum cpuacct_stat_index {
CPUACCT_STAT_NSTATS,
};
+#define ENQUEUE_WAKEUP 1
+#define ENQUEUE_HEAD 2
+#ifdef CONFIG_SMP
+#define ENQUEUE_WAKING 4 /* sched_class::task_waking was called */
+#else
+#define ENQUEUE_WAKING 0
+#endif
+
+#define DEQUEUE_SLEEP 1
+
+struct sched_class {
+ const struct sched_class *next;
+
+ void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags);
+ void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags);
+ void (*yield_task) (struct rq *rq);
+ bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt);
+
+ void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags);
+
+ struct task_struct * (*pick_next_task) (struct rq *rq);
+ void (*put_prev_task) (struct rq *rq, struct task_struct *p);
+
+#ifdef CONFIG_SMP
+ int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags);
+ void (*migrate_task_rq)(struct task_struct *p, int next_cpu);
+
+ void (*pre_schedule) (struct rq *this_rq, struct task_struct *task);
+ void (*post_schedule) (struct rq *this_rq);
+ void (*task_waking) (struct task_struct *task);
+ void (*task_woken) (struct rq *this_rq, struct task_struct *task);
+
+ void (*set_cpus_allowed)(struct task_struct *p,
+ const struct cpumask *newmask);
+
+ void (*rq_online)(struct rq *rq);
+ void (*rq_offline)(struct rq *rq);
+#endif
+
+ void (*set_curr_task) (struct rq *rq);
+ void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
+ void (*task_fork) (struct task_struct *p);
+
+ void (*switched_from) (struct rq *this_rq, struct task_struct *task);
+ void (*switched_to) (struct rq *this_rq, struct task_struct *task);
+ void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
+ int oldprio);
+
+ unsigned int (*get_rr_interval) (struct rq *rq,
+ struct task_struct *task);
+
+#ifdef CONFIG_FAIR_GROUP_SCHED
+ void (*task_move_group) (struct task_struct *p, int on_rq);
+#endif
+};
#define sched_class_highest (&stop_sched_class)
#define for_each_class(class) \
next prev parent reply other threads:[~2013-03-06 14:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 8:05 [PATCH 0/9] sched: Shrink include/linux/sched.h Li Zefan
2013-03-05 8:05 ` [PATCH 1/9] sched: Remove some dummpy functions Li Zefan
2013-03-06 14:32 ` [tip:sched/core] sched: Remove some dummy functions tip-bot for Li Zefan
2013-03-05 8:05 ` [PATCH 2/9] sched: Remove test_sd_parent() Li Zefan
2013-03-06 14:34 ` [tip:sched/core] " tip-bot for Li Zefan
2013-03-05 8:06 ` [PATCH 3/9] sched: Move SCHED_LOAD_SHIFT macros to kernel/sched/sched.h Li Zefan
2013-03-06 14:35 ` [tip:sched/core] sched: Move SCHED_LOAD_SHIFT macros to kernel/ sched/sched.h tip-bot for Li Zefan
2013-03-05 8:06 ` [PATCH 4/9] sched: Move struct sched_group to kernel/sched/sched.h Li Zefan
2013-03-06 14:36 ` [tip:sched/core] sched: Move struct sched_group to kernel/sched/ sched.h tip-bot for Li Zefan
2013-03-05 8:06 ` [PATCH 5/9] sched: Move wake flags to kernel/sched/sched.h Li Zefan
2013-03-06 14:37 ` [tip:sched/core] " tip-bot for Li Zefan
2013-03-05 8:06 ` [PATCH 6/9] sched: Move struct sched_class " Li Zefan
2013-03-06 14:38 ` tip-bot for Li Zefan [this message]
2013-03-05 8:07 ` [PATCH 7/9] sched: Make default_scale_freq_power() static Li Zefan
2013-03-06 14:40 ` [tip:sched/core] " tip-bot for Li Zefan
2013-03-05 8:07 ` [PATCH 8/9] sched: Move group scheduling functions out of include/linux/sched.h Li Zefan
2013-03-06 14:41 ` [tip:sched/core] " tip-bot for Li Zefan
2013-03-05 8:07 ` [PATCH 9/9] sched: Remove double declaration of root_task_group Li Zefan
2013-03-06 14:42 ` [tip:sched/core] " tip-bot for Li Zefan
2013-03-05 16:43 ` [PATCH 0/9] sched: Shrink include/linux/sched.h Lai Jiangshan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-c82ba9fa7588dfd02d4dc99ad1af486304bc424c@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox