anchao commented on PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#issuecomment-2609691441
@hujun260 Great work, I think we can prepare a report showing the benefits
of SMP mode after all spinlock changes
--
This is an automated message from the Apache Git Service.
To respond
xiaoxiang781216 merged PR #14578:
URL: https://github.com/apache/nuttx/pull/14578
--
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
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1926571146
##
sched/sched/sched_unlock.c:
##
@@ -288,30 +137,23 @@ int sched_unlock(void)
if ((rtcb->flags & TCB_FLAG_POLICY_MASK) == TCB_FLAG_SCHED_SPORADIC
xiaoxiang781216 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1926505855
##
sched/sched/sched_unlock.c:
##
@@ -53,48 +53,25 @@
*
/
-#ifdef CONFIG_SMP
-
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1926274691
##
sched/sched/sched_unlock.c:
##
@@ -124,137 +94,13 @@ int sched_unlock(void)
if ((rtcb->flags & TCB_FLAG_POLICY_MASK) == TCB_FLAG_SCHED_RR &&
xiaoxiang781216 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1925573021
##
sched/sched/sched_lock.c:
##
@@ -64,112 +64,23 @@
*
/
-#ifdef CONFIG_SMP
-
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1925318933
##
sched/sched/sched_lock.c:
##
@@ -64,112 +64,26 @@
*
/
-#ifdef CONFIG_SMP
-
-int sc
xiaoxiang781216 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1924956310
##
include/nuttx/spinlock.h:
##
@@ -584,15 +584,15 @@ irqstate_t spin_lock_irqsave(FAR volatile spinlock_t
*lock)
#ifdef CONFIG_SPINLOCK
static inline_func
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1924656594
##
include/nuttx/spinlock.h:
##
@@ -1003,7 +1048,15 @@ void read_unlock_irqrestore(FAR rwlock_t *lock,
irqstate_t flags);
#ifdef CONFIG_SPINLOCK
irqstate_t write_lo
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1924656070
##
include/nuttx/irq.h:
##
@@ -75,16 +75,6 @@
#endif /* __ASSEMBLY__ */
-#ifdef CONFIG_SMP
-# define cpu_irqlock_clear() \
Review Comment:
done
##
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1924655917
##
include/nuttx/irq.h:
##
@@ -80,7 +80,7 @@
do \
{ \
g_cpu_irqset = 0; \
Review Comment:
We need g_cpu_irqlock not just to protect g_cpu_irqset, bu
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1924654927
##
include/nuttx/spinlock.h:
##
@@ -233,6 +233,8 @@ static inline_function void raw_spin_lock(FAR volatile
spinlock_t *lock)
#ifdef CONFIG_SPINLOCK
static inline_fu
xiaoxiang781216 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1924172641
##
include/nuttx/spinlock.h:
##
@@ -499,6 +499,50 @@ irqstate_t spin_lock_irqsave(FAR volatile spinlock_t *lock)
# define spin_lock_irqsave(l) ((void)(l), up_
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1923009168
##
include/nuttx/irq.h:
##
@@ -80,7 +80,7 @@
do \
Review Comment:
done in next patch
--
This is an automated message from the Apache Git Service.
To respond
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1923008806
##
sched/sched/sched_lock.c:
##
@@ -46,6 +46,29 @@
* Public Functions
/
+/***
xiaoxiang781216 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1922356013
##
sched/sched/sched_lock.c:
##
@@ -64,112 +87,29 @@
*
/
-#ifdef CONFIG_SMP
-
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1921920146
##
include/nuttx/irq.h:
##
@@ -80,7 +80,7 @@
do \
{ \
g_cpu_irqset = 0; \
- spin_unlock_wo_note(&g_cpu_irqlock); \
+ raw_spin_unlock(&g_cpu_ir
xiaoxiang781216 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1921911065
##
include/nuttx/irq.h:
##
@@ -80,7 +80,7 @@
do \
{ \
g_cpu_irqset = 0; \
- spin_unlock_wo_note(&g_cpu_irqlock); \
+ raw_spin_unlock(&g
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1921801015
##
include/nuttx/spinlock.h:
##
@@ -680,6 +703,8 @@ void spin_unlock_irqrestore(FAR volatile spinlock_t *lock,
static inline_function void read_lock(FAR volatile rw
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1861512296
##
sched/irq/irq_csection.c:
##
@@ -440,22 +434,34 @@ void leave_critical_section(irqstate_t flags)
*/
DEBUGASSERT(rtcb->irqcount > 0);
- if (--rtc
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1861441357
##
sched/irq/irq_csection.c:
##
@@ -440,22 +435,40 @@ void leave_critical_section(irqstate_t flags)
*/
DEBUGASSERT(rtcb->irqcount > 0);
- if (--r
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1861372771
##
sched/irq/irq_csection.c:
##
@@ -440,22 +435,40 @@ void leave_critical_section(irqstate_t flags)
*/
DEBUGASSERT(rtcb->irqcount > 0);
- if (--rtc
hujun260 opened a new pull request, #14578:
URL: https://github.com/apache/nuttx/pull/14578
## Summary
1 Accelerated the implementation of sched_lock, remove
enter_critical_section in sched_lock and
only enter_critical_section when task scheduling is required.
2 we add sched_lock_
hujun260 closed pull request #14578: spin_lock_irqsave+sched_lock
URL: https://github.com/apache/nuttx/pull/14578
--
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
hujun260 commented on PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#issuecomment-2503600114
> Have you tested this code with SCHED_INSTRUMENTATION_CSECTION?
yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitH
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1860472978
##
sched/irq/irq_csection.c:
##
@@ -440,22 +435,40 @@ void leave_critical_section(irqstate_t flags)
*/
DEBUGASSERT(rtcb->irqcount > 0);
- if (--r
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1860224762
##
sched/irq/irq_csection.c:
##
@@ -440,22 +435,40 @@ void leave_critical_section(irqstate_t flags)
*/
DEBUGASSERT(rtcb->irqcount > 0);
- if (--rtc
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1859522539
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- *
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1859514078
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- * Pu
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1859492547
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- *
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1859485853
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- * Pu
patacongo commented on PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#issuecomment-2501657197
The spinlock has always been a very light weight way of waiting. In SMP,
sched_lock() is heavy weight and and also calls enter_critical_section which is
even heavier. This will effect
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1858064950
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- *
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857900343
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- * Pu
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857850907
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- *
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857850942
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- *
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857850443
##
include/sys/syscall_lookup.h:
##
@@ -41,10 +41,12 @@ SYSCALL_LOOKUP(sched_getparam, 2)
SYSCALL_LOOKUP(sched_getscheduler, 1)
SYSCALL_LOOKUP(sc
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857739020
##
sched/sched/sched_unlock.c:
##
@@ -37,281 +37,178 @@
#include "sched/sched.h"
/
- * Pu
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857722335
##
include/sys/syscall_lookup.h:
##
@@ -41,10 +41,12 @@ SYSCALL_LOOKUP(sched_getparam, 2)
SYSCALL_LOOKUP(sched_getscheduler, 1)
SYSCALL_LOOKUP(sche
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857550677
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1857511553
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856656096
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856656096
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856621316
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856608098
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856608098
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856584409
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856584409
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856503862
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856503862
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856503862
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856455978
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856401422
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856232209
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856202442
##
sched/sched/sched_lock.c:
##
@@ -64,112 +83,25 @@
*
/
-#ifdef CONFIG_SMP
-
-int sc
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856182442
##
sched/sched/sched_lock.c:
##
@@ -64,112 +83,25 @@
*
/
-#ifdef CONFIG_SMP
-
-int sche
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856193301
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856149288
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856149288
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856145799
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856138788
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,155 @@
* Public Functions
/
-/
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856125741
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,160 @@
* Public Functions
/
-/**
hujun260 commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856127202
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,160 @@
* Public Functions
/
-/**
anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1856029168
##
sched/sched/sched_unlock.c:
##
@@ -40,278 +40,160 @@
* Public Functions
/
-/
64 matches
Mail list logo