diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2012-04-06 14:25:41 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-04-16 11:25:16 -0500 |
commit | 3cad095a5c2a1c6e70e56d5b7be773d148d86844 (patch) | |
tree | c72d11eecfd743aab0e7e6efd6dd4cf2dc02e0c5 /src/kernel/pagemgr.C | |
parent | d82aa02fa9b3fb5a5ca512241bc796ac8be3b9fd (diff) | |
download | talos-hostboot-3cad095a5c2a1c6e70e56d5b7be773d148d86844.tar.gz talos-hostboot-3cad095a5c2a1c6e70e56d5b7be773d148d86844.zip |
Code optimizations.
- Reduce DCBZ and ICBI calls in memory copy and init functions.
- Reduce strlen calls in trace.
- Set thread to low priority while waiting on in-kernel barrier.
Change-Id: Ic9c23b1e26797ff393e5862819830de60554747e
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/871
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/pagemgr.C')
-rw-r--r-- | src/kernel/pagemgr.C | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/pagemgr.C b/src/kernel/pagemgr.C index 858215ecf..83e99b9b3 100644 --- a/src/kernel/pagemgr.C +++ b/src/kernel/pagemgr.C @@ -83,7 +83,7 @@ PageManager::PageManager() : iv_pagesAvail(0), iv_pagesTotal(0) while (cache_line != end_cache_line) { dcbz(cache_line); - cache_line++; + cache_line += getCacheLineWords(); } // Allocate pages to buckets. @@ -206,7 +206,7 @@ void PageManager::_coalesce( void ) while(NULL != (p = pq.remove())) { // p needs to be the even buddy to prevent merging of wrong block. - // To determine this, get the index of the block as if the whole + // To determine this, get the index of the block as if the whole // page memory space were blocks of this size. uint64_t p_idx = (reinterpret_cast<uint64_t>(p) - firstPageAddr())/ ((1 << bucket)*PAGESIZE); @@ -220,7 +220,7 @@ void PageManager::_coalesce( void ) // match. The address of p also can't be greater than what's // in pq or something is really messed up, therefore if // pq.remove_if() returns something then it's a match. - page_t * p_seek = (page_t*)((uint64_t)p + + page_t * p_seek = (page_t*)((uint64_t)p + (1 << bucket)*PAGESIZE); page_t * p_next = pq.remove_if(p_seek); if(p_next == p_seek) |