mbox series

[v2,0/7] mm: Get rid of vmalloc_sync_(un)mappings()

Message ID 20200513152137.32426-1-joro@8bytes.org (mailing list archive)
Headers show
Series mm: Get rid of vmalloc_sync_(un)mappings() | expand

Message

Joerg Roedel May 13, 2020, 3:21 p.m. UTC
Hi,

here is the next post of this series with these changes to the first
version:

	- Rebased to v5.7-rc5

	- As a result of the rebase, also removed the
	  vmalloc_sync_mappings() call from tracing code

	- Added a comment that we rely on the compiler optimizing calls
	  to arch_syn_kernel_mappings() away when
	  ARCH_PAGE_TABLE_SYNC_MASK is 0

The first version can be found here:

	https://lore.kernel.org/lkml/20200508144043.13893-1-joro@8bytes.org/

The cover letter of the first post also has more details on the
motivation for this patch-set.

Please review.

Regards,

	Joerg

Joerg Roedel (7):
  mm: Add functions to track page directory modifications
  mm/vmalloc: Track which page-table levels were modified
  mm/ioremap: Track which page-table levels were modified
  x86/mm/64: Implement arch_sync_kernel_mappings()
  x86/mm/32: Implement arch_sync_kernel_mappings()
  mm: Remove vmalloc_sync_(un)mappings()
  x86/mm: Remove vmalloc faulting

 arch/x86/include/asm/pgtable-2level_types.h |   2 +
 arch/x86/include/asm/pgtable-3level_types.h |   2 +
 arch/x86/include/asm/pgtable_64_types.h     |   2 +
 arch/x86/include/asm/switch_to.h            |  23 ---
 arch/x86/kernel/setup_percpu.c              |   6 +-
 arch/x86/mm/fault.c                         | 176 +-------------------
 arch/x86/mm/init_64.c                       |   5 +
 arch/x86/mm/pti.c                           |   8 +-
 drivers/acpi/apei/ghes.c                    |   6 -
 include/asm-generic/5level-fixup.h          |   5 +-
 include/asm-generic/pgtable.h               |  23 +++
 include/linux/mm.h                          |  46 +++++
 include/linux/vmalloc.h                     |  18 +-
 kernel/notifier.c                           |   1 -
 kernel/trace/trace.c                        |  12 --
 lib/ioremap.c                               |  46 +++--
 mm/nommu.c                                  |  12 --
 mm/vmalloc.c                                | 109 +++++++-----
 18 files changed, 204 insertions(+), 298 deletions(-)

Comments

Andy Lutomirski May 13, 2020, 4:01 p.m. UTC | #1
On Wed, May 13, 2020 at 8:21 AM Joerg Roedel <joro@8bytes.org> wrote:
>
> Hi,
>
> here is the next post of this series with these changes to the first
> version:
>
>         - Rebased to v5.7-rc5
>
>         - As a result of the rebase, also removed the
>           vmalloc_sync_mappings() call from tracing code
>
>         - Added a comment that we rely on the compiler optimizing calls
>           to arch_syn_kernel_mappings() away when
>           ARCH_PAGE_TABLE_SYNC_MASK is 0
>
> The first version can be found here:
>
>         https://lore.kernel.org/lkml/20200508144043.13893-1-joro@8bytes.org/
>
> The cover letter of the first post also has more details on the
> motivation for this patch-set.
>
> Please review.
>

Assuming the missing cleanup at the end gets done:

Acked-by: Andy Lutomirski <luto@kernel.org>

grumpily acked, anyway.

I would love to see a followup patch that preallocates the vmalloc
region on 64-bit and compiles out pgd_list and all of the associated
gunk.
Joerg Roedel May 14, 2020, 2:49 p.m. UTC | #2
On Wed, May 13, 2020 at 09:01:04AM -0700, Andy Lutomirski wrote:
> Assuming the missing cleanup at the end gets done:
> 
> Acked-by: Andy Lutomirski <luto@kernel.org>
> 
> grumpily acked, anyway.

Thanks, I updated patch 7 and added your acks, will send a v3 probably
tomorrow.


	Joerg
Joerg Roedel May 15, 2020, 1:03 p.m. UTC | #3
On Wed, May 13, 2020 at 09:01:04AM -0700, Andy Lutomirski wrote:
> I would love to see a followup patch that preallocates the vmalloc
> region on 64-bit and compiles out pgd_list and all of the associated
> gunk.

Looked a bit into this, with pre-allocation and a few more changes all
but one users of pgd_list and pgd_lock can be get rid of on x86-64. But
there is the XEN-PV code which also needs to traverse pgd_list, and I am
not sure how to get rid of that.

Regards,

	Joerg