Skip to contentSkip to conversation

xen: credit2: cleanup patch for type betterness

PATCH In review Praveen Kumar 3 participants 3 messages Apr 11, 2017 – Apr 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: credit2: cleanup patch for type betterness

The patch actually doesn't impact the functionality as such. This only replaces bool_t with bool in credit2.

---
 xen/common/sched_credit2.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
xen/common/sched_credit2.c +7 -7
index ee7b443f9e..1dfed923d3 100644
@@ -639,17 +639,17 @@ static void deactivate_runqueue(struct csched2_private *prv, int rqi)
     __cpumask_clear_cpu(rqi, &prv->active_queues);
 }
 
-static inline bool_t same_node(unsigned int cpua, unsigned int cpub)
+static inline bool same_node(unsigned int cpua, unsigned int cpub)
 {
     return cpu_to_node(cpua) == cpu_to_node(cpub);
 }
 
-static inline bool_t same_socket(unsigned int cpua, unsigned int cpub)
+static inline bool same_socket(unsigned int cpua, unsigned int cpub)
 {
     return cpu_to_socket(cpua) == cpu_to_socket(cpub);
 }
 
-static inline bool_t same_core(unsigned int cpua, unsigned int cpub)
+static inline bool same_core(unsigned int cpua, unsigned int cpub)
 {
     return same_socket(cpua, cpub) &&
            cpu_to_core(cpua) == cpu_to_core(cpub);
@@ -1882,7 +1882,7 @@ static void migrate(const struct scheduler *ops,
  *  - svc is not already flagged to migrate,
  *  - if svc is allowed to run on at least one of the pcpus of rqd.
  */
-static bool_t vcpu_is_migrateable(struct csched2_vcpu *svc,
+static bool vcpu_is_migrateable(struct csched2_vcpu *svc,
                                   struct csched2_runqueue_data *rqd)
 {
     struct vcpu *v = svc->vcpu;
@@ -1900,7 +1900,7 @@ static void balance_load(const struct scheduler *ops, int cpu, s_time_t now)
     struct csched2_private *prv = csched2_priv(ops);
     int i, max_delta_rqi = -1;
     struct list_head *push_iter, *pull_iter;
-    bool_t inner_load_updated = 0;
+    bool inner_load_updated = 0;
 
     balance_state_t st = { .best_push_svc = NULL, .best_pull_svc = NULL };
 
@@ -2584,7 +2584,7 @@ runq_candidate(struct csched2_runqueue_data *rqd,
  */
 static struct task_slice
 csched2_schedule(
-    const struct scheduler *ops, s_time_t now, bool_t tasklet_work_scheduled)
+    const struct scheduler *ops, s_time_t now, bool tasklet_work_scheduled)
 {
     const int cpu = smp_processor_id();
     struct csched2_runqueue_data *rqd;
@@ -2592,7 +2592,7 @@ csched2_schedule(
     struct csched2_vcpu *snext = NULL;
     unsigned int skipped_vcpus = 0;
     struct task_slice ret;
-    bool_t tickled;
+    bool tickled;
 
     SCHED_STAT_CRANK(schedule);
     CSCHED2_VCPU_CHECK(current);
Signature · 7 lines
2.12.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Praveen Kumar

The patch actually doesn't impact the functionality as such. This only replaces bool_t with bool in credit2.

Julien, is this sort of thing allowed in at this point? It's not exactly a bugfix, but it's not exactly a big functional risk either.

I've already got a patch from Praveen queued up for 4.10, so it's not that much extra effort to hold it either.

-George

Quoted 58 lines
---
 xen/common/sched_credit2.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
xen/common/sched_credit2.c +6 -6
index ee7b443f9e..1dfed923d3 100644
@@ -639,17 +639,17 @@ static void deactivate_runqueue(struct csched2_private *prv, int rqi)
     __cpumask_clear_cpu(rqi, &prv->active_queues);
 }
 
-static inline bool_t same_node(unsigned int cpua, unsigned int cpub)
+static inline bool same_node(unsigned int cpua, unsigned int cpub)
 {
     return cpu_to_node(cpua) == cpu_to_node(cpub);
 }
 
-static inline bool_t same_socket(unsigned int cpua, unsigned int cpub)
+static inline bool same_socket(unsigned int cpua, unsigned int cpub)
 {
     return cpu_to_socket(cpua) == cpu_to_socket(cpub);
 }
 
-static inline bool_t same_core(unsigned int cpua, unsigned int cpub)
+static inline bool same_core(unsigned int cpua, unsigned int cpub)
 {
     return same_socket(cpua, cpub) &&
            cpu_to_core(cpua) == cpu_to_core(cpub);
@@ -1882,7 +1882,7 @@ static void migrate(const struct scheduler *ops,
  *  - svc is not already flagged to migrate,
  *  - if svc is allowed to run on at least one of the pcpus of rqd.
  */
-static bool_t vcpu_is_migrateable(struct csched2_vcpu *svc,
+static bool vcpu_is_migrateable(struct csched2_vcpu *svc,
                                   struct csched2_runqueue_data *rqd)
 {
     struct vcpu *v = svc->vcpu;
@@ -1900,7 +1900,7 @@ static void balance_load(const struct scheduler *ops, int cpu, s_time_t now)
     struct csched2_private *prv = csched2_priv(ops);
     int i, max_delta_rqi = -1;
     struct list_head *push_iter, *pull_iter;
-    bool_t inner_load_updated = 0;
+    bool inner_load_updated = 0;
 
     balance_state_t st = { .best_push_svc = NULL, .best_pull_svc = NULL };
 
@@ -2584,7 +2584,7 @@ runq_candidate(struct csched2_runqueue_data *rqd,
  */
 static struct task_slice
 csched2_schedule(
-    const struct scheduler *ops, s_time_t now, bool_t tasklet_work_scheduled)
+    const struct scheduler *ops, s_time_t now, bool tasklet_work_scheduled)
 {
     const int cpu = smp_processor_id();
     struct csched2_runqueue_data *rqd;

xen/common/sched_credit2.c csched2_schedule( · line 2598

Quoted 8 lines
xen/common/sched_credit2.c +1 -1
@@ -2592,7 +2592,7 @@ csched2_schedule(
     struct csched2_vcpu *snext = NULL;
     unsigned int skipped_vcpus = 0;
     struct task_slice ret;
-    bool_t tickled;
+    bool tickled;
 
     SCHED_STAT_CRANK(schedule);
     CSCHED2_VCPU_CHECK(current);

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Hi George,

Quoted 10 lines · George Dunlap
Quoted 4 lines · Praveen Kumar

The patch actually doesn't impact the functionality as such. This only replaces bool_t with bool in credit2.

Julien, is this sort of thing allowed in at this point? It's not exactly a bugfix, but it's not exactly a big functional risk either.

I will start enforce bug fix only after rc2.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel