lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Aug 2022 15:40:04 +0800
From:   shangxiaojing <shangxiaojing@...wei.com>
To:     Daniel Bristot de Oliveira <bristot@...hat.com>
CC:     <mingo@...hat.com>, <peterz@...radead.org>,
        <juri.lelli@...hat.com>, <vincent.guittot@...aro.org>,
        <dietmar.eggemann@....com>, <rostedt@...dmis.org>,
        <bsegall@...gle.com>, <mgorman@...e.de>, <vschneid@...hat.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] sched/deadline: Add start_new_instance helper


On 2022/8/26 15:15, Daniel Bristot de Oliveira wrote:
> On 8/26/22 05:15, Shang XiaoJing wrote:
>> Wrap repeated code in helper function start_new_instance, which set
>> the deadline and runtiem of input dl_se based on pi_of(dl_se). Note that
>                        ^ runtime
oops
>> setup_new_dl_entity originally set the deadline and runtime base on
>> dl_se, which should equals to pi_of(dl_se) for non-boosted task.
>>
>> Signed-off-by: Shang XiaoJing <shangxiaojing@...wei.com>
>> ---
>>   kernel/sched/deadline.c | 22 ++++++++++++----------
>>   1 file changed, 12 insertions(+), 10 deletions(-)
>>
>> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>> index 4a40a462717c..5e9c28847610 100644
>> --- a/kernel/sched/deadline.c
>> +++ b/kernel/sched/deadline.c
>> @@ -770,6 +770,13 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags);
>>   static void __dequeue_task_dl(struct rq *rq, struct task_struct *p, int flags);
>>   static void check_preempt_curr_dl(struct rq *rq, struct task_struct *p, int flags);
> again, this is not a good function name. Maybe, dl_replenish_new_period() ?

right, i have thought like replenish_new_instance, but when i'm making 
patch,  i was worried that "replenish" is only for ENQUEUE_REPLENISH.

what about dl_start_new_period? which means a new deadline will be set, 
rather than

     dl_se->deadline += pi_of(dl_se)->dl_period;

in replenish_dl_entity.

>> +static inline void start_new_instance(struct sched_dl_entity *dl_se, struct rq *rq)
>> +{
>> +	/* for non-boosted task, pi_of(dl_se) == dl_se */
>> +	dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline;
>> +	dl_se->runtime = pi_of(dl_se)->dl_runtime;
>> +}
>> +
> -- Daniel

Thanks,

Shang XiaoJing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