[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 10/12] xen/hypfs: add cpupool directories
On 11.11.20 15:56, Jan Beulich wrote: On 11.11.2020 15:51, Dario Faggioli wrote:On Mon, 2020-10-26 at 10:13 +0100, Juergen Gross wrote:Add /cpupool/<cpupool-id> directories to hypfs. Those are completely dynamic, so the related hypfs access functions need to be implemented. Signed-off-by: Juergen Gross <jgross@xxxxxxxx>So, I'm almost sold... Just one comment:--- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -999,6 +1073,10 @@ static int __init cpupool_init(void)cpupool_gran_init(); +#ifdef CONFIG_HYPFS+ hypfs_add_dir(&hypfs_root, &cpupool_dir, true); +#endif +What would you think about doing this in an helper function (hypfs_cpupool_init() ?), implemented inside the above #ifdef and as an empty stub if !CONFIG_HYPFS ? That will save us from having the #ifdef-s again here.Having a hypfs_add_dir() stub would also allow to achieve this, and then, going forward, perhaps also elsewhere. I thought about that. This would require to be macro for the stub case, but I don't think this is a major problem. Currently there are no other places requiring a stub, but in future this might change. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |