lkml.org 
[lkml]   [2020]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] kernel/sched:use the enum code replace of the int variable
On Mon, Sep 07, 2020 at 09:05:02PM +0800, qianjun.kernel@gmail.com wrote:
> From: jun qian <qianjun.kernel@gmail.com>
>
> It is hard to understand what the meaning of the value from
> the return value of wakeup_preempt_entity, so I fix it.

> @@ -6822,9 +6828,9 @@ static unsigned long wakeup_gran(struct sched_entity *se)
> * g
> * |<--->|c
> *
> - * w(c, s1) = -1
> - * w(c, s2) = 0
> - * w(c, s3) = 1
> + * w(c, s1) = NO_NEED_PREEMPT
> + * w(c, s2) = MAY_NEED_PREEMPT
> + * w(c, s3) = NEED_PREEMPT
> *
> */

Yeah, I don't think so. The function is a simple C style compare,
where negative is less, 0 is equal and positive is more than.


\
 
 \ /
  Last update: 2020-09-11 11:07    [W:0.063 / U:6.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site