Re: [PATCH v6 14/24] x86/resctrl: Allow resctrl_arch_rmid_read() to sleep
From: James Morse
Date: Wed Oct 25 2023 - 13:57:38 EST
Hi Reinette,
On 03/10/2023 22:18, Reinette Chatre wrote:
> On 9/14/2023 10:21 AM, James Morse wrote:
>> @@ -245,6 +250,17 @@ int resctrl_arch_rmid_read(struct rdt_resource *r, struct rdt_domain *d,
>> u32 closid, u32 rmid, enum resctrl_event_id eventid,
>> u64 *val);
>>
>> +/**
>> + * resctrl_arch_rmid_read_context_check() - warn about invalid contexts
>> + *
>> + * When built with CONFIG_DEBUG_ATOMIC_SLEEP generate a warning when
>> + * resctrl_arch_rmid_read() is called with preemption disabled.
>> + */
>> +static inline void resctrl_arch_rmid_read_context_check(void)
>> +{
>> + if (!irqs_disabled())
>> + might_sleep();
>> +}
>>
>> /**
>> * resctrl_arch_reset_rmid() - Reset any private state associated with rmid
>
> I was expecting the above to look like you said it would look [1].
Hmm, not sure what happened there - it even made it into the changelog for the patch.
Presumably an earlier change conflicted and I messed up the resolution.
Fixed now.
Thanks,
James