nuttxpr commented on PR #15629:
URL: https://github.com/apache/nuttx/pull/15629#issuecomment-2604610208

   [**\[Experimental Bot, please feedback 
here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues)
   
   
   
   This PR does *not* fully meet the NuttX requirements.  Here's a breakdown of 
the missing information:
   
   **Summary:**
   
   * **Insufficient Detail:** While it states the "what" (reverting vector IO), 
it lacks the crucial "why."  *Why* is the complex wrapper unnecessary for basic 
drivers? What problems did it cause?  This is the most important part of the 
summary.
   * **Missing Scope:** What specific drivers are affected? Only `loop`, 
`null`, and `zero`?  Explicitly listing them is better.
   * **Lack of Explanation:** How does reverting this change improve 
performance?  Be specific.  Is it reducing function call overhead?  Memory 
usage?  Explain the mechanism.
   
   **Impact:**
   
   * **Too Vague:** "Improve the performance" is insufficient. Quantify the 
improvement.  Is it 10%? 50%?  Under what conditions?  Which benchmarks were 
used?
   * **Missing Details:**
       * **Impact on user:** Even if the answer is NO, explicitly state it.
       * **Impact on build:** Even if the answer is NO, explicitly state it.
       * **Impact on hardware:** Even if the answer is NO, explicitly state it.
       * **Impact on documentation:**  Does the removed code need to be removed 
from documentation? If not, state NO.
       * **Impact on security:**  Even if the answer is NO, explicitly state it.
       * **Impact on compatibility:** Even if the answer is NO, explicitly 
state it.
   
   **Testing:**
   
   * **Insufficient Host Detail:** `ubuntu 24.04 x86_64` is okay, but 
specifying the compiler version is recommended.
   * **Missing Target Details:** Which architecture and board configuration was 
this tested on?  `sim:qemu-x86_64`? Something else?  This is critical.
   * **Unclear Baseline:** "before" is ambiguous.  Before *what*?  The previous 
commit?  A specific version?
   * **Dependency on Another PR:** Testing should be self-contained.  Relying 
on another PR makes review difficult.  Merge the other PR first or explain 
precisely what changes from that PR are required for this test to be valid.
   * **Test Case Weakness:**  Reading from `/dev/zero` isn't a very 
representative test for driver performance in general.  Consider a test case 
that involves actual I/O with a real device or a more complex simulated device 
if possible.  The current test primarily measures the overhead of the `read()` 
system call itself.
   * **Lack of Before/After Comparison in Same Run:** Running the test 10 times 
before and 10 times after separately introduces variability. A better approach 
is to run the benchmark multiple times in the same test run, both with and 
without the change, to minimize external factors.
   
   **Example of an Improved PR Description:**
   
   ```
   ## Summary
   
   This PR reverts the vector IO implementation from the `loop`, `null`, and 
`zero` drivers. The original vector IO wrapper added unnecessary overhead for 
these basic drivers, which primarily perform simple data transfers.  Profiling 
revealed that the function call overhead and data copying within the vector IO 
codepath significantly impacted performance, particularly for small I/O 
operations.  This revert simplifies the code and improves performance by 
directly accessing the underlying data buffers.
   
   Fixes: #[Issue Number (if applicable)]
   
   ## Impact
   
   * Is new feature added? NO
   * Is existing feature changed? YES. Reverts a previously added feature 
(vector IO) for the `loop`, `null`, and `zero` drivers.
   * Impact on user: NO
   * Impact on build: NO
   * Impact on hardware: NO
   * Impact on documentation: NO
   * Impact on security: NO
   * Impact on compatibility:  NO
   * Anything else to consider? This change improves the performance of the 
affected drivers by approximately 20-25% based on the provided benchmark 
(reading 100,000 bytes).
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   * Build Host(s): Ubuntu 24.04 x86_64, GCC 12.2.0
   * Target(s): sim:qemu-x86_64
   
   Testing Methodology:
   
   A benchmark was created to measure the time taken to perform 100,000 
single-byte reads from `/dev/zero`.  The benchmark was run 10 times before and 
after applying the patch within the same test run to minimize external factors.
   
   Testing logs before change (commit hash: [commit hash]):
   
   ```
   [Benchmark results before change]
   ```
   
   Testing logs after change:
   
   ```
   [Benchmark results after change]
   ```
   ```
   
   
   
   By addressing these points, the PR will be much clearer, easier to review, 
and more likely to be accepted. Remember to quantify the performance 
improvement whenever possible.
   


-- 
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