Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-04-05 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2765738455 Sorry, clicked "close by accident" :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-04-05 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020504308 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-04-05 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2008087983 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,54 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock p

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-04-05 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010217732 ## libs/libc/semaphore/sem_wait.c: ## @@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem) /* Let nxsem_wait() do the real work */ - ret = nxsem_wait(sem); + ret = n

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-04-05 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2013466633 ## include/nuttx/sem_fast.h: ## @@ -0,0 +1,184 @@ +/ + * include/nuttx/sem_fast.h + * + * S

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-04-05 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2022279398 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-04-04 Thread via GitHub
xiaoxiang781216 merged PR #16030: URL: https://github.com/apache/nuttx/pull/16030 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nu

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2022165895 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2022157093 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
anchao commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2012139268 ## include/nuttx/sem_fast.h: ## @@ -0,0 +1,184 @@ +/ + * include/nuttx/sem_fast.h + * + * SPD

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2765736803 Based on comments from @pussuw , I will still do the following changes to this: 1) have separate functions for no cancellation point or errno in libc without the "nx..." prefix

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
jlaitine closed pull request #16030: Optimize mutex atomic fast path URL: https://github.com/apache/nuttx/pull/16030 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscr

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2765749632 I will still do the following chages based on comments from @pussuw : 1) Will have separate functions for non-cancellation or errno in libc without the nx-prefix and functions in kerne

[PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
jlaitine opened a new pull request, #16030: URL: https://github.com/apache/nuttx/pull/16030 ## Summary This further optimizes mutexes: 1. If priority inheritance or priority protect are enabled in nuttx config, the fast atomic mutex path should be used, if priority adjusting is not

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020730729 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020723547 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020504308 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020504308 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-31 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020504308 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-29 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020071432 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-29 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2020071432 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-29 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2019776932 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2019736741 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2019213027 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2019213027 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761196627 @nuttxpr test mlkv_duos:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761195946 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (avaota-a1:nsh) https://gitlab.com

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761183195 @nuttxpr test avaota-a1:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761193974 > ~Hmmm wonder why Avaota-A1 Arm64 SBC is failing...~ https://gist.github.com/lupyuen/75bee0db56674f2a90c4be99a3baa15a > > ``` > dump_assert_info: Current Version: NuttX 10.4.0

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761206592 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (milkv_duos:nsh) https://gitlab.co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761150893 Hmmm wonder why Avaota-A1 Arm64 SBC is failing... https://gist.github.com/lupyuen/75bee0db56674f2a90c4be99a3baa15a ```text dump_assert_info: Current Version: NuttX 10.4.0 427d51e0

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761145703 And had to modify still a bit to pass CI with debug assertions -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and us

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761117846 @nuttxpr test avaota-a1:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2761114717 Modified the PR acc. to the review comments, re-tested on rv-virt:nsh64 (ostest) and on multiple real hw & build configurations (MPFS, CONFIG_BUILD_KERNEL and CONFIG_BUILD_FLAT, SMP and

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2018503867 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-28 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2018351215 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-27 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2007915286 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,56 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock p

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-27 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010651001 ## libs/libc/semaphore/sem_wait.c: ## @@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem) /* Let nxsem_wait() do the real work */ - ret = nxsem_wait(sem); + ret = n

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-27 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2743504357 Changed the way how atomic.h is included, now it should compile. Re-tested on mpfs. -- This is an automated message from the Apache Git Service. To respond to the message, please log o

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2015665653 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2014904748 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2014952840 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2014926704 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2014767470 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2014767470 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2014767470 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2014767470 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2753551179 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (milkv_duos:nsh) https://gitlab.co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2753542287 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (avaota-a1:nsh) https://gitlab.com

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2753542472 @nuttxpr test milkv_duos:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific c

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-26 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2753533140 @nuttxpr test avaota-a1:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2753367465 Updated acc. to comments from @xiaoxiang781216 , no functional change. Still re-tested on qemu rv64-virt:nsh and on real hardware (mpfs & i.MX93). -- This is an automated message f

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2013464934 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2013464934 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2013464934 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/**

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2013460983 ## include/nuttx/sem_fast.h: ## @@ -0,0 +1,184 @@ +/ + * include/nuttx/sem_fast.h + * + * S

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2013297079 ## libs/libc/semaphore/sem_wait.c: ## @@ -98,3 +98,43 @@ int sem_wait(FAR sem_t *sem) leave_cancellation_point(); return ERROR; } + +/***

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2751303730 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (milkv_duos:nsh) https://gitlab.co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2751290397 @nuttxpr test milkv_duos:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific c

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2751290141 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (avaota-a1:nsh) https://gitlab.com

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2751276694 @nuttxpr test avaota-a1:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2751273215 The CI build should now be ok, also corrected some comments in the header. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHu

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-25 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2750646411 Sorry @jlaitine: Could you fix the CI Build Error? Then I'll retest on Avaota-A1 SBC and Oz64 SBC. Thanks :-) https://github.com/apache/nuttx/actions/runs/14053936471/job/39349327053?pr=1

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2750263661 Changed the implementation to put mutex fast path directly inside nxsem_post, nxsem_wait and nxsem_trywait acc. to the suggestions from @xiaoxiang781216 and @pussuw . This actuall

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2011386408 ## libs/libc/semaphore/sem_wait.c: ## @@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem) /* Let nxsem_wait() do the real work */ - ret = nxsem_wait(sem); + ret =

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010414912 ## libs/libc/semaphore/sem_wait.c: ## @@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem) /* Let nxsem_wait() do the real work */ - ret = nxsem_wait(sem); + ret =

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010254516 ## libs/libc/semaphore/sem_trywait.c: ## @@ -67,7 +67,12 @@ int sem_trywait(FAR sem_t *sem) /* Let nxsem_trywait do the real work */ - ret = nxsem_trywait(sem)

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010180473 ## libs/libc/semaphore/sem_wait.c: ## @@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem) /* Let nxsem_wait() do the real work */ - ret = nxsem_wait(sem); +

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
acassis commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010172403 ## sched/semaphore/sem_post.c: ## @@ -259,16 +259,18 @@ int nxsem_post(FAR sem_t *sem) * else try to get it in slow mode. */ -#if !defined(CONFIG_PRIORITY_INH

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
pussuw commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2748106650 I'm currently sick, I'll do a proper review tomorrow. Looks good though. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub an

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010161040 ## libs/libc/semaphore/sem_wait.c: ## @@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem) /* Let nxsem_wait() do the real work */ - ret = nxsem_wait(sem); + ret = n

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2010067300 ## libs/libc/semaphore/sem_trywait.c: ## @@ -67,7 +67,12 @@ int sem_trywait(FAR sem_t *sem) /* Let nxsem_trywait do the real work */ - ret = nxsem_trywa

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2747742881 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (milkv_duos:nsh) https://gitlab.co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2747731442 @nuttxpr test milkv_duos:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific c

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2747730347 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues) Build and Test Successful (avaota-a1:nsh) https://gitlab.com

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
lupyuen commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2747718535 @nuttxpr test avaota-a1:nsh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific co

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2747671530 Rebased against current master and cleaned up one comment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the UR

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
jlaitine commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2747286090 Re-tested on mpfs and qemu targets -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the spe

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-24 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2009667981 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,54 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock p

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-23 Thread via GitHub
acassis commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2009121738 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,54 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock pa

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-22 Thread via GitHub
raiden00pl commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2008703373 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,54 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-22 Thread via GitHub
anchao commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2008634224 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,54 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock pat

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-21 Thread via GitHub
jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2008083224 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,54 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock p

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-21 Thread via GitHub
xiaoxiang781216 commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2008021310 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,54 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/u

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-21 Thread via GitHub
pussuw commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2007834177 ## include/nuttx/semaphore.h: ## @@ -59,6 +59,56 @@ {(c), (f), SEM_WAITLIST_INITIALIZER} #endif /* CONFIG_PRIORITY_INHERITANCE */ +/* Fast mutex lock/unlock pat

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-21 Thread via GitHub
nuttxpr commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2742996344 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues) Yes, this PR appears to meet the NuttX requirements, al

Re: [PR] Optimize mutex atomic fast path [nuttx]

2025-03-21 Thread via GitHub
pussuw commented on PR #16030: URL: https://github.com/apache/nuttx/pull/16030#issuecomment-2743006736 This partially completes the discussion from here https://github.com/apache/nuttx/pull/14465 mutex holder still needs to be moved to userspace -- This is an automated message from