HPA: Correctly calculate retained pages
Retained pages are those which haven't been touched and are unbacked from OS perspective. For a pageslab their number should equal "total pages in slab" minus "touched pages".
This commit is contained in:
parent
2c625d5cd9
commit
c01a885e94
@ -292,7 +292,7 @@ hpdata_ndirty_get(hpdata_t *hpdata) {
|
|||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
hpdata_nretained_get(hpdata_t *hpdata) {
|
hpdata_nretained_get(hpdata_t *hpdata) {
|
||||||
return hpdata->h_nactive - hpdata->h_ntouched;
|
return HUGEPAGE_PAGES - hpdata->h_ntouched;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
Loading…
Reference in New Issue
Block a user