public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: shrikanth suresh hegde <sshegde@linux.vnet.ibm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH v7 5/9] sched/fair: Take into account latency priority at wakeup
Date: Sun, 13 Nov 2022 13:32:04 +0530	[thread overview]
Message-ID: <d0edcb38-709f-2c29-b541-cc39d41d378c@linux.vnet.ibm.com> (raw)
In-Reply-To: <20221028093403.6673-6-vincent.guittot@linaro.org>


>   /*
>    * Preempt the current task with a newly woken task if needed:
>    */
> @@ -4566,7 +4568,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
>   {
>   	unsigned long ideal_runtime, delta_exec;
>   	struct sched_entity *se;
> -	s64 delta;
> +	s64 delta, offset;
>   
>   	ideal_runtime = sched_slice(cfs_rq, curr);
>   	delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
> @@ -4591,10 +4593,12 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
>   	se = __pick_first_entity(cfs_rq);
>   	delta = curr->vruntime - se->vruntime;
>   
> -	if (delta < 0)
> +	offset = wakeup_latency_gran(curr, se);
> +	if (delta < offset)
>   		return;
>   
> -	if (delta > ideal_runtime)
> +	if ((delta > ideal_runtime) ||
> +	    (delta > get_latency_max()))
>   		resched_curr(rq_of(cfs_rq));
>   }
>   
>
Hi Vincent,

I am not sure if i have understood this below change correctly.

wakeup_latency_gran - this function returns difference in latency nice offsets.
Hence the more negative the value, it means se has more latency requirement
compared to current. Hence se should preempt the current here right?
  
we are comparing delta to get_latency_max and ideal_runtime, both of which can
be higher positive value, hence we will not preempt. that is not what we want
right?


  reply	other threads:[~2022-11-13  8:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28  9:33 [PATCH v7 0/9] Add latency priority for CFS class Vincent Guittot
2022-10-28  9:33 ` [PATCH v7 1/9] sched/fair: fix unfairness at wakeup Vincent Guittot
2022-11-05 14:32   ` Chen Yu
2022-11-07  8:00     ` Vincent Guittot
2022-10-28  9:33 ` [PATCH v7 2/9] sched: Introduce latency-nice as a per-task attribute Vincent Guittot
2022-10-28  9:33 ` [PATCH v7 3/9] sched/core: Propagate parent task's latency requirements to the child task Vincent Guittot
2022-10-28  9:33 ` [PATCH v7 4/9] sched: Allow sched_{get,set}attr to change latency_nice of the task Vincent Guittot
2022-10-28  9:33 ` [PATCH v7 5/9] sched/fair: Take into account latency priority at wakeup Vincent Guittot
2022-11-13  8:02   ` shrikanth suresh hegde [this message]
2022-11-13  8:39   ` shrikanth suresh hegde
2022-11-14 10:36     ` Vincent Guittot
2022-10-28  9:34 ` [PATCH v7 6/9] sched/fair: Add sched group latency support Vincent Guittot
2022-11-01 19:28   ` Qais Yousef
2022-11-03  8:46     ` Vincent Guittot
2022-11-03 14:27       ` Qais Yousef
2022-11-03 17:02         ` Vincent Guittot
2022-11-04 10:14           ` Joel Fernandes
2022-11-04 10:37             ` Vincent Guittot
2022-11-04 10:48               ` Joel Fernandes
2022-11-04 10:57                 ` Vincent Guittot
2022-11-04 10:55               ` Joel Fernandes
2022-11-04 12:06                 ` Qais Yousef
2022-11-04 11:47             ` Qais Yousef
2022-11-04 11:21           ` Qais Yousef
2022-11-04 13:13             ` Joel Fernandes
2022-11-05 14:28               ` Qais Yousef
2022-11-04 14:24             ` Vincent Guittot
2022-11-04 14:57               ` Joel Fernandes
2022-11-04 15:03                 ` Vincent Guittot
2022-11-04 15:12                   ` Joel Fernandes
2022-11-04 15:23                     ` Vincent Guittot
2022-11-05 13:41                 ` Qais Yousef
2022-10-28  9:34 ` [PATCH v7 7/9] sched/core: Support latency priority with sched core Vincent Guittot
2022-10-28  9:34 ` [PATCH v7 8/9] sched/fair: Add latency list Vincent Guittot
2022-10-28  9:34 ` [PATCH v7 9/9] sched/fair: remove check_preempt_from_others Vincent Guittot
2022-11-13  7:56 ` [PATCH v7 0/9] Add latency priority for CFS class shrikanth suresh hegde
2022-11-13  8:34 ` shrikanth suresh hegde
2022-11-14 10:40   ` Vincent Guittot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0edcb38-709f-2c29-b541-cc39d41d378c@linux.vnet.ibm.com \
    --to=sshegde@linux.vnet.ibm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox