mbox series

[v3,0/1] Add some memory page soft-offlining control

Message ID 20230220102645.16842-1-william.roche@oracle.com
Headers show
Series Add some memory page soft-offlining control | expand

Message

“William Roche Feb. 20, 2023, 10:26 a.m. UTC
From: William Roche <william.roche@oracle.com>

Thank you very much Richard for your feedback about my previous patch version
proposal.
In this new version I made the changes you suggested:

- Changed the signal handler to avoid using unsafe code like "tst_res", and use
  a variable (with its mutex and cv) to inform an additional thread to end the
  test on a SIGBUS. The signal handler doesn't return to avoid a loop of SIGBUS
  delivery.

- Changed the code to use SAFE_MMAP and SAFE_MUNMAP

- The find_in_file() function could not be removed as I use it to verify if the
  hwpoison_inject module is already loaded or not, but I simplified it.

- And I'm now using getmntent() code to identify the debugfs mount point on the
  machine, and open the <debug_fs>/hwpoison/unpoison-pfn location.

Compile and check-madvise11 are clean, code tested on x86 and ARM.

Cheers,
William.


William Roche (1):
  madvise11: Add test for memory allocation / Soft-offlining possible
    race

 runtest/syscalls                              |   1 +
 testcases/kernel/syscalls/madvise/.gitignore  |   1 +
 testcases/kernel/syscalls/madvise/Makefile    |   2 +
 testcases/kernel/syscalls/madvise/madvise11.c | 424 ++++++++++++++++++
 4 files changed, 428 insertions(+)
 create mode 100644 testcases/kernel/syscalls/madvise/madvise11.c