Subject: Re: Process load balancing among CPU References: <32d2a7d6-c915-2cd1-3c74-c005a53fc708@numalliance.com> From: Jan Kiszka Message-ID: Date: Thu, 24 Oct 2019 12:28:21 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?St=c3=a9phane_Ancelot?= , "xenomai@xenomai.org" On 24.10.19 12:21, St=C3=A9phane Ancelot wrote: > > Le 24/10/2019 =C3=A0 12:13, Jan Kiszka a =C3=A9crit=C2=A0: >> On 24.10.19 10:00, St=C3=A9phane Ancelot via Xenomai wrote: >>> Hi, >>> >>> In our system, I noticed maybe a setup problem, or a xenomai related >>> setup problem regarding user processes. >>> >>> I have 2 user tasks that does not use RT (but xenomai shared memory >>> access), I noticed that if these both tasks were consuming 50% of the >>> CPU they were not migrated on other cpus. >>> >>> There is no CPU affinity setup in these programs , so I kept the kerne= l >>> scheduler doing its job. >>> >>> Is this a bad kernel setting or xenomai setting=C2=A0 to allow process= cpu >>> migration for user processes ? >> There is - by design - no automatic load balancing for Xenomai threads. >> The common case is static schedules /wrt RT task for each CPU. > > This is not an RT thread, this is a userspace non rt task linking > xenomai heap shared memory. > > having a look at this page, the documentation states=C2=A0 cpu_affinity > Defaults to any online CPU. As long as that non-RT task is in Linux mode and has an affinity mask that is not reduced to the single core, Linux will happily load-balance it. But if that task went through shadowing by Xenomai, its affinity mask was likely reduced. Jan