All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: cpandya@codeaurora.org, toshi.kani@hpe.com, tglx@linutronix.de,
	mhocko@suse.com, akpm@linux-foundation.org,
	Will Deacon <will.deacon@arm.com>
Subject: [PATCH 0/5] Clean up huge vmap and ioremap code
Date: Wed, 12 Sep 2018 11:26:09 +0100	[thread overview]
Message-ID: <1536747974-25875-1-git-send-email-will.deacon@arm.com> (raw)

Hi all,

The recent introduction of break-before-make on the huge vmap path in
b6bdb7517c3d ("mm/vmalloc: add interfaces to free unmapped page table")
introduced a pair of arch functions for freeing a child level of page
table before putting down a huge mapping at the parent level.

Whilst this works well, the semantics of the pXd_free_pYd_table() function
are slightly confusing, and this led to an over-eager VM_WARN_ON in the
arm64 code that we fixed in -rc3 [1]. Linus suggested that the interface
could be tidied up so that the pXd_present() checks are moved into the
caller, so I've implemented that and generally cleaned up the ioremap code
so that it's easier to follow. I also extended the break-before-make code
to cover the huge p4d case, although this remains unused by any architectures.

Feedback welcome.

Cheers,

Will

[1] https://lkml.org/lkml/2018/9/7/898

--->8

Will Deacon (5):
  ioremap: Rework pXd_free_pYd_page() API
  arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table()
  x86: pgtable: Drop pXd_none() checks from pXd_free_pYd_table()
  lib/ioremap: Ensure phys_addr actually corresponds to a physical
    address
  lib/ioremap: Ensure break-before-make is used for huge p4d mappings

 arch/arm64/mm/mmu.c           |  13 +++---
 arch/x86/mm/pgtable.c         |  14 +++---
 include/asm-generic/pgtable.h |   5 ++
 lib/ioremap.c                 | 103 +++++++++++++++++++++++++++++-------------
 4 files changed, 91 insertions(+), 44 deletions(-)

-- 
2.1.4


             reply	other threads:[~2018-09-12 10:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 10:26 Will Deacon [this message]
2018-09-12 10:26 ` [PATCH 1/5] ioremap: Rework pXd_free_pYd_page() API Will Deacon
2018-09-14 20:36   ` Kani, Toshi
2018-09-14 21:10     ` Kani, Toshi
2018-09-17 11:33       ` Will Deacon
2018-09-17 18:38         ` Kani, Toshi
2018-09-12 10:26 ` [PATCH 2/5] arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table() Will Deacon
2018-09-12 10:26 ` [PATCH 3/5] x86: pgtable: Drop pXd_none() " Will Deacon
2018-09-14 20:37   ` Kani, Toshi
2018-09-17 11:33     ` Will Deacon
2018-09-17 18:43       ` Kani, Toshi
2018-09-12 10:26 ` [PATCH 4/5] lib/ioremap: Ensure phys_addr actually corresponds to a physical address Will Deacon
2018-09-12 15:09   ` Sean Christopherson
2018-09-12 16:39     ` Will Deacon
2018-09-12 17:14       ` Sean Christopherson
2018-09-12 10:26 ` [PATCH 5/5] lib/ioremap: Ensure break-before-make is used for huge p4d mappings Will Deacon
2018-09-17 18:55   ` Kani, Toshi

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=1536747974-25875-1-git-send-email-will.deacon@arm.com \
    --to=will.deacon@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=cpandya@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=tglx@linutronix.de \
    --cc=toshi.kani@hpe.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.