[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/sched: remove sched_init_pdata()
On 11.02.20 11:37, Dario Faggioli wrote: On Mon, 2020-02-10 at 16:39 +0100, Juergen Gross wrote:sched_init_pdata() is used nowhere, it can be removed. Same applies to the .init_pdata hook of the per-scheduler interface.Right, and that appear to be the case since f855dd962523b6cb47a92037bdd28b1485141abe ("sched: add minimalistic idle scheduler for free cpus"), which removed all call sites. And that is because switching to a scheduler always happens via switch_sched from the idle scheduler, and it's there that we do all the initializations, right? This change is obviously doing the right thing, removing code that is never called! :-) Can we, though: - add a mention to the commit above and a quick explanation of things in the changelog? Okay. - update the following comments too: 1) in cpu_schedule_callback() "* This happens by calling the deinit_pdata and free_pdata hooks, in this * order. If no per-pCPU memory was allocated, there is no need to * provide an implementation of free_pdata. deinit_pdata may, however, * be necessary/useful in this case too (e.g., it can undo something done * on scheduler wide data structure during init_pdata). Both deinit_pdata * and free_pdata are called during CPU_DEAD." 2) schedule_cpu_add() "* - a valid instance of per-CPU scheduler specific data, as it is * allocated by sched_alloc_pdata(). Note that we do not want to * initialize it yet (i.e., we are not calling sched_init_pdata()). * That will be done by the target scheduler, in sched_switch_sched(), * in proper ordering and with locking." Oh, I missed those. Will modify the comments. Juergen _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |