[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] xen: sched: we never get into context_switch() with prev==next
> On Apr 20, 2019, at 4:24 PM, Dario Faggioli <dfaggioli@xxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |