Skip to content

Commit 48d9f33

Browse files
rppttorvalds
authored andcommitted
docs: remove description of DISCONTIGMEM
Remove description of DISCONTIGMEM from the "Memory Models" document and update VM sysctl description so that it won't mention DISCONIGMEM. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Matt Turner <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Vineet Gupta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d3c251a commit 48d9f33

File tree

2 files changed

+8
-49
lines changed

2 files changed

+8
-49
lines changed

Documentation/admin-guide/sysctl/vm.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -938,12 +938,12 @@ allocations, THP and hugetlbfs pages.
938938

939939
To make it sensible with respect to the watermark_scale_factor
940940
parameter, the unit is in fractions of 10,000. The default value of
941-
15,000 on !DISCONTIGMEM configurations means that up to 150% of the high
942-
watermark will be reclaimed in the event of a pageblock being mixed due
943-
to fragmentation. The level of reclaim is determined by the number of
944-
fragmentation events that occurred in the recent past. If this value is
945-
smaller than a pageblock then a pageblocks worth of pages will be reclaimed
946-
(e.g. 2MB on 64-bit x86). A boost factor of 0 will disable the feature.
941+
15,000 means that up to 150% of the high watermark will be reclaimed in the
942+
event of a pageblock being mixed due to fragmentation. The level of reclaim
943+
is determined by the number of fragmentation events that occurred in the
944+
recent past. If this value is smaller than a pageblock then a pageblocks
945+
worth of pages will be reclaimed (e.g. 2MB on 64-bit x86). A boost factor
946+
of 0 will disable the feature.
947947

948948

949949
watermark_scale_factor

Documentation/vm/memory-model.rst

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ for the CPU. Then there could be several contiguous ranges at
1414
completely distinct addresses. And, don't forget about NUMA, where
1515
different memory banks are attached to different CPUs.
1616

17-
Linux abstracts this diversity using one of the three memory models:
18-
FLATMEM, DISCONTIGMEM and SPARSEMEM. Each architecture defines what
17+
Linux abstracts this diversity using one of the two memory models:
18+
FLATMEM and SPARSEMEM. Each architecture defines what
1919
memory models it supports, what the default memory model is and
2020
whether it is possible to manually override that default.
2121

22-
.. note::
23-
At time of this writing, DISCONTIGMEM is considered deprecated,
24-
although it is still in use by several architectures.
25-
2622
All the memory models track the status of physical page frames using
2723
struct page arranged in one or more arrays.
2824

@@ -63,43 +59,6 @@ straightforward: `PFN - ARCH_PFN_OFFSET` is an index to the
6359
The `ARCH_PFN_OFFSET` defines the first page frame number for
6460
systems with physical memory starting at address different from 0.
6561

66-
DISCONTIGMEM
67-
============
68-
69-
The DISCONTIGMEM model treats the physical memory as a collection of
70-
`nodes` similarly to how Linux NUMA support does. For each node Linux
71-
constructs an independent memory management subsystem represented by
72-
`struct pglist_data` (or `pg_data_t` for short). Among other
73-
things, `pg_data_t` holds the `node_mem_map` array that maps
74-
physical pages belonging to that node. The `node_start_pfn` field of
75-
`pg_data_t` is the number of the first page frame belonging to that
76-
node.
77-
78-
The architecture setup code should call :c:func:`free_area_init_node` for
79-
each node in the system to initialize the `pg_data_t` object and its
80-
`node_mem_map`.
81-
82-
Every `node_mem_map` behaves exactly as FLATMEM's `mem_map` -
83-
every physical page frame in a node has a `struct page` entry in the
84-
`node_mem_map` array. When DISCONTIGMEM is enabled, a portion of the
85-
`flags` field of the `struct page` encodes the node number of the
86-
node hosting that page.
87-
88-
The conversion between a PFN and the `struct page` in the
89-
DISCONTIGMEM model became slightly more complex as it has to determine
90-
which node hosts the physical page and which `pg_data_t` object
91-
holds the `struct page`.
92-
93-
Architectures that support DISCONTIGMEM provide :c:func:`pfn_to_nid`
94-
to convert PFN to the node number. The opposite conversion helper
95-
:c:func:`page_to_nid` is generic as it uses the node number encoded in
96-
page->flags.
97-
98-
Once the node number is known, the PFN can be used to index
99-
appropriate `node_mem_map` array to access the `struct page` and
100-
the offset of the `struct page` from the `node_mem_map` plus
101-
`node_start_pfn` is the PFN of that page.
102-
10362
SPARSEMEM
10463
=========
10564

0 commit comments

Comments
 (0)