[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen/sched: remove wrong assertions in csched2_free_pdata()
The assertions in csched2_free_pdata() are wrong as in case it is called by schedule_cpu_add() after a failure of sched_alloc_udata() the init pdata function won't have been called. So just remove the (wrong) comment and ASSERT() statements. While at it remove the wrong comment in csched2_deinit_pdata(), too. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- xen/common/sched_credit2.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index af58ee161d..a995ff838f 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -3914,10 +3914,6 @@ csched2_deinit_pdata(const struct scheduler *ops, void *pcpu, int cpu) write_lock_irqsave(&prv->lock, flags); - /* - * alloc_pdata is not implemented, so pcpu must be NULL. On the other - * hand, init_pdata must have been called for this pCPU. - */ /* * Scheduler specific data for this pCPU must still be there and and be * valid. In fact, if we are here: @@ -3969,18 +3965,6 @@ csched2_deinit_pdata(const struct scheduler *ops, void *pcpu, int cpu) static void csched2_free_pdata(const struct scheduler *ops, void *pcpu, int cpu) { - struct csched2_pcpu *spc = pcpu; - - /* - * pcpu either points to a valid struct csched2_pcpu, or is NULL (if - * CPU bringup failed, and we're beeing called from CPU_UP_CANCELLED). - * xfree() does not really mind, but we want to be sure that either - * init_pdata has never been called, or deinit_pdata has been called - * already. - */ - ASSERT(!pcpu || spc->runq_id == -1); - ASSERT(!cpumask_test_cpu(cpu, &csched2_priv(ops)->initialized)); - xfree(pcpu); } -- 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |