Skip to content

Lesson 07#101

Open
megaparanoik wants to merge 6 commits into
Kernel-GL-HRK:Alexander.Androsovfrom
megaparanoik:lesson_07
Open

Lesson 07#101
megaparanoik wants to merge 6 commits into
Kernel-GL-HRK:Alexander.Androsovfrom
megaparanoik:lesson_07

Conversation

@megaparanoik

@megaparanoik megaparanoik commented Nov 22, 2018

Copy link
Copy Markdown

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.

Signed-off-by: alex <eelleekk@gmail.com>
Signed-off-by: alex <eelleekk@gmail.com>
@megaparanoik megaparanoik added the not ready The PR is not ready for review (set by author). label Nov 22, 2018
Signed-off-by: alex <eelleekk@gmail.com>
Signed-off-by: alex <eelleekk@gmail.com>
Signed-off-by: Androsov Aleksandr <eelleekk@gmail.com>
Signed-off-by: Androsov Aleksandr <eelleekk@gmail.com>
@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