Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file system

From: Fenghua Yu
Date: Thu Oct 27 2016 - 14:17:40 EST


On Wed, Oct 26, 2016 at 04:45:50PM +0200, Thomas Gleixner wrote:
> On Sat, 22 Oct 2016, Fenghua Yu wrote:
> > +/*
> > + * Forcibly remove all of subdirectories under root.
> > + */
> > +static void rmdir_all_sub(void)
> > +{
> > + kernfs_remove(kn_info);
>
> What clears kn_info?

Is the question "Why clears kn_info?"

kn_info is created during mount time and has different contents
under "info" directory with CDP enabled or disabled by mount parameter "cdp".

umount needs to remove kn_info so that it's ready to be created next time
during mount time. So user can do CAT mount, check "info", umount, and then
CDP mount, check "info". The user will see different contents in two "info"
checks.

Thanks.

-Fenghua