"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/latency.c" between
redis-6.0.7.tar.gz and redis-6.0.8.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

latency.c  (redis-6.0.7):latency.c  (redis-6.0.8)
skipping to change at line 74 skipping to change at line 74
int THPIsEnabled(void) { int THPIsEnabled(void) {
char buf[1024]; char buf[1024];
FILE *fp = fopen("/sys/kernel/mm/transparent_hugepage/enabled","r"); FILE *fp = fopen("/sys/kernel/mm/transparent_hugepage/enabled","r");
if (!fp) return 0; if (!fp) return 0;
if (fgets(buf,sizeof(buf),fp) == NULL) { if (fgets(buf,sizeof(buf),fp) == NULL) {
fclose(fp); fclose(fp);
return 0; return 0;
} }
fclose(fp); fclose(fp);
return (strstr(buf,"[never]") == NULL) ? 1 : 0; return (strstr(buf,"[always]") != NULL) ? 1 : 0;
} }
#endif #endif
/* Report the amount of AnonHugePages in smap, in bytes. If the return /* Report the amount of AnonHugePages in smap, in bytes. If the return
* value of the function is non-zero, the process is being targeted by * value of the function is non-zero, the process is being targeted by
* THP support, and is likely to have memory usage / latency issues. */ * THP support, and is likely to have memory usage / latency issues. */
int THPGetAnonHugePagesSize(void) { int THPGetAnonHugePagesSize(void) {
return zmalloc_get_smap_bytes_by_field("AnonHugePages:",-1); return zmalloc_get_smap_bytes_by_field("AnonHugePages:",-1);
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)