Skip to content

Update percpu to 0.3#21

Draft
aarkegz wants to merge 9 commits intomainfrom
update_percpu
Draft

Update percpu to 0.3#21
aarkegz wants to merge 9 commits intomainfrom
update_percpu

Conversation

@aarkegz
Copy link
Contributor

@aarkegz aarkegz commented Mar 19, 2026

No description provided.

aarkegz and others added 9 commits March 10, 2026 15:23
…tion, bump to v0.3.0 (#22)

* docs: Add feature modes design and implementation plan

* feat: Add feature modes documentation, tests, and CI updates

- Update naive.rs to support custom-base API (parameters ignored)
- Update test cfg attributes to allow sp-naive without non-zero-vma
- Add percpu_area_size_for_cpus to naive.rs for API compatibility
- Update test.yml with 4 test configurations
- Update check.yml with custom-base build checks
- Update README with comprehensive feature modes documentation

* docs: Update README with custom-base feature details and remove obsolete design documents

- Added notes on manual allocation and initialization for the custom-base feature in README.md.
- Revised feature modes and working modes sections for clarity.
- Removed outdated design and implementation plan documents from the repository.

* docs: fix example in README

* update README

* update CI

* docs: Add mode refactoring design document

Design for splitting init() into init_static() and init_dynamic()
with clearer mode definitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: Add implementation plan for mode refactoring

Step-by-step plan to split init() into init_static() and init_dynamic()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat!: split init() into init_static() and init_dynamic()

BREAKING CHANGE: init() is replaced by init_static() (for sp-naive and
default modes) and init_dynamic() (for custom-base mode).

- Rename init() to init_static() in sp-naive and default modes
- Rename init() to init_dynamic() in custom-base mode
- Update tests and documentation
- Bump version to 0.3.0
- Clarify mode definitions in README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update working modes, update tests

* remove println!s

* remove auto-allocation when being tested on linux

* formatted

* remove old plans

* docs: Add simplify mode design document

Design for removing custom-base feature and unifying init API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat!: remove custom-base feature, unify init API

BREAKING CHANGE: custom-base feature is removed. Use init(base, cpu_count)
instead of init_dynamic(). Both modes now provide init() and init_static().

- Remove custom-base feature from percpu and percpu_macros
- Rename init_dynamic to init
- Add init() to sp-naive mode (parameters ignored)
- Both init() and init_static() support re-initialization
- Update tests and documentation
- Bump version to 0.4.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update code quality, remove spin dep

* update doc

* rm plans

* refactor: rename memory size calculation function and update related documentation

- Renamed `percpu_area_size_for_cpus` to `percpu_area_layout_expected` to better reflect its purpose.
- Updated the implementation to return a `Layout` instead of a size.
- Adjusted all references in the codebase and documentation to use the new function name.
- Modified the `init` function signature to accept a mutable pointer for consistency.
- Updated tests to align with the new API changes.

* fix document, reduce alignment

* simplify CI configs

* refactor: improve percpu test structure and readability

- Updated `test_percpu_multi_core` to `test_percpu_multi_core_in_place` for clarity.
- Reorganized test logic for better readability and consistency.
- Changed `std::ptr::null()` to `std::ptr::null_mut()` in `test_percpu_sp_naive`.
- Enhanced logging output in multi-core tests for better debugging information.

* fix ci config

* refactor: enhance initialization error handling and update documentation

- Introduced `InitError` enum to handle initialization errors such as invalid or unaligned base addresses.
- Updated `init_in_place` and `init` functions to return `Result<usize, InitError>` for better error management.
- Modified documentation to reflect new return types and error conditions.
- Adjusted tests to validate error handling for invalid base addresses.

* formatted

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants