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

Re: [Xen-devel] [PATCH v2 28/48] xen/sched: move struct task_slice into struct sched_unit



On 10.09.19 17:18, Jan Beulich wrote:
On 09.08.2019 16:58, Juergen Gross wrote:
In order to prepare for multiple vcpus per schedule unit move struct
task_slice in schedule() from the local stack into struct sched_unit
of the currently running unit.

The change looks mechanical enough to be probably fine, but what's
the connection between the item currently being on schedule()'s stack
and there being multiple vCPU-s? Is this because it'll be established
just once, but used multiple times (by different parties)? In which
case, since the "slaves" will have to wait for the "master" to make
the scheduling decision, there'll need to be communication anyway
between all involved parties.

Synchronization between the involved parties is done via struct
sched_unit (see patch 29). There is no need to add another data
structure for explicit communication, as on all cpus involved the same
unit is active, so its address is already known.

And this is mandatory, as only when all cpus have joined the last one
will do the schedule() call and then release the other cpus for doing
the context switch. Propagating another pointer on the local stack
would be hard as splitting up schedule() as done in patch 29 would no
longer be possible resulting in a rather hard to understand gigantic
function.


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®.