Библиотека сайта или "Мой Linux Documentation Project"
The book is available and called simply "Understanding The Linux Virtual Memory Manager". There is a lot of additional material in the book that is not available here, including details on later 2.4 kernels, introductions to 2.6, a whole new chapter on the shared memory filesystem, coverage of TLB management, a lot more code commentary, countless other additions and clarifications and a CD with lots of cool stuff on it. This material (although now dated and lacking in comparison to the book) will remain available although I obviously encourge you to buy the book from your favourite book store :-) . As the book is under the Bruce Perens Open Book Series, it will be available 90 days after appearing on the book shelves which means it is not available right now. When it is available, it will be downloadable from http://www.phptr.com/perens so check there for more information.
To be fully clear, this webpage is not the actual book.
Next: 7.5 Avoiding Fragmentation Up: 7. Physical Page Allocation Previous: 7.3 Free Pages   Contents   Index
A persistent concept through the whole VM is the Get Free Page
(GFP) flags. These flags determine how the allocator and kswapd
will behave for the allocation and freeing of pages. For example, an interrupt
handler may not sleep so it will not have the
flag set as this flag indicates the caller may sleep. There are three sets
of GFP flags, all defined in
The first of the three is the set of zone modifiers listed in Table 7.3. These flags indicate that the caller must try to allocate
from a particular zone. The reader will note there is not a zone modifier
ZONE_ NORMAL. This is because the zone modifier flag is used as an
offset within an array and 0 implicitly means allocate from
The next flags are action modifiers listed in Table 7.4. They change the behavior of the VM and what the calling process
may do. The low level flags on their own are too primitive to be easily
used. It is difficult to know what the correct combinations are for each
instance so a few high level combinations are defined and listed in Table
7.5. For clarity the
is removed from the table combinations so, the
flag will read as
HIGH below. The combinations to form the high
level flags are listed in Table 7.6
To help understand this, take
GFP_ATOMIC as an example. It has
__GFP_HIGH flag set. This means it is high priority,
will use emergency pools (if they exist) but will not sleep, perform IO
or access the filesystem. This flag would be used by an interrupt handler
A process may also set flags in the
task_struct which affects
allocator behavior. The full list of process flags are defined in
linux/sched.h but only the ones affecting VM behavior
are listed in Table 7.7.
Next: 7.5 Avoiding Fragmentation Up: 7. Physical Page Allocation Previous: 7.3 Free Pages   Contents   Index Mel 2004-02-15
Только зарегистрированные пользователи могут оценивать и комментировать статьи.