[LTP] [PATCH v4 0/4] new test for madvise(MADV_DONTNEED/MADV_REMOVE)

Zhao Gongyi zhaogongyi@huawei.com
Thu Oct 13 15:47:24 CEST 2022


1. Check that madvise(2) MADV_DONTNEED operation applied to Huge TLB
   pages successfully after kernel version 5.18, and will result in
   zero-fill-on-demand pages for anonymous private mappings
2. Check that madvise(2) MADV_DONTNEED applied to shared mappings will
   lead to the resident set size(RSS) of the calling process reduced
   immediately
3. Check that after a successful madvise(2) MADV_REMOVE operation,
   subsequent accesses in the specified address range will see bytes
   containing zero
4. Check that in madvise(2) MADV_REMOVE operation, the specified address
   range must be mapped shared and writable and this flag cannot be
   applied to locked pages

Changes in v4:
  - Modify madvise04.c and madvise11.c according to suggestions
  - Add madvise12.c and madvise13.c for madvise(MADV_REMOVE) to this
    patch set since the dependencies of the patches

Changes in v3:
  - Modify madvise04.c according to suggestions

Changes in v2:
  - Modify the test adn split the test into two as suggestion
  - Add a new test for madvise

Zhao Gongyi (4):
  syscalls/madvise04: new test for madvise(MADV_DONTNEED)
  syscalls/madvise11: new test for madvise(MADV_DONTNEED)
  syscalls/madvise12: new test for madvise(MADV_REMOVE)
  syscalls/madvise13: new test for madvise(MADV_REMOVE)

 runtest/syscalls                              |  4 +
 testcases/kernel/syscalls/madvise/.gitignore  |  4 +
 testcases/kernel/syscalls/madvise/madvise04.c | 62 ++++++++++++++
 testcases/kernel/syscalls/madvise/madvise11.c | 82 ++++++++++++++++++
 testcases/kernel/syscalls/madvise/madvise12.c | 85 +++++++++++++++++++
 testcases/kernel/syscalls/madvise/madvise13.c | 80 +++++++++++++++++
 6 files changed, 317 insertions(+)
 create mode 100644 testcases/kernel/syscalls/madvise/madvise04.c
 create mode 100644 testcases/kernel/syscalls/madvise/madvise11.c
 create mode 100644 testcases/kernel/syscalls/madvise/madvise12.c
 create mode 100644 testcases/kernel/syscalls/madvise/madvise13.c

--
2.17.1



More information about the ltp mailing list