From: Mark Salter <msalter@redhat.com>
To: Mike Rapoport <rppt@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm <linux-mm@kvack.org>,
linux-c6x-dev <linux-c6x-dev@linux-c6x.org>
Subject: Re: [PATCH v3 0/6] memblock: simplify several early memory allocation
Date: Tue, 11 Dec 2018 17:51:23 -0500 [thread overview]
Message-ID: <f5a5bc600f3f956b92021ba86222b374f21044f8.camel@redhat.com> (raw)
In-Reply-To: <1544367624-15376-1-git-send-email-rppt@linux.ibm.com>
On Sun, 2018-12-09 at 17:00 +0200, Mike Rapoport wrote:
> Hi,
>
> These patches simplify some of the early memory allocations by replacing
> usage of older memblock APIs with newer and shinier ones.
>
> Quite a few places in the arch/ code allocated memory using a memblock API
> that returns a physical address of the allocated area, then converted this
> physical address to a virtual one and then used memset(0) to clear the
> allocated range.
>
> More recent memblock APIs do all the three steps in one call and their
> usage simplifies the code.
>
> It's important to note that regardless of API used, the core allocation is
> nearly identical for any set of memblock allocators: first it tries to find
> a free memory with all the constraints specified by the caller and then
> falls back to the allocation with some or all constraints disabled.
>
> The first three patches perform the conversion of call sites that have
> exact requirements for the node and the possible memory range.
>
> The fourth patch is a bit one-off as it simplifies openrisc's
> implementation of pte_alloc_one_kernel(), and not only the memblock usage.
>
> The fifth patch takes care of simpler cases when the allocation can be
> satisfied with a simple call to memblock_alloc().
>
> The sixth patch removes one-liner wrappers for memblock_alloc on arm and
> unicore32, as suggested by Christoph.
>
> v3:
> * added Tested-by from Michal Simek for microblaze changes
> * updated powerpc changes as per Michael Ellerman comments:
> - use allocations that clear memory in alloc_paca_data() and alloc_stack()
> - ensure the replacement is equivalent to old API
>
> v2:
> * added Ack from Stafford Horne for openrisc changes
> * entirely drop early_alloc wrappers on arm and unicore32, as per Christoph
> Hellwig
>
>
>
> Mike Rapoport (6):
> powerpc: prefer memblock APIs returning virtual address
> microblaze: prefer memblock API returning virtual address
> sh: prefer memblock APIs returning virtual address
> openrisc: simplify pte_alloc_one_kernel()
> arch: simplify several early memory allocations
> arm, unicore32: remove early_alloc*() wrappers
>
> arch/arm/mm/mmu.c | 13 +++----------
> arch/c6x/mm/dma-coherent.c | 9 ++-------
> arch/microblaze/mm/init.c | 5 +++--
> arch/nds32/mm/init.c | 12 ++++--------
> arch/openrisc/mm/ioremap.c | 11 ++++-------
> arch/powerpc/kernel/paca.c | 16 ++++++----------
> arch/powerpc/kernel/setup-common.c | 4 ++--
> arch/powerpc/kernel/setup_64.c | 24 ++++++++++--------------
> arch/powerpc/mm/hash_utils_64.c | 6 +++---
> arch/powerpc/mm/pgtable-book3e.c | 8 ++------
> arch/powerpc/mm/pgtable-book3s64.c | 5 +----
> arch/powerpc/mm/pgtable-radix.c | 25 +++++++------------------
> arch/powerpc/mm/pgtable_32.c | 4 +---
> arch/powerpc/mm/ppc_mmu_32.c | 3 +--
> arch/powerpc/platforms/pasemi/iommu.c | 5 +++--
> arch/powerpc/platforms/powernv/opal.c | 3 +--
> arch/powerpc/platforms/pseries/setup.c | 18 ++++++++++++++----
> arch/powerpc/sysdev/dart_iommu.c | 7 +++++--
> arch/sh/mm/init.c | 18 +++++-------------
> arch/sh/mm/numa.c | 5 ++---
> arch/sparc/kernel/prom_64.c | 7 ++-----
> arch/sparc/mm/init_64.c | 9 +++------
> arch/unicore32/mm/mmu.c | 14 ++++----------
> 23 files changed, 88 insertions(+), 143 deletions(-)
>
For the c6x bits:
Acked-by: Mark Salter <msalter@redhat.com>
prev parent reply other threads:[~2018-12-11 22:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-09 15:00 Mike Rapoport
2018-12-09 15:00 ` [PATCH v3 1/6] powerpc: prefer memblock APIs returning virtual address Mike Rapoport
2018-12-09 15:00 ` [PATCH v3 2/6] microblaze: prefer memblock API " Mike Rapoport
2018-12-09 15:00 ` [PATCH v3 3/6] sh: prefer memblock APIs " Mike Rapoport
2018-12-09 15:00 ` [PATCH v3 4/6] openrisc: simplify pte_alloc_one_kernel() Mike Rapoport
2018-12-09 15:00 ` [PATCH v3 5/6] arch: simplify several early memory allocations Mike Rapoport
2018-12-09 15:00 ` [PATCH v3 6/6] arm, unicore32: remove early_alloc*() wrappers Mike Rapoport
2018-12-11 22:51 ` Mark Salter [this message]
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=f5a5bc600f3f956b92021ba86222b374f21044f8.camel@redhat.com \
--to=msalter@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-c6x-dev@linux-c6x.org \
--cc=linux-mm@kvack.org \
--cc=rppt@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox