[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <516cbcf4-ec80-a81a-c5f4-971fba4b2972@intel.com>
Date: Thu, 7 Jan 2021 14:11:07 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: tglx@...utronix.de, fenghua.yu@...el.com, tony.luck@...el.com,
kuo-lang.tseng@...el.com, shakeelb@...gle.com,
valentin.schneider@....com, mingo@...hat.com, babu.moger@....com,
james.morse@....com, hpa@...or.com, x86@...nel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH V2 1/4] x86/resctrl: Use IPI instead of task_work_add() to
update PQR_ASSOC MSR
Hi Borislav,
On 1/6/2021 3:19 AM, Borislav Petkov wrote:
> On Thu, Dec 17, 2020 at 02:31:18PM -0800, Reinette Chatre wrote:
>> +#ifdef CONFIG_SMP
>> +static void update_task_closid_rmid(struct task_struct *t)
>> +{
>> + if (task_curr(t))
>> + smp_call_function_single(task_cpu(t), _update_task_closid_rmid,
>> + t, 1);
>> }
>> +#else
>> +static void update_task_closid_rmid(struct task_struct *t)
>> +{
>> + _update_task_closid_rmid(t);
>> +}
>> +#endif
>
> Why the ifdeffery? Why not simply:
>
> static void update_task_closid_rmid(struct task_struct *t)
> {
> if (IS_ENABLED(CONFIG_SMP) && task_curr(t))
> smp_call_function_single(task_cpu(t), _update_task_closid_rmid, t, 1);
> else
> _update_task_closid_rmid(t);
> }
>
> ?
>
> If no particular reason, I'll change it before committing.
There is no particular reason. What you propose is much more readable.
Thank you very much.
Reinette
Powered by blists - more mailing lists