Changeset 1b20da0 in mainline for kernel/generic/src/mm/slab.c
- Timestamp:
- 2018-02-28T17:52:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/slab.c
rdf6ded8 r1b20da0 39 39 * 40 40 * with the following exceptions: 41 * @li empty slabs are deallocated immediately 41 * @li empty slabs are deallocated immediately 42 42 * (in Linux they are kept in linked list, in Solaris ???) 43 43 * @li empty magazines are deallocated when not needed … … 52 52 * good SMP scaling. 53 53 * 54 * When a new object is being allocated, it is first checked, if it is 54 * When a new object is being allocated, it is first checked, if it is 55 55 * available in a CPU-bound magazine. If it is not found there, it is 56 56 * allocated from a CPU-shared slab - if a partially full one is found, 57 * it is used, otherwise a new one is allocated. 57 * it is used, otherwise a new one is allocated. 58 58 * 59 59 * When an object is being deallocated, it is put to a CPU-bound magazine. 60 * If there is no such magazine, a new one is allocated (if this fails, 60 * If there is no such magazine, a new one is allocated (if this fails, 61 61 * the object is deallocated into slab). If the magazine is full, it is 62 62 * put into cpu-shared list of magazines and a new one is allocated. … … 79 79 * the frame allocator fails to allocate a frame, it calls slab_reclaim(). 80 80 * It tries 'light reclaim' first, then brutal reclaim. The light reclaim 81 * releases slabs from cpu-shared magazine-list, until at least 1 slab 81 * releases slabs from cpu-shared magazine-list, until at least 1 slab 82 82 * is deallocated in each cache (this algorithm should probably change). 83 83 * The brutal reclaim removes all cached objects, even from CPU-bound … … 90 90 * to add cpu-cached magazine cache (which would allocate it's magazines 91 91 * from non-cpu-cached mag. cache). This would provide a nice per-cpu 92 * buffer. The other possibility is to use the per-cache 92 * buffer. The other possibility is to use the per-cache 93 93 * 'empty-magazine-list', which decreases competing for 1 per-system 94 94 * magazine cache. … … 660 660 } 661 661 662 /** Create slab cache 662 /** Create slab cache 663 663 * 664 664 */
Note:
See TracChangeset
for help on using the changeset viewer.