kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: riel@surriel.com (Rik van Riel)
To: kernelnewbies@lists.kernelnewbies.org
Subject: sched_wakeup_granularity_ns in CFS correctly designed or not?
Date: Sun, 11 Jun 2017 21:57:50 -0400	[thread overview]
Message-ID: <1497232670.29205.151.camel@surriel.com> (raw)
In-Reply-To: <CAB+a3q_MXdAiNnLZkz8pSA413wv7i09oO7BzqYnwi8nL=+bLdg@mail.gmail.com>

On Sun, 2017-06-11 at 22:26 +0530, Rohith R wrote:
> > OK, let me get this straight:
> > 1) Your application has a deadline.
> > 2) You do not tell the kernel of that deadline.
> > 3) You want to know if the kernel will keep the
> > ? ?promise you never told it about?
> 
> ?
> Yes. All I am saying is that by keeping a
> ?sched_wakeup_granularity_ns parameter as 2.5 ms. A process which is
> waken up has to wait for that much amount of time if any other (non-
> important) process is executing. Now I am saying that the way CFS
> seems to be designed it will never make a process which wakes up and
> has a deadline < 2.5 ms meet its deadline.
> 
> Now why does this scenario matter. This may?occur in real workloads
> like video processing etc.

How much video processing?

If the amount of computation time is 3ms, that means
the video processing program needs to program its
wakeup time at least 3ms before the time it needs to
have the data ready.

There will likely be some buffering involved, too, so
it can safely move its deadline a little further, and
have time to spare.

When the system is overloaded, the video processing
program may not get as much CPU time as it needs, but
on a system that is not overloaded, chances are it
will be fine.

If you need a guarantee, use SCHED_DEADLINE.

-- 
All Rights Reversed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170611/384c3afc/attachment.bin 

      reply	other threads:[~2017-06-12  1:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-11  5:45 sched_wakeup_granularity_ns in CFS correctly designed or not? Rohith R
2017-06-11 12:27 ` Rik van Riel
2017-06-11 16:08   ` Rohith R
2017-06-11 16:37     ` Rik van Riel
2017-06-11 16:56       ` Rohith R
2017-06-12  1:57         ` Rik van Riel [this message]

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=1497232670.29205.151.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).