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

Lesson 07 #101

Open
wants to merge 6 commits into
base: Alexander.Androsov
Choose a base branch
from

Conversation

megaparanoik
Copy link

@megaparanoik megaparanoik commented Nov 22, 2018

Added a sysfs module code based on sysfs module from Lesson 05.
To build the module you should first export the BUILD_KERNEL environment variable, that points to a kernel directory.

The sysfs module creates own class case_converter in /sys/class
The class includes such attributes: alphabetic, converted, numeric, processed, used which give the work statistic of the module.
The buffer attribute is an RW exchange buffer.

The module provides different memory management models, a certain model is selected using the "mode" param while the module loaded.
mode=0 (1st item Readme.) - Slab memory allocator with a single slab-buffer, which allocates at writing into the buffer attribute and releases at reading from the buffer attribute.
mode=1 (2nd item Readme) - Slab memory allocator with multiplay slab-buffers, which allocated at each writing into the buffer attribute and released at unloading the module.
mode=2 (3rd item Readme) - Memory pool with predefined reserved buffers based on slab allocator. All module functionality corresponds to mode=1
mode=3 (4th item Readme) - Memory pool with resizable buffers based on slab allocator.

@megaparanoik megaparanoik added the not ready The PR is not ready for review (set by author). label Nov 22, 2018
@megaparanoik megaparanoik added ready and removed not ready The PR is not ready for review (set by author). labels Dec 6, 2018
@megaparanoik megaparanoik requested review from AleksandrBulyshchenko and removed request for AleksandrBulyshchenko December 6, 2018 02:40
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.

2 participants