All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii_anisov@epam.com>
To: Dario Faggioli <dfaggioli@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Meng Xu <xumengpanda@gmail.com>
Subject: Re: RTDS with extra time issue
Date: Fri, 9 Feb 2018 17:03:17 +0200	[thread overview]
Message-ID: <39c08b88-c951-2779-34f6-31e4b6c0dd0f@epam.com> (raw)
In-Reply-To: <1518182334.5019.15.camel@suse.com>

Hello Dario,

On 09.02.18 15:18, Dario Faggioli wrote:
> Ok, so you're giving:
> - 40% CPU time to Domain-0
> - 50% CPU time to DomR
> - 40% CPU time to DomA
> - 40% CPU time to DomD
> total utilization is 170%. As far as I've understood you have 4 CPUs,
> right? If yes, there *should* be no problems. (Well, in theory, we'd
> need a schedulability test to know for sure whether the system is
> "feasible", but I'm going to assume that it sort of is, and leave to
> Meng any further real-time scheduling analysis related configurations.
> :-) ).
Being a bit more specific, I give:

  - 4*10% CPU time to Domain-0
  - 1*50% CPU time to DomR
  - 4*10% CPU time to DomA
  - 4*10% CPU time to DomD

Which seems to be schedulable on 4*100% CPU. I guess Meng could shed 
more light on this topic from theoretical point of view.

> So, this should work, as allowing the other domains to use extratime
> should *not* allow them to prevent DomR to get it's 50% share of CPU
> time.
That is my point.

> I wonder, though, if this case would not be better if cpupools are
> used. E.g., you can leve the non real-time domains in the default pool
> (and have Credit or Credit2 there), and then have an RTDS cpupool in
> which you put DomR, with its 50% share, and perhaps someone else (just
> to avoid wasting the other 50%).
The problem here is that domains can not have their vcpus from different 
cpupool. So we would waste that fraction of CPU.
IMHO in case of pcpu partitioning with cpupools, we loose a practical 
application of RTDS scheduler. A pool with null scheduler will do the 
job for RT domain.
IMHO one would benefit from a RTDS scheduler only in case he has rt 
vcpu(s) with utilization of fraction of pcpu and want to save remaining 
resources.

> Basically, can you also fully load (like with dd as above, or just yes
> or while(1)) DomR, and then check if it is getting 50%?
>   For a first
> approximation of this, you can check with xentop.

For sure I did this run. xentop clearly shows 50% in case of DomR loaded 
with dd, and equal distribution of CPU resources among other domains, i.e.:

             STATE   CPU(sec) CPU(%)     MEM(k) MEM(%)  MAXMEM(k) 
MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS   VBD_OO   VBD_RD VBD_WR  
VBD_RSECT  VBD_WSECT SSID
       DomA -----r      20325  117.0    2178960   53.6 218009653.7   
n/a     4    0        0        0    0 0        0        0          
0          0   11
       DomD -----r      20282  116.4    1048464   25.8 104960025.8     
1    04    0        0        0    0 0        0        0          
0          0   11
   Domain-0 -----r      21123  117.2     262144    6.5   no limit 
n/a     4    04    0        0        0    0        0 0        0          
0          0    2
       DomR -----r        284   50.0     196496    449600 197632 4.9     
1     1    0        0        0    0        0 0        0          
0          0   11

In case I run my test, with xentop I see something like following:

             STATE   CPU(sec) CPU(%)     MEM(k) MEM(%) MAXMEM(k) 
MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS   VBD_OO VBD_RD   VBD_WR  
VBD_RSECT  VBD_WSECT SSID
   Domain-0 -----r      223493 120.2    2178960   53.6 218009653.7   
n/a     4    0        0        0    0 0        0        0          
0          0    2
       DomD -----r      215036 118.7    1048464   25.8 104960025.8     
4     4    0        0        0    0 0        0        0          
0          0   11
       DomA ------      215396 115.4    2178960   53.6 218009653.7     
4    04    0        0        0    0 0        0        0          
0          0   11
       DomR -----r        6145  38.7     196496    4.8 197632 4.9     
1     1    0        0        0    0        0 0        0          
0          0   11

What is ok for litmus-rt test load, which by default runs task for 0.95 
of given wcet.

I get several deadline misses in a 4 minute run of task with 10ms 
period. Xentop would not show such deviations, it is too coarse grained.

>   If you want to be even more sure/you want to know it precisely, you can use tracing.
Yep, maybe its time for me to get familiar with tracing in XEN.

> If DomR is not able to get its share, then we have an issue/bug in the
> scheduler. If it does, then the scheduler is doing its job, and the
> issue may be somewhere else (e.g., something inside the guest may eat
> some of the budget, in such a way that not all of it is available when
> you actually need it).
The DomR guest is really lean, I already shown processes list in it. I 
really doubt init together with getty on HVC can eat another 10% of CPU 
at any moment.


-- 

*Andrii Anisov*



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-02-09 15:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 12:20 RTDS with extra time issue Andrii Anisov
2018-02-09 12:25 ` Andrii Anisov
2018-02-09 13:18 ` Dario Faggioli
2018-02-09 15:03   ` Andrii Anisov [this message]
2018-02-09 15:18     ` Dario Faggioli
2018-02-09 15:36       ` Meng Xu
2018-02-09 15:56         ` Andrii Anisov
2018-02-09 17:51           ` Meng Xu
2018-02-10  0:14             ` Dario Faggioli
2018-02-10  4:53               ` Meng Xu
2018-02-12 10:17                 ` Dario Faggioli
2018-02-12 11:08                   ` Andrii Anisov
2018-02-12 14:52                     ` Meng Xu
2018-02-12 10:38                 ` Andrii Anisov
2018-02-12 10:20       ` Andrii Anisov
2018-02-12 18:44         ` Andrii Anisov
2018-02-16 18:37           ` Dario Faggioli
2018-02-20 11:34             ` Andrii Anisov
2018-02-22 17:53               ` Dario Faggioli
2018-02-26 12:00                 ` Andrii Anisov
2018-02-09 15:34 ` Meng Xu
2018-02-09 15:53   ` Andrii Anisov
2018-02-09 16:04   ` Andrii Anisov
2018-02-09 17:53     ` Meng Xu
2018-02-09 18:07       ` Andrii Anisov

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=39c08b88-c951-2779-34f6-31e4b6c0dd0f@epam.com \
    --to=andrii_anisov@epam.com \
    --cc=dfaggioli@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xumengpanda@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.