Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-10 Thread via GitHub
anchao merged PR #16342: URL: https://github.com/apache/nuttx/pull/16342 -- 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...@nuttx.apach

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2082763972 ## sched/wqueue/kwork_cancel.c: ## @@ -60,56 +60,48 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, flags = spin_lock_irqsave(&wqueue->

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
xiaoxiang781216 commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081777058 ## sched/wqueue/kwork_cancel.c: ## @@ -60,56 +60,48 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, flags = spin_lock_irqsave(&wq

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
GUIDINGLI commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081642075 ## sched/wqueue/kwork_cancel.c: ## @@ -60,56 +60,48 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, flags = spin_lock_irqsave(&wqueue->

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
xiaoxiang781216 commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081100470 ## sched/wqueue/kwork_cancel.c: ## @@ -46,6 +46,7 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, FAR struct

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081115764 ## sched/wqueue/kwork_cancel.c: ## @@ -46,6 +46,7 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, FAR struct work_s

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081301726 ## sched/wqueue/kwork_cancel.c: ## @@ -60,56 +60,49 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, flags = spin_lock_irqsave(&wqueue->

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081300718 ## sched/wqueue/kwork_cancel.c: ## @@ -60,56 +60,49 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, flags = spin_lock_irqsave(&wqueue->

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081300472 ## sched/wqueue/kwork_queue.c: ## @@ -109,39 +104,52 @@ int work_queue_period_wq(FAR struct kwork_wqueue_s *wqueue, flags = spin_lock_irqsave(&wqueue->lock);

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
anchao commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081187828 ## sched/wqueue/kwork_queue.c: ## @@ -109,39 +104,52 @@ int work_queue_period_wq(FAR struct kwork_wqueue_s *wqueue, flags = spin_lock_irqsave(&wqueue->lock); +

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081174059 ## sched/wqueue/kwork_queue.c: ## @@ -109,6 +106,13 @@ int work_queue_period_wq(FAR struct kwork_wqueue_s *wqueue, flags = spin_lock_irqsave(&wqueue->lock); +

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081173625 ## sched/wqueue/kwork_cancel.c: ## @@ -60,55 +61,50 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, flags = spin_lock_irqsave(&wqueue->

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081173010 ## sched/wqueue/kwork_cancel.c: ## @@ -60,55 +61,50 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, bool sync, flags = spin_lock_irqsave(&wqueue->

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
anchao commented on PR #16342: URL: https://github.com/apache/nuttx/pull/16342#issuecomment-2865556856 emm ... community is not a testing ground, please do not treating everyone like lab rats. -- This is an automated message from the Apache Git Service. To respond to the message, please

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-09 Thread via GitHub
anchao commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2081121374 ## sched/wqueue/kwork_queue.c: ## @@ -109,6 +106,13 @@ int work_queue_period_wq(FAR struct kwork_wqueue_s *wqueue, flags = spin_lock_irqsave(&wqueue->lock); + /*

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-08 Thread via GitHub
Fix-Point commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2080746199 ## sched/wqueue/wqueue.h: ## @@ -216,6 +249,39 @@ bool work_insert_pending(FAR struct kwork_wqueue_s *wqueue, void work_timer_expired(wdparm_t arg); +/**

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-08 Thread via GitHub
fdcavalcanti commented on PR #16342: URL: https://github.com/apache/nuttx/pull/16342#issuecomment-2863187998 Hi @Fix-Point just re-ran the tests on this branch. It seems every issue was fixed. Thanks! -- This is an automated message from the Apache Git Service. To respond to the messag

Re: [PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-08 Thread via GitHub
xiaoxiang781216 commented on code in PR #16342: URL: https://github.com/apache/nuttx/pull/16342#discussion_r2079165110 ## sched/wqueue/wqueue.h: ## @@ -216,6 +249,39 @@ bool work_insert_pending(FAR struct kwork_wqueue_s *wqueue, void work_timer_expired(wdparm_t arg); +/

[PR] sched/wqueue: Fix wd_cancel_sync and improve work_queue performance. [nuttx]

2025-05-08 Thread via GitHub
Fix-Point opened a new pull request, #16342: URL: https://github.com/apache/nuttx/pull/16342 ## Summary This commit fixed work_cancel_sync at a very rare boundary case. When a worker thread re-enqueues the work data structure during the execution of work, the user thread cannot direc