RE: [PATCH v8 5/7] x86/resctrl: Add "mba_MBps_event" file to ctrl_mon directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +static int set_mba_sc(bool mba_sc)
> > +{
> > +   struct rftype *rft;
> > +
> > +   rft = rdtgroup_get_rftype_by_name("mba_MBps_event");
> > +   if (rft)
> > +           rft->fflags = enable ? RFTYPE_CTRL_BASE : 0;
>
> I think this sets this file to be created for all CTRL groups, even when not supporting
> monitoring?

No. The calling sequence is:

rdt_get_tree()
    rdt_enable_ctx()

        if (ctx->enable_mba_mbps) {
                ret = set_mba_sc(true);
                if (ret)
                        goto out_cdpl3;
        }

So set_mba_sc() is only called when the mba_MBps mount option has been used. So
mba_mbps_event_init() isn't called.

Note that on unmount of the resctrl file system rdt_kill_sb() calls rdt_disable_ctx()
which calls set_mba_sc(false) which will clear rft->fflags on systems which support
mba_MBps.

-Tony





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux