Re: [RFC PATCH v3 04/10] sched/fair: Introduce sched_throttle_work

From: Valentin Schneider
Date: Mon Jul 15 2024 - 13:58:32 EST


On 12/07/24 17:21, Peter Zijlstra wrote:
> On Thu, Jul 11, 2024 at 02:59:58PM +0200, Valentin Schneider wrote:
>
>> +void init_cfs_throttle_work(struct task_struct *p)
>> +{
>> + /* Protect against double add, see throttle_cfs_rq() and throttle_cfs_rq_work() */
>> + p->sched_throttle_work.next = &p->sched_throttle_work;
>> + init_task_work(&p->sched_throttle_work, throttle_cfs_rq_work);
>
> Yes, init_task_work() does not write .next, but can we please flip these
> two statements and avoid me having to double check that every time I
> seem them? :-)
>

Easy enough :)

>> +}