Skip to content

[BUG] SLAB: only a limited number of slabs can be allocated #193

@wipawel

Description

@wipawel

Describe the bug
The SLAB implementation has hard-coded number of slab entries it can allocate:

     global_meta_slab.slab_base = alloc_pages;
     global_meta_slab.slab_len = PAGE_SIZE;
     global_meta_slab.slab_size = next_power_of_two(sizeof(meta_slab_t));
     ret = initialize_slab(&global_meta_slab);

When a lot of dynamic memory allocation occurs, the SLAB implementations starts failing:

mm/slab.c (ktf_alloc.167): failed, not enough free pages

To Reproduce
Steps to reproduce the behavior:

  1. Run KTF with several hundreds of slab allocations (kmalloc()'s)

Expected behavior
The global_meta_slab should be dynamically enlarged to cover more slabs when needed.

Metadata

Metadata

Assignees

Labels

Severity: highVery important bug - fix ASAPbugSomething isn't workingissue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions