Changeset 7669bcf in mainline


Ignore:
Timestamp:
2006-06-03T21:57:30Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eb3d379
Parents:
9f16cb0
Message:

Improve comment in slab.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/slab.c

    r9f16cb0 r7669bcf  
    4949 *
    5050 * When a new object is being allocated, it is first checked, if it is
    51  * available in CPU-bound magazine. If it is not found there, it is
    52  * allocated from CPU-shared slab - if partial full is found, it is used,
    53  * otherwise a new one is allocated.
    54  *
    55  * When an object is being deallocated, it is put to CPU-bound magazine.
    56  * If there is no such magazine, new one is allocated (if it fails,
     51 * available in a CPU-bound magazine. If it is not found there, it is
     52 * allocated from a CPU-shared slab - if a partially full one is found,
     53 * it is used, otherwise a new one is allocated.
     54 *
     55 * When an object is being deallocated, it is put to a CPU-bound magazine.
     56 * If there is no such magazine, a new one is allocated (if this fails,
    5757 * the object is deallocated into slab). If the magazine is full, it is
    58  * put into cpu-shared list of magazines and new one is allocated.
    59  *
    60  * The CPU-bound magazine is actually a pair of magazine to avoid
     58 * put into cpu-shared list of magazines and a new one is allocated.
     59 *
     60 * The CPU-bound magazine is actually a pair of magazines in order to avoid
    6161 * thrashing when somebody is allocating/deallocating 1 item at the magazine
    6262 * size boundary. LIFO order is enforced, which should avoid fragmentation
    6363 * as much as possible.
    6464 * 
    65  * Every cache contains list of full slabs and list of partialy full slabs.
     65 * Every cache contains list of full slabs and list of partially full slabs.
    6666 * Empty slabs are immediately freed (thrashing will be avoided because
    6767 * of magazines).
     
    7272 * (the slab allocator uses itself for allocating all it's control structures).
    7373 *
    74  * The slab allocator allocates lot of space and does not free it. When
    75  * frame allocator fails to allocate the frame, it calls slab_reclaim().
     74 * The slab allocator allocates a lot of space and does not free it. When
     75 * the frame allocator fails to allocate a frame, it calls slab_reclaim().
    7676 * It tries 'light reclaim' first, then brutal reclaim. The light reclaim
    7777 * releases slabs from cpu-shared magazine-list, until at least 1 slab
Note: See TracChangeset for help on using the changeset viewer.