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

Re: [Xen-devel] [PATCH v3 19/47] xen: add sched_unit_pause_nosync() and sched_unit_unpause()



On 25.09.19 17:20, Dario Faggioli wrote:
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote:
The credit scheduler calls vcpu_pause_nosync() and vcpu_unpause()
today.

It does. And, FWIW, I hate it with all my heart because of that (among
other things! :-D).

Add sched_unit_pause_nosync() and sched_unit_unpause() to
perform the same operations on scheduler units instead.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h
index d624b81e53..b5967d26af 100644
--- a/xen/include/xen/sched-if.h
+++ b/xen/include/xen/sched-if.h
@@ -432,6 +432,16 @@ static inline int sched_adjust_cpupool(const
struct scheduler *s,
      return s->adjust_global ? s->adjust_global(s, op) : 0;
  }
+static inline void sched_unit_pause_nosync(struct sched_unit *unit)
+{
+    vcpu_pause_nosync(unit->vcpu_list);
+}
+
+static inline void sched_unit_unpause(struct sched_unit *unit)
+{
+    vcpu_unpause(unit->vcpu_list);
+}
+
So, isn't this another one of those places where we could have the
for_each_unit_vcpu() loop already?

Yes.


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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