overloead cache

- use one thread more if 1 MiB cache is available after removeing the multiple of 2MiB
- fix install documentation
This commit is contained in:
psychocrypt
2017-05-14 19:13:39 +02:00
parent d7788995c2
commit 7a212bb24f
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
```
+2 -2
View File
@@ -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;