From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>
Subject: [PATCH resend v2 0/5] mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables
Date: Tue, 11 May 2021 10:15:29 +0200 [thread overview]
Message-ID: <20210511081534.3507-1-david@redhat.com> (raw)
This is a resend of v2 because linux-mm seems to have swallowed patch #2.
Excessive details on MADV_POPULATE_(READ|WRITE) can be found in patch #2.
v1 -> v2:
- "mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page
tables"
-- Renamed patch/series to match what's happening -- prefault page tables
-- Clarified MADV_POPULATE_READ semantics on file holes and that we might
want fallocate().
-- Updated/clarified description
-- Dropped -EINVAL and -EBUSY checks
-- Added a comment regarding FOLL_TOUCH and why we don't care that
pages will get set dirty when triggering write-faults for now.
-- Reran and extended performance measurements by more fallocate()
combinations
RFCv2 -> v1
- "mm: fix variable name in declaration of populate_vma_page_range()"
-- Added
- "mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault ..."
-- Fix detection of memory holes when we have to re-lookup the VMA
-- Return -EHWPOISON to user space when we hit HW poisoned pages
-- Make variable names in definition and declaration consistent
- "MAINTAINERS: add tools/testing/selftests/vm/ to MEMORY MANAGEMENT"
-- Added
- "selftests/vm: add protection_keys_32 / protection_keys_64 to gitignore"
-- Added
- "selftests/vm: add test for MADV_POPULATE_(READ|WRITE)"
-- Added
RFC -> RFCv2:
- Fix re-locking (-> set "locked = 1;")
- Don't mimic MAP_POPULATE semantics:
--> Explicit READ/WRITE request instead of selecting it automatically,
which makes it more generic and better suited for some use cases (e.g., we
usually want to prefault shmem writable)
--> Require proper access permissions
- Introduce and use faultin_vma_page_range()
--> Properly handle HWPOISON pages (FOLL_HWPOISON)
--> Require proper access permissions (!FOLL_FORCE)
- Let faultin_vma_page_range() check for compatible mappings/permissions
- Extend patch description and add some performance numbers
David Hildenbrand (5):
mm: make variable names for populate_vma_page_range() consistent
mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page
tables
MAINTAINERS: add tools/testing/selftests/vm/ to MEMORY MANAGEMENT
selftests/vm: add protection_keys_32 / protection_keys_64 to gitignore
selftests/vm: add test for MADV_POPULATE_(READ|WRITE)
MAINTAINERS | 1 +
arch/alpha/include/uapi/asm/mman.h | 3 +
arch/mips/include/uapi/asm/mman.h | 3 +
arch/parisc/include/uapi/asm/mman.h | 3 +
arch/xtensa/include/uapi/asm/mman.h | 3 +
include/uapi/asm-generic/mman-common.h | 3 +
mm/gup.c | 58 ++++
mm/internal.h | 5 +-
mm/madvise.c | 66 ++++
tools/testing/selftests/vm/.gitignore | 3 +
tools/testing/selftests/vm/Makefile | 1 +
tools/testing/selftests/vm/madv_populate.c | 342 +++++++++++++++++++++
tools/testing/selftests/vm/run_vmtests.sh | 16 +
13 files changed, 506 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/vm/madv_populate.c
base-commit: bf05bf16c76bb44ab5156223e1e58e26dfe30a88
--
2.30.2
next reply other threads:[~2021-05-11 8:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 8:15 David Hildenbrand [this message]
2021-05-11 8:15 ` [PATCH resend v2 1/5] mm: make variable names for populate_vma_page_range() consistent David Hildenbrand
2021-05-11 9:54 ` Oscar Salvador
2021-05-11 9:56 ` Oscar Salvador
2021-05-11 8:15 ` [PATCH resend v2 2/5] mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables David Hildenbrand
2021-05-18 10:07 ` Michal Hocko
2021-05-18 10:32 ` David Hildenbrand
2021-05-18 11:17 ` Michal Hocko
2021-05-18 12:03 ` David Hildenbrand
2021-05-20 13:44 ` Michal Hocko
2021-05-21 8:48 ` David Hildenbrand
2021-05-11 8:15 ` [PATCH resend v2 3/5] MAINTAINERS: add tools/testing/selftests/vm/ to MEMORY MANAGEMENT David Hildenbrand
2021-05-11 9:47 ` Mike Rapoport
2021-05-11 8:15 ` [PATCH resend v2 4/5] selftests/vm: add protection_keys_32 / protection_keys_64 to gitignore David Hildenbrand
2021-05-11 8:15 ` [PATCH resend v2 5/5] selftests/vm: add test for MADV_POPULATE_(READ|WRITE) David Hildenbrand
2021-06-08 16:00 ` [PATCH] madvise.2: Document MADV_POPULATE_READ and MADV_POPULATE_WRITE David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210511081534.3507-1-david@redhat.com \
--to=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox