diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-05-14 19:13:39 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-05-14 19:13:39 +0200 |
commit | 7a212bb24fc37482bff9f397fc97bb551ae5686a (patch) | |
tree | 6e08d8be9c432a155b3a00dea2efb9e16e1af26a | |
parent | d7788995c2d06f7864b2cfbf57289bf3f04c0821 (diff) | |
download | xmr-stak-7a212bb24fc37482bff9f397fc97bb551ae5686a.zip xmr-stak-7a212bb24fc37482bff9f397fc97bb551ae5686a.tar.gz |
overloead cache
- use one thread more if 1 MiB cache is available after removeing the multiple of 2MiB
- fix install documentation
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | autoAdjustHwloc.hpp | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -46,7 +46,7 @@ xXl2Nm/u3cPP/eQVrZz5H8eACwIv+LL1EV+9uLanWUa+IO5hHr3KElvKNKD6vN0= ### GNU Compiler ``` - sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential hwloc-dev + sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev cmake . make install ``` diff --git a/autoAdjustHwloc.hpp b/autoAdjustHwloc.hpp index 4df476b..9022330 100644 --- a/autoAdjustHwloc.hpp +++ b/autoAdjustHwloc.hpp @@ -138,7 +138,7 @@ private: if (obj->type == HWLOC_OBJ_CACHE) { size_t cacheSize = obj->attr->cache.size; - size_t numHashL3 = cacheSize / m_scratchPadMemSize; + size_t numHashL3 = ( cacheSize + m_scratchPadMemSize/ 2llu ) / m_scratchPadMemSize; /* check cache is exclusive or inclusive */ const char* value = hwloc_obj_get_info_by_name(obj, "Inclusive"); @@ -176,7 +176,7 @@ private: numHashL3 = 0; numHashes += extraHash; //add L2 hashes - numHashes += l2Cache / m_scratchPadMemSize; + numHashes += ( l2Cache + m_scratchPadMemSize / 2llu ) / m_scratchPadMemSize; int numCachesLeft = numL2; getConfig(topology, l3Cache, numHashes, numCachesLeft); doL3 = false; |