struct page_operations file_ops
의 멤버변수로, 각 페이지의 initializer에 대한 operation으로 등록되어있음수정할 곳 : vm_anon_init
, anon_initializer
, anon_swap_in
, anon_swap_out
in vm/anon.c
vm_anon_init
void vm_anon_init (void);
→ swap_table
⇒ bitmap
사용
/* From the outside, a bitmap is an array of bits. From the
inside, it's an array of elem_type (defined above) that
simulates an array of bits. */
struct bitmap {
size_t bit_cnt; /* Number of bits. */
elem_type *bits; /* Elements that represent bits. */
};
anon_initializer
bool anon_initializer (struct page *page, enum vm_type type, void *kva);
꿀팁 → anon_swap_out
을 먼저 구현하셈