lkml.org 
[lkml]   [2022]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] sched/deadline: Add should_push_task_away helper
From

On 2022/8/31 17:23, Daniel Bristot de Oliveira wrote:
> On 8/29/22 12:05, Shang XiaoJing wrote:
>> +static inline bool should_push_task_away(struct task_struct *a,
>> + struct task_struct *b)
> static inline bool should_push_task_dl(struct task_struct *curr, struct task_struct *p)
>
> a and b are not good variable names, and add the _dl suffix (instead of away).
ok, i like that :-). This will be done in patch v2.
>> +{
>> + return unlikely(dl_task(a)) &&
>> + (a->nr_cpus_allowed < 2 ||
>> + !dl_entity_preempt(&b->dl, &a->dl)) &&
>> + b->nr_cpus_allowed > 1;
>> +}
>> +
> -- Daniel

Thanks,

Shang XiaoJing

\
 
 \ /
  Last update: 2022-08-31 11:30    [W:0.027 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site