linux-5.15/kswapd_shrink_node()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#f4a6bee4]
#backlinks
*説明 [#u29d8568]
-パス: [[linux-5.15/mm/vmscan.c]]
-FIXME: これは何?
--説明
**引数 [#h1375883]
-pg_data_t *pgdat
--メモリノード。
--[[linux-5.15/pg_data_t]]
-struct scan_control *sc
--
--[[linux-5.15/scan_control]]
**返り値 [#udd2c8c2]
-bool
--
**参考 [#zc6f4078]
*実装 [#v7e3840d]
/*
* kswapd shrinks a node of pages that are at or below t...
* zone that is currently unbalanced.
*
* Returns true if kswapd scanned at least the requested...
* reclaim or if the lack of progress was due to pages u...
* This is used to determine if the scanning priority ne...
*/
static bool kswapd_shrink_node(pg_data_t *pgdat,
struct scan_control *sc)
{
struct zone *zone;
int z;
/* Reclaim a number of pages proportional to the number...
sc->nr_to_reclaim = 0;
for (z = 0; z <= sc->reclaim_idx; z++) {
zone = pgdat->node_zones + z;
if (!managed_zone(zone))
continue;
sc->nr_to_reclaim += max(high_wmark_pages(zone), SWAP_...
}
-ページのあるゾーンは無視する。ゾーンのhigh watermarkか、...
-SWAP_CLUSTER_MAX = 32
--[[linux-5.15/managed_zone()]]
--[[linux-5.15/high_wmark_pages()]]
/*
* Historically care was taken to put equal pressure on...
* now pressure is applied based on node LRU order.
*/
shrink_node(pgdat, sc);
-
--[[linux-5.15/shrink_node()]]
/*
* Fragmentation may mean that the system cannot be reb...
* high-order allocations. If twice the allocation size...
* reclaimed then recheck watermarks only at order-0 to...
* excessive reclaim. Assume that a process requested a...
* can direct reclaim/compact.
*/
if (sc->order && sc->nr_reclaimed >= compact_gap(sc->or...
sc->order = 0;
return sc->nr_scanned >= sc->nr_to_reclaim;
}
-
--[[linux-5.15/compact_gap()]]
*コメント [#b1e317ab]
終了行:
*参照元 [#f4a6bee4]
#backlinks
*説明 [#u29d8568]
-パス: [[linux-5.15/mm/vmscan.c]]
-FIXME: これは何?
--説明
**引数 [#h1375883]
-pg_data_t *pgdat
--メモリノード。
--[[linux-5.15/pg_data_t]]
-struct scan_control *sc
--
--[[linux-5.15/scan_control]]
**返り値 [#udd2c8c2]
-bool
--
**参考 [#zc6f4078]
*実装 [#v7e3840d]
/*
* kswapd shrinks a node of pages that are at or below t...
* zone that is currently unbalanced.
*
* Returns true if kswapd scanned at least the requested...
* reclaim or if the lack of progress was due to pages u...
* This is used to determine if the scanning priority ne...
*/
static bool kswapd_shrink_node(pg_data_t *pgdat,
struct scan_control *sc)
{
struct zone *zone;
int z;
/* Reclaim a number of pages proportional to the number...
sc->nr_to_reclaim = 0;
for (z = 0; z <= sc->reclaim_idx; z++) {
zone = pgdat->node_zones + z;
if (!managed_zone(zone))
continue;
sc->nr_to_reclaim += max(high_wmark_pages(zone), SWAP_...
}
-ページのあるゾーンは無視する。ゾーンのhigh watermarkか、...
-SWAP_CLUSTER_MAX = 32
--[[linux-5.15/managed_zone()]]
--[[linux-5.15/high_wmark_pages()]]
/*
* Historically care was taken to put equal pressure on...
* now pressure is applied based on node LRU order.
*/
shrink_node(pgdat, sc);
-
--[[linux-5.15/shrink_node()]]
/*
* Fragmentation may mean that the system cannot be reb...
* high-order allocations. If twice the allocation size...
* reclaimed then recheck watermarks only at order-0 to...
* excessive reclaim. Assume that a process requested a...
* can direct reclaim/compact.
*/
if (sc->order && sc->nr_reclaimed >= compact_gap(sc->or...
sc->order = 0;
return sc->nr_scanned >= sc->nr_to_reclaim;
}
-
--[[linux-5.15/compact_gap()]]
*コメント [#b1e317ab]
ページ名: