#author("2025-09-10T18:14:41+09:00","default:guest","guest")
#author("2025-09-10T18:15:08+09:00","default:guest","guest")
*参照元 [#yd793ee0]
#backlinks

*説明 [#vda2337d]
-パス: [[linux-5.15/mm/compaction.c]]

-ノードの断片化スコアを取得します。
--全てのゾーンの断片化スコアの和 = ノードの断片化スコア。


**引数 [#q24e0e1e]
-pg_data_t *pgdat
--メモリノード。
--[[linux-5.15/pg_data_t]]


**返り値 [#gfb52f1b]
-unsigned int
--ノードの断片化スコア。


**参考 [#b50a0543]


*実装 [#lf8acb2f]

 /*
  * The per-node proactive (background) compaction process is started by its
  * corresponding kcompactd thread when the node's fragmentation score
  * exceeds the high threshold. The compaction process remains active till
  * the node's score falls below the low threshold, or one of the back-off
  * conditions is met.
  */
 static unsigned int fragmentation_score_node(pg_data_t *pgdat)
 {
 	unsigned int score = 0;
 	int zoneid;
 
 	for (zoneid = 0; zoneid < MAX_NR_ZONES; zoneid++) {
 		struct zone *zone;
 
 		zone = &pgdat->node_zones[zoneid];
 		score += fragmentation_score_zone_weighted(zone);
 	}
 
 	return score;
 }

-全てのゾーンの断片化スコアの和 = ノードの断片化スコア。
-全てのゾーンの断片化スコア(比重付き)の和 = ノードの断片化スコア。
--[[linux-5.15/fragmentation_score_zone_weighted()]]


*コメント [#zf5a516b]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS