mimiker icon indicating copy to clipboard operation
mimiker copied to clipboard

[vmem] Boundary tag allocator.

Open MichalBlk opened this issue 2 years ago • 0 comments

The primary problem with our current boundary tag allocation solution which is based on the pool allocator is that it creates a cyclic dependency between pool and vmem. If a pool happens to run out of free items in slabs, it calls vmem to allocate kernel virtual address space. However, if at that time vmem runs out of boundary tags, we reenter pool_alloc and panic due to an attempt to acquire a nonrecursive mutex for the second time. Moreover, changing the allocation scheme to allocate new slabs from some other area (e.g. dmap) doesn't fix all problems as there's still a cycle between vmem's and boundary tag pool's lock (which is sometimes detected by lockdep).

This PR contains changes introduced in #1327.

MichalBlk avatar Aug 09 '22 22:08 MichalBlk