Skip to content

Update list.c #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update list.c #4

wants to merge 1 commit into from

Conversation

bhoomrs
Copy link
Owner

@bhoomrs bhoomrs commented Jan 17, 2025

Description

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@bhoomrs
Copy link
Owner Author

bhoomrs commented Jan 17, 2025

This PR is benchmarked on NXP FRDM-K64F microcontroller board. Here are the results:

** Thread stats [avg, min, max] in nanoseconds **
Spawn (no context switch)               :  13625,  13625,  15416
Create (no context switch)              :    n/a,    n/a,    n/a
Start (no context switch)               :    n/a,    n/a,    n/a
Suspend (no context switch)             :   5458,   5458,   7250
Resume (no context switch)              :   4625,   4625,   6291
Spawn (context switch)                  :  14791,  14791,  16625
Start  (context switch)                 :    n/a,    n/a,    n/a
Suspend (context switch)                :   8208,   8125,  10000
Resume (context switch)                 :   6458,   6458,   8166
Terminate (context switch)              :  16458,  16458,  19333
** Mutex Stats [avg, min, max] in nanoseconds **
Lock (no owner)                         :   3916,   3916,   5625
Unlock (no waiters)                     :   4666,   4666,   6458
Recursive lock                          :   1708,   1666,   3500
Recursive unlock                        :   1791,   1791,   3541
Unlock with unpend (no context switch)  :   4708,   4708,   6375
Unlock with unpend (context switch)     :  13291,  13291,  15000
Pend (no priority inheritance)          :  18133,  18125,  20958
Pend (priority inheritance)             :  20875,  20833,  23583
** Semaphore stats [avg, min, max] in nanoseconds **
Take (context switch)                   :  16541,  16541,  19375
Give (context switch)                   :   9125,   9125,  10833
** Semaphore stats [avg, min, max] in nanoseconds **
Give (no context switch)                :   3083,   3083,   4750
Take (no context switch)                :   2625,   2625,   4375
** Yield stats [avg, min, max] in nanoseconds **
Yield (no context switch)               :   2791,   2791,   4458
Yield (context switch)                  :   2708,   2708,   4458
** Allocation stats [avg, min, max] in nanoseconds **
Malloc                                  :    591,    591,   2333
Free                                    :    558,    550,   2450
** Message queue stats [avg, min, max] in nanoseconds **
Create                                  :    n/a,    n/a,    n/a
Send (no context switch)                :    n/a,    n/a,    n/a
Receive (no context switch)             :    n/a,    n/a,    n/a
Send (context switch)                   :    n/a,    n/a,    n/a
Receive (context switch)                :    n/a,    n/a,    n/a
** Interrupt Stats [avg, min, max] in nanoseconds **

Latency                                 :    458,    458,    458

*** Done! ***


Outliers Detected:

  • Spawn (no context switch) (max): 15416 (Ideal: 13625)

Please improve your Kernel performance.

@bhoomrs bhoomrs closed this Jan 20, 2025
@bhoomrs bhoomrs reopened this Jan 20, 2025
@bhoomrs bhoomrs closed this Jan 20, 2025
@bhoomrs bhoomrs reopened this Jan 20, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs bhoomrs reopened this Jan 22, 2025
@bhoomrs bhoomrs closed this Jan 22, 2025
@bhoomrs
Copy link
Owner Author

bhoomrs commented Jan 22, 2025

This PR is benchmarked on the NXP FRDM-K64F microcontroller board. Here are the results:

