답변

2

그들은 하나 place의 모든 것 :

struct bdi_writeback { 
     struct backing_dev_info *bdi; /* our parent bdi */ 
     unsigned int nr; 

     unsigned long last_old_flush; /* last old data flush */ 
     unsigned long last_active;  /* last time bdi thread was active */ 

     struct task_struct *task;  /* writeback thread */ 
     struct timer_list wakeup_timer; /* used for delayed bdi thread wakeup */ 
     struct list_head b_dirty;  /* dirty inodes */ 
     struct list_head b_io;   /* parked for writeback */ 
     struct list_head b_more_io;  /* parked for more writeback */ 
     spinlock_t list_lock;   /* protects the b_* lists */ 
}; 

b_dirty 당신이 찾고있는 목록입니다.

플러싱이 발생하는 방법에 대한 정보는 in here을 참조하십시오. 코드는 다소 복잡합니다. (alot) 요약하면, 디스크에 기록 된 데이터는 a) 30 초 이상 경과하거나 dirty 페이지가 활성, 작동 중 10 % 이상을 소비 할 때까지 메모리에 저장됩니다 기억.

1

x86 플랫폼에서 운영 체제는 page table entries을 검사하여 더러운 페이지를 찾아야합니다. 특수한 것인데, dirty은 메모리 쓰기 중 CPU에 의해 자동으로 설정되는 비트입니다. dirty = 1에 대해 PTEs을 검색하는 코드가 있어야합니다.

관련 문제