[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] xen/sched: fix stale file and function references in comments



Several files in xen/common/sched still reference schedule.c in
their comments, which was the original name of xen/common/sched/core.c
before commit 6cb4b01c03 ("xen/sched: move schedulers and cpupool
coding to dedicated directory") renamed and moved it. Some comments
also reference functions that no longer exist.

Rework the comments to remove stale file and function references.

Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Furkan Caliskan <frn1furkan10@xxxxxxxxx>
---
 xen/common/sched/credit.c  |  9 +++++----
 xen/common/sched/credit2.c |  6 +++---
 xen/common/sched/rt.c      | 10 ++++------
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c
index 07656a57e9..328c802d0c 100644
--- a/xen/common/sched/credit.c
+++ b/xen/common/sched/credit.c
@@ -873,11 +873,12 @@ csched_res_pick(const struct scheduler *ops, const struct 
sched_unit *unit)
     struct csched_unit *svc = CSCHED_UNIT(unit);
 
     /*
-     * We have been called by vcpu_migrate() (in schedule.c), as part
-     * of the process of seeing if vc can be migrated to another pcpu.
+     * We have been called, as part of the process of seeing if vc can be
+     * migrated to another pcpu.
+     *
      * We make a note about this in svc->flags so that later, in
-     * csched_unit_wake() (still called from vcpu_migrate()) we won't
-     * get boosted, which we don't deserve as we are "only" migrating.
+     * csched_unit_wake() we won't get boosted, which we don't deserve
+     * as we are "only" migrating.
      */
     set_bit(CSCHED_FLAG_UNIT_MIGRATING, &svc->flags);
     return get_sched_res(_csched_cpu_pick(ops, unit, true));
diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c
index 77475ee363..95946634d1 100644
--- a/xen/common/sched/credit2.c
+++ b/xen/common/sched/credit2.c
@@ -666,15 +666,15 @@ static inline bool has_cap(const struct csched2_unit *svc)
  * runq, _always_ happens by means of tickling:
  *  - when an unit wakes up, it calls csched2_unit_wake(), which calls
  *    runq_tickle();
- *  - when a migration is initiated in schedule.c, we call csched2_res_pick(),
+ *  - when a migration is initiated, we call csched2_res_pick(),
  *    csched2_unit_migrate() (which calls migrate()) and csched2_unit_wake().
  *    csched2_res_pick() looks for the least loaded runq and return just any
  *    of its processors. Then, csched2_unit_migrate() just moves the unit to
  *    the chosen runq, and it is again runq_tickle(), called by
  *    csched2_unit_wake() that actually decides what pcpu to use within the
  *    chosen runq;
- *  - when a migration is initiated in sched_credit2.c, by calling  migrate()
- *    directly, that again temporarily use a random pcpu from the new runq,
+ *  - when a migration is initiated, by calling migrate() directly,
+ *    that again temporarily use a random pcpu from the new runq,
  *    and then calls runq_tickle(), by itself.
  */
 
diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 4b637aa9db..e2a5d43679 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -80,7 +80,6 @@
  * from all physical cpus.
  *
  * The lock is already grabbed when calling wake/sleep/schedule/ functions
- * in schedule.c
  *
  * The functions involes RunQ and needs to grab locks are:
  *    unit_insert, unit_remove, context_saved, runq_insert
@@ -894,8 +893,7 @@ rt_free_udata(const struct scheduler *ops, void *priv)
 }
 
 /*
- * It is called in sched_move_domain() and sched_init_vcpu
- * in schedule.c.
+ * It is called in sched_move_domain() and sched_init_vcpu()
  * When move a domain to a new cpupool.
  * It inserts units of moving domain to the scheduler's RunQ in
  * dest. cpupool.
@@ -1074,7 +1072,7 @@ runq_pick(const struct scheduler *ops, const cpumask_t 
*mask, unsigned int cpu)
 
 /*
  * schedule function for rt scheduler.
- * The lock is already grabbed in schedule.c, no need to lock here
+ * The lock is already grabbed by the caller, no need to lock here
  */
 static void cf_check
 rt_schedule(const struct scheduler *ops, struct sched_unit *currunit,
@@ -1168,7 +1166,7 @@ rt_schedule(const struct scheduler *ops, struct 
sched_unit *currunit,
 
 /*
  * Remove UNIT from RunQ
- * The lock is already grabbed in schedule.c, no need to lock here
+ * The lock is already grabbed by the caller, no need to lock here
  */
 static void cf_check
 rt_unit_sleep(const struct scheduler *ops, struct sched_unit *unit)
@@ -1281,7 +1279,7 @@ runq_tickle(const struct scheduler *ops, const struct 
rt_unit *new)
 /*
  * Should always wake up runnable unit, put it back to RunQ.
  * Check priority to raise interrupt
- * The lock is already grabbed in schedule.c, no need to lock here
+ * The lock is already grabbed by the caller, no need to lock here
  * TODO: what if these two units belongs to the same domain?
  */
 static void cf_check
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.