** Thread stats [avg, min, max] in nanoseconds **
Spawn (no context switch)               :  19708,  19708,  21375
Create (no context switch)              :    n/a,    n/a,    n/a
Start (no context switch)               :    n/a,    n/a,    n/a
Suspend (no context switch)             :   5541,   5541,   7125
Resume (no context switch)              :   4875,   4875,   6458
Spawn (context switch)                  :  20958,  20958,  22666
Start  (context switch)                 :    n/a,    n/a,    n/a
Suspend (context switch)                :   8250,   8250,   9833
Resume (context switch)                 :   6791,   6791,   8291
Terminate (context switch)              :  16166,  16166,  18583
** Mutex Stats [avg, min, max] in nanoseconds **
Lock (no owner)                         :   3750,   3750,   5333
Unlock (no waiters)                     :   4958,   4958,   6500
Recursive lock                          :   1625,   1583,   3291
Recursive unlock                        :   1750,   1750,   3375
Unlock with unpend (no context switch)  :   5000,   5000,   6500
Unlock with unpend (context switch)     :  13416,  13416,  15000
Pend (no priority inheritance)          :  17625,  17625,  19916
Pend (priority inheritance)             :  20291,  20250,  22708
** Semaphore stats [avg, min, max] in nanoseconds **
Take (context switch)                   :  16166,  16166,  18541
Give (context switch)                   :   9041,   9041,  10583
** Semaphore stats [avg, min, max] in nanoseconds **
Give (no context switch)                :   3208,   3208,   4750
Take (no context switch)                :   2458,   2458,   4083
** Yield stats [avg, min, max] in nanoseconds **
Yield (no context switch)               :   2833,   2833,   4375
Yield (context switch)                  :   2791,   2791,   4291
** Allocation stats [avg, min, max] in nanoseconds **
Malloc                                  :    591,    591,   2250
Free                                    :    558,    558,   2241
** Message queue stats [avg, min, max] in nanoseconds **
Create                                  :    n/a,    n/a,    n/a
Send (no context switch)                :    n/a,    n/a,    n/a
Receive (no context switch)             :    n/a,    n/a,    n/a
Send (context switch)                   :    n/a,    n/a,    n/a
Receive (context switch)                :    n/a,    n/a,    n/a
** Interrupt Stats [avg, min, max] in nanoseconds **

Latency                                 :    458,    458,    458

*** Done! ***


Outliers Detected:

  • Spawn (no context switch) (avg): 19708 (Ideal: 13625)
  • Spawn (no context switch) (min): 19708 (Ideal: 13625)
  • Spawn (no context switch) (max): 21375 (Ideal: 13625)
  • Resume (no context switch) (avg): 4875 (Ideal: 4625)
  • Resume (no context switch) (min): 4875 (Ideal: 4625)
  • Spawn (context switch) (avg): 20958 (Ideal: 14791)
  • Spawn (context switch) (min): 20958 (Ideal: 14791)
  • Spawn (context switch) (max): 22666 (Ideal: 16625)
  • Resume (context switch) (avg): 6791 (Ideal: 6458)
  • Resume (context switch) (min): 6791 (Ideal: 6458)
  • Terminate (context switch) (max): 18583 (Ideal: 19333)
  • Lock (no owner) (avg): 3750 (Ideal: 3916)
  • Lock (no owner) (min): 3750 (Ideal: 3916)
  • Lock (no owner) (max): 5333 (Ideal: 5625)
  • Unlock (no waiters) (avg): 4958 (Ideal: 4666)
  • Unlock (no waiters) (min): 4958 (Ideal: 4666)
  • Recursive lock (avg): 1625 (Ideal: 1708)
  • Recursive lock (min): 1583 (Ideal: 1666)
  • Recursive lock (max): 3291 (Ideal: 3500)
  • Recursive unlock (max): 3375 (Ideal: 3541)
  • Unlock with unpend (no context switch) (avg): 5000 (Ideal: 4708)
  • Unlock with unpend (no context switch) (min): 5000 (Ideal: 4708)
  • Pend (no priority inheritance) (max): 19916 (Ideal: 20958)
  • Pend (priority inheritance) (max): 22708 (Ideal: 23583)
  • Take (context switch) (max): 18541 (Ideal: 19375)
  • Give (no context switch) (avg): 3208 (Ideal: 3083)
  • Give (no context switch) (min): 3208 (Ideal: 3083)
  • Take (no context switch) (avg): 2458 (Ideal: 2625)
  • Take (no context switch) (min): 2458 (Ideal: 2625)
  • Take (no context switch) (max): 4083 (Ideal: 4375)
  • Yield (context switch) (avg): 2791 (Ideal: 2708)
  • Yield (context switch) (min): 2791 (Ideal: 2708)
  • Yield (context switch) (max): 4291 (Ideal: 4458)
  • Malloc (max): 2250 (Ideal: 2333)
  • Free (max): 2241 (Ideal: 2450)

@bhoomrs bhoomrs reopened this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant