All of lore.kernel.org
 help / color / mirror / Atom feed
* the 【ROOT】task in xenomai domain
       [not found] <mailman.79.1559582824.27006.xenomai@xenomai.org>
@ 2019-06-04  2:16 ` liang_1911
  2019-06-04 16:49   ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: liang_1911 @ 2019-06-04  2:16 UTC (permalink / raw)
  To: xenomai

Hi, folks.
I has an question: when i use the "cat /proc/xenomai/sched/stat" command to see the cpu's usage rate in xenomai domain,here is the result :
root@am335x-evm:~# cat /proc/xenomai/sched/stat 
CPU  PID    MSW        CSW        XSC        PF    STAT       %CPU  NAME
  0  0      0          10974459   0          0     00018000          89.4  [ROOT]
  0  652    40         58         207        0     000680c0           0.0  MT
  0  689    2          5          12         0     00048042              0.0  taskIntPowerDown
  0  690    3          2868684    2868691    1     00048042    2.7  taskInt1msHandle
  0  691    3          768785     716889     1     00048042    1.6  task_firstLadder
  0  694    2          2913565    2867511    0     00048042    1.0  task_wheelZero
  0  695    2          1464897    1433759    0     00048042    0.6  task_MST
  0  696    7          739013     716897     0     00048042    0.5  task_masterCtrl
  0  697    2          2944855    2867494    0     00048042    1.0  task_interpolate
  0  698    4          258393     238974     0     00048042      0.6  task_lowRealTime
  0  699    1          1                    24         0     000600c0    0.0  MT
  0  0      0          11353742   0          0     00000000          1.3  [IRQ16: [timer]]
  0  0      0          2868679    0          0     00000000           0.9  [IRQ181: 1msInt]
  0  0      0          0          0          0     00000000                0.0  [IRQ182: power_down]
 
the ROOT task occupy 89.4%'s cpu usage rate; Does that mean the idle cpu usage rate is 89.4%?
Actually, the other remaining task is my work task ,which just occupy a few cpu usage rate  totally.
If that is true, here is another question:
Can we limit the cpu usage rate to the real-time partial program?
like say, i want to assigned 70% of cpu's  performance to RT program, and give the rest to non-RT program.
Is there any way to fullfill this purpose ?
--

----------------------------------------------
         Quan
THANKS & BR!


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: the 【ROOT】task in xenomai domain
  2019-06-04  2:16 ` the 【ROOT】task in xenomai domain liang_1911
@ 2019-06-04 16:49   ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2019-06-04 16:49 UTC (permalink / raw)
  To: liang_1911, xenomai

On 04.06.19 04:16, liang_1911 via Xenomai wrote:
> Hi, folks.
> I has an question: when i use the "cat /proc/xenomai/sched/stat" command to see the cpu's usage rate in xenomai domain,here is the result :
> root@am335x-evm:~# cat /proc/xenomai/sched/stat
> CPU  PID    MSW        CSW        XSC        PF    STAT       %CPU  NAME
>    0  0      0          10974459   0          0     00018000          89.4  [ROOT]
>    0  652    40         58         207        0     000680c0           0.0  MT
>    0  689    2          5          12         0     00048042              0.0  taskIntPowerDown
>    0  690    3          2868684    2868691    1     00048042    2.7  taskInt1msHandle
>    0  691    3          768785     716889     1     00048042    1.6  task_firstLadder
>    0  694    2          2913565    2867511    0     00048042    1.0  task_wheelZero
>    0  695    2          1464897    1433759    0     00048042    0.6  task_MST
>    0  696    7          739013     716897     0     00048042    0.5  task_masterCtrl
>    0  697    2          2944855    2867494    0     00048042    1.0  task_interpolate
>    0  698    4          258393     238974     0     00048042      0.6  task_lowRealTime
>    0  699    1          1                    24         0     000600c0    0.0  MT
>    0  0      0          11353742   0          0     00000000          1.3  [IRQ16: [timer]]
>    0  0      0          2868679    0          0     00000000           0.9  [IRQ181: 1msInt]
>    0  0      0          0          0          0     00000000                0.0  [IRQ182: power_down]
>   
> the ROOT task occupy 89.4%'s cpu usage rate; Does that mean the idle cpu usage rate is 89.4%?

Only if you are idling on Linux. The root task represents the whole non-RT Linux 
world, consisting of normal Linux tasks as well as idle time. This is not 
visible here, you need to look at normal Linux statistics.

> Actually, the other remaining task is my work task ,which just occupy a few cpu usage rate  totally.
> If that is true, here is another question:
> Can we limit the cpu usage rate to the real-time partial program?
> like say, i want to assigned 70% of cpu's  performance to RT program, and give the rest to non-RT program.
> Is there any way to fullfill this purpose ?

Take a look at CONFIG_XENO_OPT_SCHED_TP or CONFIG_XENO_OPT_SCHED_QUOTA for that. 
Both allow to define time slices for real-time tasks or task groups. SCHED_TP 
and SCHED_QUOTA scheduling policies are described in the API docs.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-04 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.79.1559582824.27006.xenomai@xenomai.org>
2019-06-04  2:16 ` the 【ROOT】task in xenomai domain liang_1911
2019-06-04 16:49   ` Jan Kiszka

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.