Skip to content

Commit

Permalink
Fix for the "kmem -z" option on Linux 5.0 and later kernels
Browse files Browse the repository at this point in the history
that contain commit a921444382b49cc7fdeca3fba3e278bc09484a27,
titled "mm: move zone watermark accesses behind an accessor".
Without the patch, the command fails with the error message
"kmem: invalid (optional) structure member offsets: zone_pages_min
or zone_struct_pages_min".
(k-hagio@ab.jp.nec.com)
  • Loading branch information
Dave Anderson committed Mar 7, 2019
1 parent 8e21aa3 commit 84f5e2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,9 @@ vm_init(void)
"zone", "pages_high");
MEMBER_OFFSET_INIT(zone_watermark,
"zone", "watermark");
if (INVALID_MEMBER(zone_watermark))
MEMBER_OFFSET_INIT(zone_watermark,
"zone", "_watermark");
MEMBER_OFFSET_INIT(zone_nr_active,
"zone", "nr_active");
MEMBER_OFFSET_INIT(zone_nr_inactive,
Expand Down

0 comments on commit 84f5e2a

Please sign in to comment.