Messages in this thread | | | From | "Luck, Tony" <> | Subject | RE: [PATCH] x86/resctrl: Fix mbm_setup_overflow_handler() when last CPU goes offline | Date | Wed, 27 Mar 2024 23:01:10 +0000 |
| |
> There seems to be two issues here (although I am not familiar with these flows). First, > it seems that tick_nohz_full_mask is not actually allocated unless the user boots > with a "nohz_full=". This means that any attempt to access bits within tick_nohz_full_mask > will cause this OOPS. If that is allocated then the second issue seems that the > buried __ffs() call requires that it not be called with 0 and this checking is not done. > > To me it seems most appropriate to fix this at the central place to ensure all scenarios > are handled instead of scattering checks.
Good analysis.
> To that end, what do you think of something like below? It uses tick_nohz_full_enabled() check > to ensure that tick_nohz_full_mask is actually allocated while the other changes aim to > avoid __ffs() on 0.
Looks good.
Tested-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Tont Luck <tony.luck@intel.com>
-Tony
| |