Skip to content
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

mqueue: refactor of mqueue #13413

Merged
merged 4 commits into from
Sep 29, 2024
Merged

mqueue: refactor of mqueue #13413

merged 4 commits into from
Sep 29, 2024

Conversation

GUIDINGLI
Copy link
Contributor

@GUIDINGLI GUIDINGLI commented Sep 12, 2024

Summary

mqueue: refactor of mqueue

1. mainly for long time within critical_section
2. move out memcpy buffer from enter_critical_section()
3. let mq_send() return fail when mq buffer full in ISR

after these optimize:
the mq_timedsend()/mq_timedrecv() critical time, which use critmon tools to measure:
from 100us -> 60us

Impact

mqueue

Testing

bes board & sim

@GUIDINGLI
Copy link
Contributor Author

This should submit after:
#13410

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions bot added the Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. label Sep 24, 2024
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@GUIDINGLI
Copy link
Contributor Author

@gustavonihei
@lucasssvaz

This PR will fail at CI, please take a look:

Configuration/Tool: esp32c3-generic/sta_softap
2024-09-26 07:34:53
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  340k  100  340k    0     0  1324k      0 --:--:-- --:--:-- --:--:-- 1324k

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  496k  100  496k    0     0  2704k      0 --:--:-- --:--:-- --:--:-- 2704k
Traceback (most recent call last):
  File "/usr/local/bin/esptool.py", line 37, in <module>
    esptool._main()
  File "/usr/local/lib/python3.10/dist-packages/esptool/__init__.py", line 1170, in _main
    main()
  File "/usr/local/lib/python3.10/dist-packages/esptool/__init__.py", line 983, in main
    operation_func(args)
  File "/usr/local/lib/python3.10/dist-packages/esptool/cmds.py", line 1097, in elf2image
    image.save(args.output)
  File "/usr/local/lib/python3.10/dist-packages/esptool/bin_image.py", line 778, in save
    assert (f.tell() + 8 + self.ROM_LOADER.BOOTLOADER_FLASH_OFFSET) % (
AssertionError
make: *** [tools/Unix.mk:558: nuttx] Error 1
make: Target 'all' not remade because of errors.

I have re-run the fail jobs

@lucasssvaz
Copy link
Contributor

@GUIDINGLI I don't work in the Nuttx project anymore. Maybe @tmedicci can help ?

LD: nuttx.elf
ld: /home/ligd/platform/mainline/nuttx/staging/libsched.a(mq_sndinternal.o): in function `wd_start_realtime':
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274: undefined reference to `clock_realtime2absticks'
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274:(.text+0xad): relocation truncated to fit: R_X86_64_PLT32 against undefined symbol `clock_realtime2absticks'
ld: /home/ligd/platform/mainline/nuttx/staging/libsched.a(mq_rcvinternal.o): in function `wd_start_realtime':
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274: undefined reference to `clock_realtime2absticks'
/home/ligd/platform/mainline/nuttx/include/nuttx/wdog.h:274:(.text+0xad): relocation truncated to fit: R_X86_64_PLT32 against undefined symbol `clock_realtime2absticks'
make[1]: *** [Makefile:128: nuttx.elf] Error 1
make: *** [tools/Unix.mk:551: nuttx.elf] Error 2

Signed-off-by: ligd <[email protected]>
1. mainly for long time within critical_section
2. move out memcpy buffer from enter_critical_section()
3. let mq_send() return fail when mq buffer full in ISR

Signed-off-by: ligd <[email protected]>
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@xiaoxiang781216 xiaoxiang781216 merged commit 7cf5e7c into apache:master Sep 29, 2024
29 checks passed
@fdcavalcanti
Copy link
Contributor

fdcavalcanti commented Oct 2, 2024

Hi folks.
Just to let you know, this PR broke WiFi tests on all Espressif SoCs.
ifconfig is behaving differently, not changing the interface state after a reboot.
Iperf and simple ping tests are also failing.

@xiaoxiang781216
Copy link
Contributor

@GUIDINGLI please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CI Area: OS Components OS Components issues Area: Tooling Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants