ratelimit: Add tests for lib/ratelimit.c
Status from this message: [merged] lib-add-stress-test-for-ratelimit.patch removed from -mm tree
Get series with b4
b4 am d1007957-97ff-4f6f-92ac-606f68c65dfa@paulmck-laptopVersions newest first · linked by author and title
- v6 Latest3 patches 5 repliesApplied 3/3
- v521 patches 2 repliesSuperseded
- v420 patches 4 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 20 patches | 14 replies | Superseded | |
| v2 | 14 patches | 9 replies | Superseded |
Patches in v6 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | lib: Add trivial kunit test for ratelimitlib/ lib/ lib/ | +91 | 3 replies | Applied |
| 2/3 | lib: Make the ratelimit test more reliablelib/ | +4 | 2 replies | Applied |
| 3/3 | lib: Add stress test for ratelimitlib/ | +67 | 0 replies | Applied |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Petr Mladek |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 0/3] ratelimit: Add tests for lib/ratelimit.c
Hello!
This v6 series adds a simple "smoke" test along with a simple stress test:
1. Add trivial kunit test for ratelimit.
2. Make the ratelimit test more reliable, courtesy of Petr Mladek.
3. Add stress test for ratelimit.
Thanx, Paul
Changes since v5:
o Drop patches that have since been accepted into mainline.
o Add Petr Mladek's patch improving the reliability of the simple
test.
Changes since v4:
o Add a simple stress test.
o Move the tests to the end of the series for bisectability.
o Add Reviewed-by tags.
Changes since v3:
o Correctly handle zero-initialized ratelimit_state structures,
being careful to avoid acquiring the uninitialized ->lock.
o Remove redundant checks of the "burst" local variable.
o Add Reviewed-by tags.
Changes since v2:
o Apply feedback from Bert Karwatzki, Srikanth Aithal, and Mark
Brown, fixing a hang that happened on some systems.
o Applied Reviewed-by tags and added links.
o Added a prototype patch from Petr Mladek that splats if either
interval or burst are negative.
o Added several commits that simplify the code.
Changes since v1 (RFC):
o Switch from lockless fastpath to carrying out needed updates
upon trylock failure, per Petr Mladek feedback. This greatly simplifies the code and is a much smaller change from the current code. There is a small performance penalty compared to the lockless fastpath, but not enough to matter.
o Never unconditionally acquire the lock, again per Petr Mladek
feedback.
o Better define effects of non-positive burst values (always
ratelimit) and non-positive interval values (never ratelimit when the burst value is positive).
o The changes from Petr's original are supplied as five incremental
patches, but could easily be folded into Petr's original if desired. (Left to my lazy self, they stay as-is.)
------------------------------------------------------------------------
b/lib/Kconfig.debug | 11 +++++ b/lib/tests/Makefile | 1 b/lib/tests/test_ratelimit.c | 79 +++++++++++++++++++++++++++++++++++++++++++ lib/tests/test_ratelimit.c | 77 ++++++++++++++++++++++++++++++++++++++--- 4 files changed, 162 insertions(+), 6 deletions(-)