[PATCH v2] libmisc/top: Fix the idle time and priorities on SMP

jameszxj jameszxj at gmail.com
Mon Dec 16 07:05:45 UTC 2019


Agree.
Patch v3 is ok except for IDLE's priority. The maximum_priority is defined by diffrent scheduler, scheduler CBS and EDF define it as INT_MAX, so 
the priority of IDLE is 2147483647 (‭0x7FFFFFFF‬). If normalise the priorities in unmap_priority()​, we can get the expected results from _RTEMS_Priority_From_core.
But the function rtems_scheduler_get_maximum_priority() return  maximum_priority directly, contradictions?
I also find a POSIX function _POSIX_Priority_Get_maximum() return maximum_priority-1, is it right?


------------------ Original ------------------
From: "Chris Johns"<chrisj at rtems.org>;
Date: Mon, Dec 16, 2019 09:53 AM
To: "jameszxj"<jameszxj at gmail.com>;"rtems-devel"<rtems-devel at rtems.org>;

Subject: Re: [PATCH v2] libmisc/top: Fix the idle time and priorities on SMP



On 13/12/19 6:48 pm, jameszxj wrote:
>    2. On z7020 board, SMP mode, the RPRI and CPRI of idle seems not reasonable.

Yes they are not. I have posted v3 of this patch and my hope is the API used
manages this. If it does not we will need look into why or consider an API to
normalise the priorities and to allow a user to get a priority and is consumable
to a human.

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20191216/a2bc8cd2/attachment-0001.html>


More information about the devel mailing list