DawnLiu66 opened a new pull request, #21918:
URL: https://github.com/apache/nuttx/pull/21918

   ## Summary
   
   Replace the `dq_queue_t`/`dq_entry_t` based AIO container lists
   (`g_aio_pending`, the free list and the `aio_cleanup()` local queue) with
   `struct list_node`. The `list_*` primitives give branch-free O(1)
   link/unlink on the submit/complete path, an O(1) membership test via
   `list_in_list()`, and safe iteration via `list_for_every_entry_safe()`.
   The lists are statically initialized with `LIST_INITIAL_VALUE()`, so they
   are valid even before `aio_initialize()` runs.
   
   ## Impact
   
   - New feature: NO.
   - User adaptation: NO.
   - Build: NO.
   - Hardware: NO.
   - Documentation: NO.
   - Security: NO.
   - Compatibility: NO, internal data structure only.
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   
   - Build Host: Ubuntu 22.04 x86_64, gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0,
     master `a3b67d70e0`.
   - Target: `sim:nsh` with `CONFIG_FS_AIO` and `CONFIG_TESTING_OSTEST_AIO`.
     Verified on sim only, no real hardware.
   - `./tools/checkpatch.sh -m -g master..HEAD`: all checks pass.
   - Make and CMake builds pass. On this PR `ostest`, including the AIO test
     cases, exits with status 0. On master the AIO test cases pass the same
     way (the before log is cut at the end of the AIO tests).
   
   Testing logs before change:
   
   ```
   AIO test case 1: Poll for transfer complete
   AIO test case 2: Use LIO_WAIT for transfer complete
   AIO test case 3: Use aio_suspend for transfer complete
   AIO test case 4: Use individual signals for transfer complete
   AIO test case 5: Use list complete signal for transfer complete
   AIO test case 6: Cancel I/O by AIO control block
   AIO test case 7:Cancel I/O by file descriptor
   aio_test: Test completed successfully
   ```
   
   Testing logs after change:
   
   ```
   AIO test case 1: Poll for transfer complete
   AIO test case 2: Use LIO_WAIT for transfer complete
   AIO test case 3: Use aio_suspend for transfer complete
   AIO test case 4: Use individual signals for transfer complete
   AIO test case 5: Use list complete signal for transfer complete
   AIO test case 6: Cancel I/O by AIO control block
   AIO test case 7:Cancel I/O by file descriptor
   aio_test: Test completed successfully
   ostest_main: Exiting with status 0
   ```
   
   ## PR verification Self-Check
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation (git commit 
title and message, coding standard, etc).
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to