- Timestamp:
- Jul 1, 2019, 9:34:16 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/list.h
r635 r636 3 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 * Alain Greiner (2016,2017,2018 i,2019)5 * Alain Greiner (2016,2017,2018,2019) 6 6 * 7 7 * Copyright (c) UPMC Sorbonne Universites … … 314 314 * item(s) from the traversed list. 315 315 *************************************************************************** 316 * @ cxy : remote cluster identifier 317 * @ root : pointer on the root list_entry 318 * @ iter : pointer on the current list_entry 319 **************************************************************************/ 320 321 #define LIST_REMOTE_FOREACH( cxy , root , iter ) \322 for( (iter) = hal_remote_lpt( XPTR( cxy, &(root)->next ) ) ; \323 (iter) != (root) ; \324 (iter) = hal_remote_lpt( XPTR( cxy, &(iter)->next ) ) )316 * @ cxy : remote cluster identifier. 317 * @ root : pointer on the root list_entry. 318 * @ iter : pointer on the current list_entry. 319 **************************************************************************/ 320 321 #define LIST_REMOTE_FOREACH( cxy , root , iter ) \ 322 for( (iter) = hal_remote_lpt( XPTR( (cxy) , &(root)->next ) ) ; \ 323 (iter) != (root) ; \ 324 (iter) = hal_remote_lpt( XPTR( (cxy) , &(iter)->next ) ) ) 325 325 326 /*************************************************************************** 327 * This macro can be used by a thread running in any cluster to access 328 * a remote local list. It traverse the list in backward order. 329 * WARNING : same as the forward traversal 330 *************************************************************************** 331 * @ cxy : remote cluster identifier. 332 * @ root : pointer on the root list_entry. 333 * @ iter : pointer on the current list_entry. 334 **************************************************************************/ 335 336 #define LIST_REMOTE_FOREACH_BACKWARD( cxy , root , iter ) \ 337 for( (iter) = hal_remote_lpt( XPTR( (cxy) , &(root)->pred ) ) ; \ 338 (iter) != (root) ; \ 339 (iter) = hal_remote_lpt( XPTR( (cxy) , &(iter)->pred ) ) ) 340 326 341 /*************************************************************************** 327 342 * This function can be called by a thread running in any cluster to access … … 350 365 list_entry_t * entry ) 351 366 { 352 list_entry_t * first; // local pointer on current first entry 353 list_entry_t * next; // local pointer on current first->next entry 354 355 first = hal_remote_lpt( XPTR( cxy , &root->next ) ); 356 next = hal_remote_lpt( XPTR( cxy , &first->next ) ); 367 list_entry_t * next = hal_remote_lpt( XPTR( cxy , &root->next ) ); 357 368 358 hal_remote_spt( XPTR( cxy , &entry->next ) , first );369 hal_remote_spt( XPTR( cxy , &entry->next ) , next ); 359 370 hal_remote_spt( XPTR( cxy , &entry->pred ) , root ); 360 371 … … 375 386 list_entry_t * entry ) 376 387 { 377 list_entry_t * last; // local pointer on current last entry 378 list_entry_t * pred; // local pointer on current last->pred entry 379 380 last = hal_remote_lpt( XPTR( cxy , &root->pred ) ); 381 pred = hal_remote_lpt( XPTR( cxy , &last->pred ) ); 388 list_entry_t * pred = hal_remote_lpt( XPTR( cxy , &root->pred ) ); 382 389 383 390 hal_remote_spt( XPTR( cxy , &entry->next ) , root ); … … 409 416 410 417 411 412 418 #endif /* _LIST_H_ */ -
trunk/kernel/libk/xlist.h
r610 r636 1 1 /* 2 // check calling thread can yield3 thread_assert_can_yield( this , __FUNCTION__ );4 5 2 * xlist.h - Double Circular Linked lists, using extended pointers. 6 3 * 7 * Author : Alain Greiner (2016,2017,2018 )4 * Author : Alain Greiner (2016,2017,2018,2019) 8 5 * 9 6 * Copyright (c) UPMC Sorbonne Universites -
trunk/kernel/mm/ppm.c
r635 r636 1 1 /* 2 * ppm.c - Per-clusterPhysical Pages Manager implementation2 * ppm.c - Physical Pages Manager implementation 3 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) … … 149 149 void ppm_free_pages_nolock( page_t * page ) 150 150 { 151 page_t * buddy; // searched buddy blockpage descriptor152 uint32_t buddy_index; // buddy blocindex in page_tbl[]153 page_t * current; // current (merged) blockpage descriptor154 uint32_t current_index; // current (merged) blockindex in page_tbl[]155 uint32_t current_order; // current (merged) blockorder151 page_t * buddy; // searched buddy page descriptor 152 uint32_t buddy_index; // buddy page index in page_tbl[] 153 page_t * current; // current (merged) page descriptor 154 uint32_t current_index; // current (merged) page index in page_tbl[] 155 uint32_t current_order; // current (merged) page order 156 156 157 157 ppm_t * ppm = &LOCAL_CLUSTER->ppm; … … 159 159 160 160 assert( !page_is_flag( page , PG_FREE ) , 161 "page already released : ppn = %x\n" , ppm_page2ppn( XPTR(local_cxy,page)) );161 "page already released : ppn = %x\n" , ppm_page2ppn( XPTR( local_cxy , page ) ) ); 162 162 163 163 assert( !page_is_flag( page , PG_RESERVED ) , 164 "reserved page : ppn = %x\n" , ppm_page2ppn( XPTR(local_cxy,page)) );165 166 // update released page descriptor flags164 "reserved page : ppn = %x\n" , ppm_page2ppn( XPTR( local_cxy , page ) ) ); 165 166 // set FREE flag in released page descriptor 167 167 page_set_flag( page , PG_FREE ); 168 168 169 // initialise loop variables 170 current = page; 171 current_order = page->order; 172 current_index = page - ppm->pages_tbl; 173 169 174 // search the buddy page descriptor 170 // - merge with current page descriptor if found 171 // - exit to release the current page descriptor if not found 172 current = page; 173 current_index = (uint32_t)(page - ppm->pages_tbl); 174 for( current_order = page->order ; 175 current_order < CONFIG_PPM_MAX_ORDER ; 176 current_order++ ) 177 { 175 // - merge with current page if buddy found 176 // - exit to release the current page when buddy not found 177 while( current_order < CONFIG_PPM_MAX_ORDER ) 178 { 179 // compute buddy page index and page descriptor 178 180 buddy_index = current_index ^ (1 << current_order); 179 181 buddy = pages_tbl + buddy_index; 180 181 // exit this loop if buddy block not found 182 if( !page_is_flag( buddy , PG_FREE ) || 183 (buddy->order != current_order) ) break; 184 185 // remove buddy block from free_list 182 183 // exit loop if buddy not found in current free list 184 if( !page_is_flag( buddy , PG_FREE ) || (buddy->order != current_order) ) break; 185 186 // remove buddy page from current free_list 186 187 list_unlink( &buddy->list ); 187 188 ppm->free_pages_nr[current_order] --; 188 189 189 // reset order field in buddy blockpage descriptor190 // reset order field in buddy page descriptor 190 191 buddy->order = 0; 191 192 192 // compute merged blockindex in page_tbl[]193 // compute next (merged) page index in page_tbl[] 193 194 current_index &= buddy_index; 194 } 195 196 // update pointer and order field for merged block page descriptor 197 current = pages_tbl + current_index; 195 196 // compute next (merged) page order 197 current_order++; 198 199 // compute next (merged) page descripror 200 current = pages_tbl + current_index; 201 } 202 203 // update order field for merged page descriptor 198 204 current->order = current_order; 199 205 200 // insert merged block infree list206 // insert merged page in relevant free list 201 207 list_add_first( &ppm->free_pages_root[current_order] , ¤t->list ); 202 208 ppm->free_pages_nr[current_order] ++; 203 209 204 210 } // end ppm_free_pages_nolock() 211 205 212 206 213 //////////////////////////////////////////// … … 216 223 #if DEBUG_PPM_ALLOC_PAGES 217 224 uint32_t cycle = (uint32_t)hal_get_cycles(); 225 #endif 226 227 #if (DEBUG_PPM_ALLOC_PAGES & 1) 218 228 if( DEBUG_PPM_ALLOC_PAGES < cycle ) 219 printk("\n[%s] thread[%x,%x] enter for %d page(s) in cluster %x / cycle %d\n", 220 __FUNCTION__, this->process->pid, this->trdid, 1<<order, local_cxy, cycle ); 221 #endif 222 223 #if(DEBUG_PPM_ALLOC_PAGES & 0x1) 224 if( DEBUG_PPM_ALLOC_PAGES < cycle ) 225 ppm_remote_display( local_cxy ); 229 { 230 printk("\n[%s] thread[%x,%x] enter for %d page(s) in cluster %x / cycle %d\n", 231 __FUNCTION__, this->process->pid, this->trdid, 1<<order, local_cxy, cycle ); 232 ppm_remote_display( local_cxy ); 233 } 226 234 #endif 227 235 … … 309 317 310 318 #if DEBUG_PPM_ALLOC_PAGES 311 cycle = (uint32_t)hal_get_cycles();312 319 if( DEBUG_PPM_ALLOC_PAGES < cycle ) 313 printk("\n[%s] thread[%x,%x] exit for %d page(s) in cluster %x / ppn = %x / cycle %d\n", 314 __FUNCTION__, this->process->pid, this->trdid, 315 1<<order, local_cxy, ppm_page2ppn(XPTR( local_cxy , found_block )), cycle ); 316 #endif 317 318 #if(DEBUG_PPM_ALLOC_PAGES & 0x1) 319 if( DEBUG_PPM_ALLOC_PAGES < cycle ) 320 ppm_remote_display( local_cxy ); 320 { 321 printk("\n[%s] thread[%x,%x] allocated %d page(s) in cluster %x / ppn %x / cycle %d\n", 322 __FUNCTION__, this->process->pid, this->trdid, 323 1<<order, local_cxy, ppm_page2ppn(XPTR( local_cxy , found_block )), cycle ); 324 ppm_remote_display( local_cxy ); 325 } 321 326 #endif 322 327 … … 324 329 325 330 } // end ppm_alloc_pages() 326 327 331 328 332 //////////////////////////////////// … … 334 338 thread_t * this = CURRENT_THREAD; 335 339 uint32_t cycle = (uint32_t)hal_get_cycles(); 340 #endif 341 342 #if ( DEBUG_PPM_FREE_PAGES & 1 ) 336 343 if( DEBUG_PPM_FREE_PAGES < cycle ) 337 printk("\n[%s] thread[%x,%x] enter for %d page(s) in cluster %x / ppn %x / cycle %d\n", 338 __FUNCTION__, this->process->pid, this->trdid, 339 1<<page->order, local_cxy, ppm_page2ppn(XPTR(local_cxy , page)), cycle ); 340 #endif 341 342 #if(DEBUG_PPM_FREE_PAGES & 0x1) 343 if( DEBUG_PPM_FREE_PAGES < cycle ) 344 ppm_remote_display( local_cxy ); 344 { 345 printk("\n[%s] thread[%x,%x] enter for %d page(s) in cluster %x / ppn %x / cycle %d\n", 346 __FUNCTION__, this->process->pid, this->trdid, 347 1<<page->order, local_cxy, ppm_page2ppn(XPTR(local_cxy , page)), cycle ); 348 ppm_remote_display( local_cxy ); 345 349 #endif 346 350 … … 360 364 361 365 #if DEBUG_PPM_FREE_PAGES 362 cycle = (uint32_t)hal_get_cycles();363 366 if( DEBUG_PPM_FREE_PAGES < cycle ) 364 printk("\n[%s] thread[%x,%x] exit for %d page(s) in cluster %x / ppn %x / cycle %d\n", 365 __FUNCTION__, this->process->pid, this->trdid, 366 1<<page->order, local_cxy, ppm_page2ppn(XPTR(local_cxy , page)) , cycle ); 367 #endif 368 369 #if(DEBUG_PPM_FREE_PAGES & 0x1) 370 if( DEBUG_PPM_FREE_PAGES < cycle ) 371 ppm_remote_display( local_cxy ); 367 { 368 printk("\n[%s] thread[%x,%x] released %d page(s) in cluster %x / ppn %x / cycle %d\n", 369 __FUNCTION__, this->process->pid, this->trdid, 370 1<<page->order, local_cxy, ppm_page2ppn(XPTR(local_cxy , page)) , cycle ); 371 ppm_remote_display( local_cxy ); 372 } 372 373 #endif 373 374 374 375 } // end ppm_free_pages() 376 377 378 375 379 376 380 ///////////////////////////////////////////// … … 387 391 #if DEBUG_PPM_REMOTE_ALLOC_PAGES 388 392 uint32_t cycle = (uint32_t)hal_get_cycles(); 393 #endif 394 395 #if ( DEBUG_PPM_REMOTE_ALLOC_PAGES & 1 ) 389 396 if( DEBUG_PPM_REMOTE_ALLOC_PAGES < cycle ) 390 printk("\n[%s] thread[%x,%x] enter for %d small page(s) in cluster %x / cycle %d\n", 391 __FUNCTION__, this->process->pid, this->trdid, 1<<order, cxy, cycle ); 392 #endif 393 394 #if(DEBUG_PPM_REMOTE_ALLOC_PAGES & 0x1) 395 if( DEBUG_PPM_REMOTE_ALLOC_PAGES < cycle ) 396 ppm_remote_display( cxy ); 397 { 398 printk("\n[%s] thread[%x,%x] enter for %d small page(s) in cluster %x / cycle %d\n", 399 __FUNCTION__, this->process->pid, this->trdid, 1<<order, cxy, cycle ); 400 ppm_remote_display( cxy ); 401 } 397 402 #endif 398 403 … … 485 490 486 491 #if DEBUG_PPM_REMOTE_ALLOC_PAGES 487 cycle = (uint32_t)hal_get_cycles();488 492 if( DEBUG_PPM_REMOTE_ALLOC_PAGES < cycle ) 489 printk("\n[%s] thread[%x,%x] exit for %d page(s) / ppn = %x in cluster %x / cycle %d\n", 490 __FUNCTION__, this->process->pid, this->trdid, 491 1<<order, ppm_page2ppn(XPTR( local_cxy , found_block )), cxy, cycle ); 492 #endif 493 494 #if(DEBUG_PPM_REMOTE_ALLOC_PAGES & 0x1) 495 if( DEBUG_PPM_REMOTE_ALLOC_PAGES < cycle ) 496 ppm_remote_display( cxy ); 493 { 494 printk("\n[%s] thread[%x,%x] allocated %d page(s) in cluster %x / ppn %x / cycle %d\n", 495 __FUNCTION__, this->process->pid, this->trdid, 496 1<<order, cxy, ppm_page2ppn(XPTR( cxy , found_block )), cycle ); 497 ppm_remote_display( cxy ); 498 } 497 499 #endif 498 500 … … 501 503 } // end ppm_remote_alloc_pages() 502 504 503 ////////////////////////////////////////// 504 void ppm_remote_free_pages( cxy_t cxy,505 page_t * page )505 /////////////////////////////////////////////// 506 void ppm_remote_free_pages( cxy_t page_cxy, 507 page_t * page_ptr ) 506 508 { 507 509 xptr_t page_xp; // extended pointer on released page descriptor 508 uint32_t order; // released block order 509 page_t * buddy_ptr; // searched buddy block page descriptor 510 uint32_t buddy_order; // searched buddy block order 511 uint32_t buddy_index; // buddy block index in page_tbl[] 512 page_t * current_ptr; // current (merged) block page descriptor 513 uint32_t current_index; // current (merged) block index in page_tbl[] 514 uint32_t current_order; // current (merged) block order 510 page_t * buddy_ptr; // searched buddy page descriptor 511 uint32_t buddy_order; // searched buddy page order 512 uint32_t buddy_index; // buddy page index in page_tbl[] 513 page_t * current_ptr; // current (merged) page descriptor 514 uint32_t current_index; // current (merged) page index in page_tbl[] 515 uint32_t current_order; // current (merged) page order 515 516 516 517 #if DEBUG_PPM_REMOTE_FREE_PAGES 517 518 thread_t * this = CURRENT_THREAD; 518 519 uint32_t cycle = (uint32_t)hal_get_cycles(); 520 #endif 521 522 #if ( DEBUG_PPM_REMOTE_FREE_PAGES & 1 ) 519 523 if( DEBUG_PPM_REMOTE_FREE_PAGES < cycle ) 520 printk("\n[%s] thread[%x,%x] enter for %d page(s) / cxy %x / ppn %x / cycle %d\n", 521 __FUNCTION__, this->process->pid, this->trdid, 522 1<<page->order, cxy, ppm_page2ppn(XPTR(cxy , page)), cycle ); 523 #endif 524 525 #if(DEBUG_PPM_REMOTE_FREE_PAGES & 0x1) 526 if( DEBUG_PPM_REMOTE_FREE_PAGES < cycle ) 527 ppm_remote_display( cxy ); 524 { 525 printk("\n[%s] thread[%x,%x] enter for %d page(s) in cluster %x / ppn %x / cycle %d\n", 526 __FUNCTION__, this->process->pid, this->trdid, 527 1<<page_ptr->order, page_cxy, ppm_page2ppn(XPTR( page_cxy , page_ptr )), cycle ); 528 ppm_remote_display( page_cxy ); 529 } 528 530 #endif 529 531 530 532 // build extended pointer on released page descriptor 531 page_xp = XPTR( cxy , page);533 page_xp = XPTR( page_cxy , page_ptr ); 532 534 533 // get released page order534 order = hal_remote_l32( XPTR( cxy , &page->order ) );535 535 536 536 // get local pointer on PPM (same in all clusters) … … 538 538 539 539 // build extended pointer on lock protecting remote PPM 540 xptr_t lock_xp = XPTR( cxy , &ppm->free_lock );540 xptr_t lock_xp = XPTR( page_cxy , &ppm->free_lock ); 541 541 542 542 // get local pointer on remote PPM page_tbl[] array 543 page_t * pages_tbl = hal_remote_lpt( XPTR( cxy , &ppm->pages_tbl ) );543 page_t * pages_tbl = hal_remote_lpt( XPTR( page_cxy , &ppm->pages_tbl ) ); 544 544 545 545 // get lock protecting free_pages in remote cluster … … 547 547 548 548 assert( !page_remote_is_flag( page_xp , PG_FREE ) , 549 "page already released : ppn = %x\n" , ppm_page2ppn(XPTR( local_cxy,page)) );549 "page already released : ppn = %x\n" , ppm_page2ppn(XPTR( page_cxy , page_ptr ) ) ); 550 550 551 551 assert( !page_remote_is_flag( page_xp , PG_RESERVED ) , 552 "reserved page : ppn = %x\n" , ppm_page2ppn(XPTR( local_cxy,page)) );553 554 // update released page descriptor flags552 "reserved page : ppn = %x\n" , ppm_page2ppn(XPTR( page_cxy , page_ptr ) ) ); 553 554 // set the FREE flag in released page descriptor 555 555 page_remote_set_flag( page_xp , PG_FREE ); 556 556 557 // initialise loop variables 558 current_ptr = page_ptr; 559 current_order = hal_remote_l32( XPTR( page_cxy , &page_ptr->order ) ); 560 current_index = page_ptr - ppm->pages_tbl; 561 557 562 // search the buddy page descriptor 558 // - merge with current page descriptor if found 559 // - exit to release the current page descriptor if not found 560 current_ptr = page; 561 current_index = (uint32_t)(page - ppm->pages_tbl); 562 for( current_order = order ; 563 current_order < CONFIG_PPM_MAX_ORDER ; 564 current_order++ ) 565 { 563 // - merge with current page descriptor if buddy found 564 // - exit to release the current page descriptor if buddy not found 565 while( current_order < CONFIG_PPM_MAX_ORDER ) 566 { 567 // compute buddy page index and local pointer on page descriptor 566 568 buddy_index = current_index ^ (1 << current_order); 567 569 buddy_ptr = pages_tbl + buddy_index; 568 569 // get buddy block order 570 buddy_order = hal_remote_l32( XPTR( cxy , &buddy_ptr->order ) ); 571 572 // exit loop if buddy block not found 573 if( !page_remote_is_flag( XPTR( cxy , buddy_ptr ) , PG_FREE ) || 570 571 // exit loop if buddy not found 572 if( !page_remote_is_flag( XPTR( page_cxy , buddy_ptr ) , PG_FREE ) || 574 573 (buddy_order != current_order) ) break; 575 574 576 // remove buddy fromfree list in remote cluster577 list_remote_unlink( cxy , &buddy_ptr->list );578 hal_remote_atomic_add( XPTR( cxy , &ppm->free_pages_nr[current_order] ) , -1 );579 580 // reset order field in buddy blockpage descriptor581 hal_remote_s32( XPTR( cxy , &buddy_ptr->order ) , 0 );582 583 // compute merged block index in page_tbl[] array575 // remove buddy page from its free list in remote cluster 576 list_remote_unlink( page_cxy , &buddy_ptr->list ); 577 hal_remote_atomic_add( XPTR( page_cxy , &ppm->free_pages_nr[current_order] ) , -1 ); 578 579 // reset order field in buddy page descriptor 580 hal_remote_s32( XPTR( page_cxy , &buddy_ptr->order ) , 0 ); 581 582 // compute next (merged) page index in page_tbl[] 584 583 current_index &= buddy_index; 585 } 586 587 // update merged page descriptor order field 584 585 // compute next (merged) page order 586 current_order++; 587 588 // compute next (merged) page descripror 589 current_ptr = pages_tbl + current_index; 590 591 } // end loop on order 592 593 // update current (merged) page descriptor order field 588 594 current_ptr = pages_tbl + current_index; 589 hal_remote_s32( XPTR( cxy , ¤t_ptr->order ) , current_order );590 591 // insert merged block into relevant free list in remote cluster592 list_remote_add_first( cxy , &ppm->free_pages_root[current_order] , ¤t_ptr->list );593 hal_remote_atomic_add( XPTR( cxy , &ppm->free_pages_nr[current_order] ) , 1 );595 hal_remote_s32( XPTR( page_cxy , ¤t_ptr->order ) , current_order ); 596 597 // insert current (merged) page into relevant free list 598 list_remote_add_first( page_cxy , &ppm->free_pages_root[current_order] , ¤t_ptr->list ); 599 hal_remote_atomic_add( XPTR( page_cxy , &ppm->free_pages_nr[current_order] ) , 1 ); 594 600 595 601 // release lock protecting free_pages[] array … … 597 603 598 604 // update DQDT 599 dqdt_decrement_pages( cxy , page->order );605 dqdt_decrement_pages( page_cxy , page_ptr->order ); 600 606 601 607 #if DEBUG_PPM_REMOTE_FREE_PAGES 602 cycle = (uint32_t)hal_get_cycles();603 608 if( DEBUG_PPM_REMOTE_FREE_PAGES < cycle ) 604 printk("\n[%s] thread[%x,%x] exit for %d page(s) in cluster %x / ppn %x / cycle %d\n", 605 __FUNCTION__, this->process->pid, this->trdid, 606 1<<page->order, cxy, ppm_page2ppn(XPTR(cxy , page)), cycle ); 607 #endif 608 609 #if(DEBUG_PPM_REMOTE_FREE_PAGES & 0x1) 610 if( DEBUG_PPM_REMOTE_FREE_PAGES < cycle ) 611 ppm_remote_display( cxy ); 609 { 610 printk("\n[%s] thread[%x,%x] released %d page(s) in cluster %x / ppn %x / cycle %d\n", 611 __FUNCTION__, this->process->pid, this->trdid, 612 1<<page_ptr->order, page_cxy, ppm_page2ppn(XPTR( page_cxy , page_ptr ) ), cycle ); 613 ppm_remote_display( page_cxy ); 614 } 612 615 #endif 613 616 … … 622 625 623 626 ppm_t * ppm = &LOCAL_CLUSTER->ppm; 627 628 // get remote PPM general parameters 629 uint32_t pages_nr = hal_remote_l32( XPTR( cxy , &ppm->pages_nr ) ); 630 void * vaddr_base = hal_remote_lpt( XPTR( cxy , &ppm->vaddr_base ) ); 631 void * pages_tbl = hal_remote_lpt( XPTR( cxy , &ppm->pages_tbl ) ); 624 632 625 633 // build extended pointer on lock protecting remote PPM … … 640 648 remote_busylock_acquire( txt_lock_xp ); 641 649 642 nolock_printk("\n***** PPM in cluster %x / %d pages\n", local_cxy , ppm->pages_nr ); 650 nolock_printk("\n***** PPM in cluster %x / %d pages / page_tbl %x / vaddr_base %x\n", 651 local_cxy, pages_nr, pages_tbl, vaddr_base ); 643 652 644 653 for( order = 0 ; order < CONFIG_PPM_MAX_ORDER ; order++ ) … … 647 656 uint32_t n = hal_remote_l32( XPTR( cxy , &ppm->free_pages_nr[order] ) ); 648 657 649 nolock_printk("- order = %d / n = %d\t: ", order , n ); 650 658 // display direct free_list[order] 659 nolock_printk("- forward : order = %d / n = %d\t: ", order , n ); 651 660 LIST_REMOTE_FOREACH( cxy , &ppm->free_pages_root[order] , iter ) 652 661 { 653 // build extended pointer on page descriptor654 662 page_xp = XPTR( cxy , LIST_ELEMENT( iter , page_t , list ) ); 655 656 // display PPN657 663 nolock_printk("%x," , ppm_page2ppn( page_xp ) ); 658 664 } 659 660 665 nolock_printk("\n"); 661 666 } -
trunk/params-hard.mk
r635 r636 2 2 3 3 ARCH = /Users/alain/soc/tsar-trunk-svn-2013/platforms/tsar_generic_iob 4 X_SIZE = 24 X_SIZE = 1 5 5 Y_SIZE = 2 6 NB_PROCS = 26 NB_PROCS = 4 7 7 NB_TTYS = 2 8 8 IOC_TYPE = IOC_BDV -
trunk/user/fft/fft.c
r635 r636 87 87 // parameters 88 88 89 #define DEFAULT_M 8 // 256 data points89 #define DEFAULT_M 12 // 4096 data points 90 90 #define USE_DQT_BARRIER 0 // use DDT barrier if non zero 91 91 #define MODE COSIN // DATA array initialisation mode … … 471 471 // build file name 472 472 if( USE_DQT_BARRIER ) 473 snprintf( name , 64 , "fft_dqt_%d_%d_%d _%d", x_size , y_size , ncores , N);473 snprintf( name , 64 , "fft_dqt_%d_%d_%d", N , x_size * y_size , ncores ); 474 474 else 475 snprintf( name , 64 , "fft_smp_%d_%d_%d _%d", x_size , y_size , ncores , N);475 snprintf( name , 64 , "fft_smp_%d_%d_%d", N , x_size * y_size , ncores ); 476 476 477 477 // build pathname -
trunk/user/ksh/ksh.c
r635 r636 6 6 // This application implements a minimal shell for ALMOS-MKH. 7 7 // 8 // This user KSHprocess contains two POSIX threads:8 // This user process contains two POSIX threads: 9 9 // - the "main" thread contains the infinite loop implementing 10 10 // the children processes termination monitoring, using the wait() syscall. … … 1186 1186 char cmd[CMD_MAX_SIZE]; // buffer for one command 1187 1187 1188 / *1. first direct command1188 // 1. first direct command 1189 1189 if( sem_wait( &semaphore ) ) 1190 1190 { … … 1199 1199 strcpy( cmd , "load bin/user/sort.elf" ); 1200 1200 execute( cmd ); 1201 */1202 1203 1204 1205 / *2. second direct command1201 // 1202 1203 1204 1205 // 2. second direct command 1206 1206 if( sem_wait( &semaphore ) ) 1207 1207 { … … 1216 1216 strcpy( cmd , "load bin/user/fft.elf" ); 1217 1217 execute( cmd ); 1218 */1218 // 1219 1219 1220 1220 -
trunk/user/sort/sort.c
r635 r636 54 54 #include <hal_macros.h> 55 55 56 #define ARRAY_LENGTH 128// number of items56 #define ARRAY_LENGTH 2048 // number of items 57 57 #define MAX_THREADS 1024 // 16 * 16 * 4 58 58
Note: See TracChangeset
for help on using the changeset viewer.