Changeset 18 for trunk/kernel/mm/page.c
- Timestamp:
- Jun 3, 2017, 4:42:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/page.c
r7 r18 89 89 // set dirty flag in page descriptor 90 90 page_set_flag( page , PG_DIRTY ); 91 91 92 92 // register page in PPM dirty list 93 93 list_add_first( &ppm->dirty_root , &page->list ); … … 97 97 // unlock the PPM dirty_list 98 98 spinlock_unlock( &ppm->dirty_lock ); 99 99 100 100 return done; 101 101 } … … 128 128 129 129 ///////////////////// 130 void sync_all_pages() 130 void sync_all_pages() 131 131 { 132 132 page_t * page; … … 138 138 spinlock_lock( &ppm->dirty_lock ); 139 139 140 while( !list_is_empty( &ppm->dirty_root ) ) 140 while( !list_is_empty( &ppm->dirty_root ) ) 141 141 { 142 142 page = LIST_FIRST( &ppm->dirty_root , page_t , list ); … … 147 147 mapper = page->mapper; 148 148 index = page->index; 149 149 150 150 // lock the page 151 151 page_lock( page ); … … 203 203 // take the spinlock protecting the PG_LOCKED flag 204 204 spinlock_lock( &page->lock ); 205 205 206 206 // check the page waiting list 207 207 bool_t is_empty = xlist_is_empty( XPTR( local_cxy , &page->wait_root ) ); … … 210 210 { 211 211 // get an extended pointer on the first waiting thread 212 xptr_t root_xp = XPTR( local_cxy , &page->wait_root ); 212 xptr_t root_xp = XPTR( local_cxy , &page->wait_root ); 213 213 xptr_t thread_xp = XLIST_FIRST_ELEMENT( root_xp , thread_t , wait_list ); 214 214 … … 244 244 void * src_base; 245 245 void * dst_base; 246 246 247 247 if( dst->order != src->order ) 248 248 { … … 272 272 // size , (uint32_t)base , (uint32_t)(&LOCAL_CLUSTER->kcm_tbl[0] ) ); 273 273 274 memset( base , 0 , size ); 274 memset( base , 0 , size ); 275 275 276 276 // kmem_print_kcm_table(); … … 282 282 { 283 283 printk("*** Page %d : base = %x / flags = %x / order = %d / count = %d\n", 284 page->index, 284 page->index, 285 285 ppm_page2base( page ), 286 page->flags, 287 page->order, 286 page->flags, 287 page->order, 288 288 page->refcount ); 289 289 }
Note: See TracChangeset
for help on using the changeset viewer.