All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] What does activating SMP mean?
@ 2018-10-01  5:33 박재호
  2018-10-01  7:42 ` Per Oberg
  0 siblings, 1 reply; 3+ messages in thread
From: 박재호 @ 2018-10-01  5:33 UTC (permalink / raw)
  To: xenomai

Hi, all



I thought that activating SMP makes tasks using all cpu cores, but I realized that it doesn't.

I did not explicitly specify the CPU when I created the task.

I have created two xenomai tasks and checked to see how much cpu share the task has on any cpu with / proc / xenomai / stat.

As a result, we confirmed that only one cpu of two cpu works.



So we used T_CPU () to allocate different CPU cores for each task when we created the task.

As a result, you can see that both tasks are running on two CPUs.



I expected to use both CPUs when I enabled SMP, but I did not. Why is not it?

Also, does one task only run on one cpu?





The environment I used is shown below.

------------------------------------------------------------------------

zybo-z7-20(zynq-7000)

Dual-Core ARM Coretex-A9 MPCore Up to 866MHz



xenomai 2.6.5

kernel 3.14.2

ubuntu 14.04

------------------------------------------------------------------------



thank you for your advice.


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

* Re: [Xenomai] What does activating SMP mean?
  2018-10-01  5:33 [Xenomai] What does activating SMP mean? 박재호
@ 2018-10-01  7:42 ` Per Oberg
  2018-10-01  7:48   ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Per Oberg @ 2018-10-01  7:42 UTC (permalink / raw)
  To: xenomai

Hello

----- Den 1 okt 2018, på kl 7:33, 박재호 jaeho@seoultech.ac.kr skrev:

> Hi, all

> I thought that activating SMP makes tasks using all cpu cores, but I realized
> that it doesn't.

> I did not explicitly specify the CPU when I created the task.

> I have created two xenomai tasks and checked to see how much cpu share the task
> has on any cpu with / proc / xenomai / stat.

> As a result, we confirmed that only one cpu of two cpu works.

> So we used T_CPU () to allocate different CPU cores for each task when we
> created the task.

> As a result, you can see that both tasks are running on two CPUs.

> I expected to use both CPUs when I enabled SMP, but I did not. Why is not it?

> Also, does one task only run on one cpu?

> The environment I used is shown below.

> ------------------------------------------------------------------------

> zybo-z7-20(zynq-7000)

> Dual-Core ARM Coretex-A9 MPCore Up to 866MHz

> xenomai 2.6.5

> kernel 3.14.2

> ubuntu 14.04

> ------------------------------------------------------------------------

> thank you for your advice.

> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> https://xenomai.org/mailman/listinfo/xenomai

Not sure that I can answer your question as it was formulated, but perhaps I can contribute with something. Do your test-task use all your CPU time or do you have idling? I would -guess- that as long as one CPU is sufficient the scheduler won't use any other unless it was specified on the command-line.

I answer, even though I am not sure about this  because I would like to be corrected if I'm wrong. 

Regards
Per Öberg


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

* Re: [Xenomai] What does activating SMP mean?
  2018-10-01  7:42 ` Per Oberg
@ 2018-10-01  7:48   ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2018-10-01  7:48 UTC (permalink / raw)
  To: Per Oberg, xenomai

On 01.10.18 09:42, Per Oberg wrote:
> Hello
> 
> ----- Den 1 okt 2018, på kl 7:33, 박재호 jaeho@seoultech.ac.kr skrev:
> 
>> Hi, all
> 
>> I thought that activating SMP makes tasks using all cpu cores, but I realized
>> that it doesn't.
> 
>> I did not explicitly specify the CPU when I created the task.
> 
>> I have created two xenomai tasks and checked to see how much cpu share the task
>> has on any cpu with / proc / xenomai / stat.
> 
>> As a result, we confirmed that only one cpu of two cpu works.
> 
>> So we used T_CPU () to allocate different CPU cores for each task when we
>> created the task.
> 
>> As a result, you can see that both tasks are running on two CPUs.
> 
>> I expected to use both CPUs when I enabled SMP, but I did not. Why is not it?
> 
>> Also, does one task only run on one cpu?
> 
>> The environment I used is shown below.
> 
>> ------------------------------------------------------------------------
> 
>> zybo-z7-20(zynq-7000)
> 
>> Dual-Core ARM Coretex-A9 MPCore Up to 866MHz
> 
>> xenomai 2.6.5
> 
>> kernel 3.14.2
> 
>> ubuntu 14.04
> 
>> ------------------------------------------------------------------------
> 
>> thank you for your advice.
> 
>> _______________________________________________
>> Xenomai mailing list
>> Xenomai@xenomai.org
>> https://xenomai.org/mailman/listinfo/xenomai
> 
> Not sure that I can answer your question as it was formulated, but perhaps I can contribute with something. Do your test-task use all your CPU time or do you have idling? I would -guess- that as long as one CPU is sufficient the scheduler won't use any other unless it was specified on the command-line.
> 
> I answer, even though I am not sure about this  because I would like to be corrected if I'm wrong.

Xenomai does no load-balancing of RT threads across CPUs. You need to explicitly 
assign a thread to a CPU if you want to spread out on multiple ones. You may see 
this by chance if Linux decides to spawn the non-RT thread part on different 
CPUs prior to Xenomai creating its RT part, but you cannot rely on that.

Jan

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


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

end of thread, other threads:[~2018-10-01  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-01  5:33 [Xenomai] What does activating SMP mean? 박재호
2018-10-01  7:42 ` Per Oberg
2018-10-01  7:48   ` 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.