Skip to content

Commit

Permalink
Fix bug that returned MIN watermark in the promotion_watermark function.
Browse files Browse the repository at this point in the history
  • Loading branch information
yulistic committed Jun 19, 2024
1 parent 9719906 commit 50560af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions linux/mm/htmm_migrater.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ unsigned long get_memcg_promotion_watermark(unsigned long max_nr_pages)
{
max_nr_pages = max_nr_pages * 3 / 100; // 3%
if (max_nr_pages < MAX_WATERMARK_LOWER_LIMIT)
return MIN_WATERMARK_LOWER_LIMIT;
// return MIN_WATERMARK_LOWER_LIMIT;
return MAX_WATERMARK_LOWER_LIMIT;
else if (max_nr_pages > MAX_WATERMARK_UPPER_LIMIT)
return MIN_WATERMARK_UPPER_LIMIT;
// return MIN_WATERMARK_UPPER_LIMIT;
return MAX_WATERMARK_UPPER_LIMIT;
else
return max_nr_pages;
}
Expand Down

0 comments on commit 50560af

Please sign in to comment.