linux-stable/arch/s390/mm
David Hildenbrand cd5781d63e s390/vmemmap: remember unused sub-pmd ranges
With a memmap size of 56 bytes or 72 bytes per page, the memmap for a
256 MB section won't span full PMDs. As we populate single sections and
depopulate single sections, the depopulation step would not be able to
free all vmemmap pmds anymore.

Do it similarly to x86, marking the unused memmap ranges in a special way
(pad it with 0xFD).

This allows us to add/remove sections, cleaning up all allocated
vmemmap pages even if the memmap size is not multiple of 16 bytes per page.

A 56 byte memmap can, for example, be created with !CONFIG_MEMCG and
!CONFIG_SLUB.

Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200722094558.9828-9-david@redhat.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2020-07-27 10:34:08 +02:00
..
cmm.c s390: convert to msecs_to_jiffies() 2020-06-29 16:31:46 +02:00
dump_pagetables.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
extmem.c s390/extmem: remove stale -ENOSPC comment and handling 2020-07-03 10:49:16 +02:00
fault.c s390/kernel: expand exception table logic to allow new handling options 2020-07-20 10:55:50 +02:00
gmap.c mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
hugetlbpage.c hugetlbfs: move hugepagesz= parsing to arch independent code 2020-06-03 20:09:46 -07:00
init.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
kasan_init.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
maccess.c s390: Change s390_kernel_write() return type to match memcpy() 2020-05-08 00:12:43 +02:00
Makefile s390/mm: convert to the generic get_user_pages_fast code 2019-04-23 16:30:04 +02:00
mmap.c s390/mm: cleanup arch_get_unmapped_area() and friends 2020-03-27 10:22:46 +01:00
page-states.c s390/cmma: reuse kstrtobool for option value parsing 2019-08-26 12:51:18 +02:00
pageattr.c mm: consolidate pte_index() and pte_offset_*() definitions 2020-06-09 09:39:14 -07:00
pgalloc.c mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
pgtable.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
vmem.c s390/vmemmap: remember unused sub-pmd ranges 2020-07-27 10:34:08 +02:00