> On Apr 20, 2019, at 4:24 PM, Dario Faggioli <dfaggi...@suse.com> wrote:
> 
> In schedule(), if we pick, as the next vcpu to run (next) the same one
> that is running already (prev), we never get to call context_switch().
> 
> We can, therefore, get rid of all the `if`-s testing prev and next being
> different, trading them with an ASSERT() (on ARM, the ASSERT() was even
> already there!)

Keeping in mind that ASSERT() is merely a debugging aid: suppose that testing 
didn’t discover this, and a bug that violated this assumption slipped into 
production.  Would the patched code DTRT?

It sort of looks like the prev/next checking is an optimization, and that 
duplicate checking shouldn’t cause any problems.  Is that the case?

 -George

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

Reply via email to