jlaitine commented on PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#issuecomment-3052220420
@hujun260 ; I changed the erroneous places which you pointed out,
I also added one patch on the top, which tries to address your concern of
moving tasks back-and-forth when sched-l
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2194713589
##
sched/sched/sched_suspend.c:
##
@@ -172,7 +173,11 @@ void nxsched_suspend(FAR struct tcb_s *tcb)
{
switch_needed = nxsched_remove_readytorun(tcb
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2194000956
##
sched/sched/sched_suspend.c:
##
@@ -172,7 +173,11 @@ void nxsched_suspend(FAR struct tcb_s *tcb)
{
switch_needed = nxsched_remove_readytorun(tcb
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2194000956
##
sched/sched/sched_suspend.c:
##
@@ -172,7 +173,11 @@ void nxsched_suspend(FAR struct tcb_s *tcb)
{
switch_needed = nxsched_remove_readytorun(tcb
jlaitine commented on PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#issuecomment-3051085860
Thanks for the good comments @hujun260 ! I will continue refining this PR
later today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please lo
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193984003
##
sched/sched/sched_suspend.c:
##
@@ -172,7 +173,11 @@ void nxsched_suspend(FAR struct tcb_s *tcb)
{
switch_needed = nxsched_remove_readytorun(tcb
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193987877
##
sched/sched/sched_setpriority.c:
##
@@ -191,10 +133,11 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
{
FAR struct tcb_s *rtc
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193984003
##
sched/sched/sched_suspend.c:
##
@@ -172,7 +173,11 @@ void nxsched_suspend(FAR struct tcb_s *tcb)
{
switch_needed = nxsched_remove_readytorun(tcb
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193976614
##
sched/sched/sched_addreadytorun.c:
##
@@ -114,7 +114,87 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
return ret;
}
-#endif /* !CONFIG_SMP */
+
+#els
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193904597
##
sched/sched/sched_setpriority.c:
##
@@ -191,10 +133,11 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
{
FAR struct tcb_s *rtc
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193904597
##
sched/sched/sched_setpriority.c:
##
@@ -191,10 +133,11 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
{
FAR struct tcb_s *rtc
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193901479
##
sched/sched/sched_addreadytorun.c:
##
@@ -114,7 +114,87 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
return ret;
}
-#endif /* !CONFIG_SMP */
+
+#els
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193901017
##
sched/sched/sched_addreadytorun.c:
##
@@ -114,7 +114,87 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
return ret;
}
-#endif /* !CONFIG_SMP */
+
+#els
jlaitine commented on PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#issuecomment-3048757174
Now there is an initial version, with removed g_pendingtasks for SMP.
I didn't test it fully yet, except quick trials with ostest on rv-virt:smp64
and with real application on mpfs
xiaoxiang781216 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2191728532
##
sched/sched/sched_addreadytorun.c:
##
@@ -196,7 +196,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
* situation.
*/
- if (nxsched_islock
xiaoxiang781216 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2191728532
##
sched/sched/sched_addreadytorun.c:
##
@@ -196,7 +196,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
* situation.
*/
- if (nxsched_islock
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2191555409
##
sched/sched/sched_addreadytorun.c:
##
@@ -196,7 +196,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
* situation.
*/
- if (nxsched_islocked_tcb(
xiaoxiang781216 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2191452164
##
sched/sched/sched_addreadytorun.c:
##
@@ -196,7 +196,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
* situation.
*/
- if (nxsched_islock
fdcavalcanti commented on PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#issuecomment-3045865199
Will test on ESP32, its been failing for some time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL a
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2186967343
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2186287186
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2186284177
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2186285968
##
sched/sched/sched_setpriority.c:
##
@@ -231,8 +223,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#ifdef CONFIG_SMP
int c
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2186284177
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2186284177
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2186284177
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185684622
##
sched/sched/sched_setpriority.c:
##
@@ -223,29 +230,30 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
/* A context switch will
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185684622
##
sched/sched/sched_setpriority.c:
##
@@ -223,29 +230,30 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
/* A context switch will
jlaitine commented on PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#issuecomment-3036474072
> In principle, we should not determine whether other cores are in the
sched_lock state, because this state is not fixed and can change at any time.
Instead, we should modify some global
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185451688
##
sched/sched/sched_addreadytorun.c:
##
@@ -196,7 +196,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
* situation.
*/
- if (nxsched_islocked_tcb(
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185450555
##
sched/sched/sched_setpriority.c:
##
@@ -231,8 +223,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#ifdef CONFIG_SMP
int c
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185449179
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185295638
##
sched/sched/sched_mergepending.c:
##
@@ -190,96 +190,90 @@ bool nxsched_merge_pending(void)
{
FAR struct tcb_s *rtcb;
FAR struct tcb_s *ptcb;
- FAR struct t
jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185295638
##
sched/sched/sched_mergepending.c:
##
@@ -190,96 +190,90 @@ bool nxsched_merge_pending(void)
{
FAR struct tcb_s *rtcb;
FAR struct tcb_s *ptcb;
- FAR struct t
hujun260 commented on PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#issuecomment-3036131751
In principle, we should not determine whether other cores are in the
sched_lock state, because this state is not fixed and can change at any time.
Instead, we should modify some global o
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185251309
##
sched/sched/sched_addreadytorun.c:
##
@@ -196,7 +196,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
* situation.
*/
- if (nxsched_islocked_tcb(
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185242444
##
sched/sched/sched_addreadytorun.c:
##
@@ -196,7 +196,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
* situation.
*/
- if (nxsched_islocked_tcb(
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185217336
##
sched/sched/sched_setpriority.c:
##
@@ -231,8 +223,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#ifdef CONFIG_SMP
int c
hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2185205538
##
sched/sched/sched_setpriority.c:
##
@@ -259,7 +250,7 @@ static inline void nxsched_running_setpriority(FAR struct
tcb_s *tcb,
#endif
if (nxsched_reprio
jlaitine commented on PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#issuecomment-3035898054
I realized that sched_mergepending didn't re-check the minimum priority
after every loop. So added that...
--
This is an automated message from the Apache Git Service.
To respond to th
jlaitine opened a new pull request, #16673:
URL: https://github.com/apache/nuttx/pull/16673
## Summary
This fixes scheduling issues found in both code review and testing. The main
issues started with nxsched_addreadytorun putting tasks to the pending list on
wrong basis; basically ch
41 matches
Mail list logo