[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210419135443.12822-1-david@redhat.com>
Date: Mon, 19 Apr 2021 15:54:38 +0200
From: David Hildenbrand <david@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org, David Hildenbrand <david@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>, Chris Zankel <chris@...kel.net>,
Dave Hansen <dave.hansen@...el.com>,
Helge Deller <deller@....de>, Hugh Dickins <hughd@...gle.com>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
Jann Horn <jannh@...gle.com>, Jason Gunthorpe <jgg@...pe.ca>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Linux API <linux-api@...r.kernel.org>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Matt Turner <mattst88@...il.com>,
Max Filippov <jcmvbkbc@...il.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Michal Hocko <mhocko@...e.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Minchan Kim <minchan@...nel.org>,
Oscar Salvador <osalvador@...e.de>,
Peter Xu <peterx@...hat.com>, Ram Pai <linuxram@...ibm.com>,
Richard Henderson <rth@...ddle.net>,
Rik van Riel <riel@...riel.com>,
Rolf Eike Beer <eike-kernel@...tec.de>,
Shuah Khan <shuah@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Vlastimil Babka <vbabka@...e.cz>
Subject: [PATCH v2 0/5] mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables
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
--
2.30.2
Powered by blists - more mailing lists