summaryrefslogtreecommitdiff
path: root/kern/kmem.c
AgeCommit message (Collapse)Author
2019-05-22Add a log print function type for information reportingRichard Braun
This type allows the use of either printf-based or log-based functions when reporting information.
2018-07-25kern/{fmt,shell}: update from upstreamRichard Braun
The shell module has been "objectified" and now supports multiple instances with shareable command sets.
2018-06-24kern/kmem: add option to disable the CPU layerRichard Braun
2018-02-24kern/kmem: new KMEM_DEBUG optionRichard Braun
2018-02-24kern/log2: fix namingRichard Braun
2017-12-03Revert "Make assert have no side effects"Richard Braun
This reverts commit d18d0e85596f90e0bd597b33d58209d0b3973c95.
2017-09-21New build systemRichard Braun
The new build system, called xbuild, is a minimalistic kbuild-like make-based build system, also using kconfig for scalable configurations.
2017-09-06kern/kmem: fix info summary formatRichard Braun
2017-09-04kern/kmem: report physical and virtual memory usageRichard Braun
2017-09-02Rework the build systemRichard Braun
2017-09-02Make assert have no side effectsRichard Braun
This makes sure symbols referenced by assert uses may not be generated if unused. The recently introduced __unused macro is used to suppress compiler warnings resulting from this change.
2017-07-13Switch to initialization operationsRichard Braun
2017-06-25Remove the param moduleRichard Braun
Move the page properties into the new x86/page module, and the virtual memory layout macros into the x86/pmap module.
2017-06-24Make shell command descriptions consistentRichard Braun
2017-06-24kern/kmem: update console output formatRichard Braun
2017-06-24kern/kmem: implement the kmem_info shell commandRichard Braun
2017-05-31Move limits.h to the include directoryRichard Braun
This turns limits.h into a standard header.
2017-05-30Move assert.h to the include directoryRichard Braun
This turns assert.h into a standard header.
2017-04-29New stdio.h standard headerRichard Braun
Make kernel code obtain definitions for the printf family of functions through the inclusion of the standard stdio.h header.
2017-04-29kern/printk: rename to printfRichard Braun
The printk functions are close enough to the printf ones to bear the same names.
2017-03-04Add missing braces for one-line blocksRichard Braun
2017-03-04Fix typosRichard Braun
2017-02-04Clean up compilationRichard Braun
Instead of mixing standard headers and internal redefinitions of standard types, completely rely on the compiler for what is guaranteed for a free standing environment. This results in the removal of kern/stddef.h and kern/stdint.h. The kern/types.h header is reintroduced for the different (and saner) purpose of defining types not specified in standard C, namely ssize_t for now.
2017-01-26kern/kmem: undefine KMEM_VERIFYRichard Braun
That macro was left over during the slab allocator rework.
2017-01-13Replace unsigned long with uintptr_t for integer/pointer conversionsRichard Braun
This is mostly done for the machine-independent part.
2017-01-11vm/vm_page: provide accessors to private dataRichard Braun
Make per-page private data generic, provide accessors, and make the slab allocator use them.
2017-01-11kern/kmem: rework slab allocationRichard Braun
Allocating slabs from the page allocator only is likely to cause fragmentation. Instead, allocate larger-than-page slabs from kernel virtual memory, and page-sized slabs from the page allocator.
2016-12-09Force brackets around one-line conditional statementsRichard Braun
This change was done using astyle, with a few manual editing here and there.
2014-12-10kern/kmem: directmap updateRichard Braun
The main impact of the direct physical mapping on the kmem module is the slab size computation. The page allocator requires the allocation size to be a power-of-two above the page size since it uses the buddy memory allocation algorithm. Custom slab allocation functions are no longer needed since the only user was the kentry area, which has been removed recently. The KMEM_CACHE_NOCPUPOOL flag is also no longer needed since CPU pools, which are allocated from a kmem cache, can now always be allocated out of the direct physical mapping.
2014-11-17kern/kmem: minor interface updatesRichard Braun
Make allocation functions accept and return pointers instead of integers for convenience.
2014-11-17vm/vm_kmem: minor interface updatesRichard Braun
Make functions accept and return pointers instead of integers. Most users of the kernel allocator directly use the returned addresses. Pointers make that more practical.
2014-08-20kern/kmem: pin thread where appropriateRichard Braun
Make sure CPU pools are always accessed from their owning processor.
2014-06-24kern/kmem: silence warningRichard Braun
2014-01-02Declare variables as read mostly where appropriateRichard Braun
2013-06-09kern/kmem: rename constructor typeRichard Braun
2013-06-09kern/kmem: fix object construction bugRichard Braun
2013-06-02kern/kmem: fix locking error in kmem_cache_freeRichard Braun
2013-05-16kern/kmem: reduce fragmentationRichard Braun
This reverts a change brought when reworking slab lists handling that made the allocator store slabs in LIFO order, whatever their reference count. While it's fine for free slabs, it actually increased fragmentation for partial slabs.
2013-05-15kern/list: rename list_insert to list_insert_headRichard Braun
This change increases clarity.
2013-04-21kern/kmem: rework slab lists handlingRichard Braun
Don't enforce strong ordering of partial slabs. Separating partial slabs from free slabs is already effective against fragmentation, and sorting would sometimes cause pathological scalability issues. In addition, store new slabs (whether free or partial) in LIFO order for better cache usage.
2013-04-20kern/kmem: fix locking errorRichard Braun
2013-04-19kern/kmem: move internal data to kmem_i.hRichard Braun
As it's done for other modules, this separation makes the public interface easy to identify.
2013-04-17kern/kmem: replace spin locks with mutexesRichard Braun
2013-01-04kern/kmem: fix typo in commentRichard Braun
2012-12-11kern/kmem: add locksRichard Braun
2012-12-07kern/kmem: add check in buffer-to-slab lookupRichard Braun
2012-12-07kern/kmem: rework buffer-to-slab lookupRichard Braun
Instead of using a red-black tree, rely on the VM system to store kmem specific private data.
2012-12-04kern/kmem: fix kmem_cache_free with KMEM_VERIFYRichard Braun
2012-12-01Normalize the spelling of CPU in commentsRichard Braun
2012-12-01kern/kmem: merge kmem_bootstrap into kmem_setupRichard Braun