All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, Catalin Marinas <catalin.marinas@arm.com>,
	Chris Zankel <chris@zankel.net>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Guan Xuetao <gxt@pku.edu.cn>, Ingo Molnar <mingo@redhat.com>,
	Matt Turner <mattst88@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Michal Hocko <mhocko@suse.com>, Michal Simek <monstr@monstr.eu>,
	Paul Burton <paul.burton@mips.com>,
	Richard Weinberger <richard@nod.at>,
	Russell King <linux@armlinux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	linux-alpha@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org,
	linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org,
	linux-um@lists.infradead.org
Subject: Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES
Date: Fri, 5 Oct 2018 15:19:34 -0700	[thread overview]
Message-ID: <20181005151934.87226fa92825c3002a475413@linux-foundation.org> (raw)
In-Reply-To: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com>

On Fri,  5 Oct 2018 00:07:04 +0300 Mike Rapoport <rppt@linux.vnet.ibm.com> wrote:

> When a memblock allocation APIs are called with align = 0, the alignment is
> implicitly set to SMP_CACHE_BYTES.
> 
> Replace all such uses of memblock APIs with the 'align' parameter explicitly
> set to SMP_CACHE_BYTES and stop implicit alignment assignment in the
> memblock internal allocation functions.
> 
> For the case when memblock APIs are used via helper functions, e.g. like
> iommu_arena_new_node() in Alpha, the helper functions were detected with
> Coccinelle's help and then manually examined and updated where appropriate.
> 
> ...
>
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1298,9 +1298,6 @@ static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
>  {
>  	phys_addr_t found;
>  
> -	if (!align)
> -		align = SMP_CACHE_BYTES;
> -

Can we add a WARN_ON_ONCE(!align) here?  To catch unconverted code
which sneaks in later on.


WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: linux-mips@linux-mips.org, linux-m68k@vger.kernel.org,
	Michal Hocko <mhocko@suse.com>,
	linux-ia64@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-mm@kvack.org, Richard Weinberger <richard@nod.at>,
	Russell King <linux@armlinux.org.uk>,
	Ingo Molnar <mingo@redhat.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Matt Turner <mattst88@gmail.com>,
	linux-um@lists.infradead.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Guan Xuetao <gxt@pku.edu.cn>,
	linux-arm-kernel@lists.infradead.org,
	Chris Zankel <chris@zankel.net>, Michal Simek <monstr@monstr.eu>,
	Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org, Paul Burton <paul.burton@mips.com>,
	linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES
Date: Fri, 5 Oct 2018 15:19:34 -0700	[thread overview]
Message-ID: <20181005151934.87226fa92825c3002a475413@linux-foundation.org> (raw)
In-Reply-To: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com>

On Fri,  5 Oct 2018 00:07:04 +0300 Mike Rapoport <rppt@linux.vnet.ibm.com> wrote:

> When a memblock allocation APIs are called with align = 0, the alignment is
> implicitly set to SMP_CACHE_BYTES.
> 
> Replace all such uses of memblock APIs with the 'align' parameter explicitly
> set to SMP_CACHE_BYTES and stop implicit alignment assignment in the
> memblock internal allocation functions.
> 
> For the case when memblock APIs are used via helper functions, e.g. like
> iommu_arena_new_node() in Alpha, the helper functions were detected with
> Coccinelle's help and then manually examined and updated where appropriate.
> 
> ...
>
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1298,9 +1298,6 @@ static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
>  {
>  	phys_addr_t found;
>  
> -	if (!align)
> -		align = SMP_CACHE_BYTES;
> -

Can we add a WARN_ON_ONCE(!align) here?  To catch unconverted code
which sneaks in later on.


WARNING: multiple messages have this Message-ID (diff)
From: akpm@linux-foundation.org (Andrew Morton)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES
Date: Fri, 5 Oct 2018 15:19:34 -0700	[thread overview]
Message-ID: <20181005151934.87226fa92825c3002a475413@linux-foundation.org> (raw)
In-Reply-To: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com>

On Fri,  5 Oct 2018 00:07:04 +0300 Mike Rapoport <rppt@linux.vnet.ibm.com> wrote:

> When a memblock allocation APIs are called with align = 0, the alignment is
> implicitly set to SMP_CACHE_BYTES.
> 
> Replace all such uses of memblock APIs with the 'align' parameter explicitly
> set to SMP_CACHE_BYTES and stop implicit alignment assignment in the
> memblock internal allocation functions.
> 
> For the case when memblock APIs are used via helper functions, e.g. like
> iommu_arena_new_node() in Alpha, the helper functions were detected with
> Coccinelle's help and then manually examined and updated where appropriate.
> 
> ...
>
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1298,9 +1298,6 @@ static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
>  {
>  	phys_addr_t found;
>  
> -	if (!align)
> -		align = SMP_CACHE_BYTES;
> -

Can we add a WARN_ON_ONCE(!align) here?  To catch unconverted code
which sneaks in later on.

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, Catalin Marinas <catalin.marinas@arm.com>,
	Chris Zankel <chris@zankel.net>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Guan Xuetao <gxt@pku.edu.cn>, Ingo Molnar <mingo@redhat.com>,
	Matt Turner <mattst88@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Michal Hocko <mhocko@suse.com>, Michal Simek <monstr@monstr.eu>,
	Paul Burton <paul.burton@mips.com>,
	Richard Weinberger <richard@nod.at>,
	Russell King <linux@armlinux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	linux-alpha@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org,
	linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org,
	linux-um@lists.infradead.org
Subject: Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES
Date: Fri, 05 Oct 2018 22:19:34 +0000	[thread overview]
Message-ID: <20181005151934.87226fa92825c3002a475413@linux-foundation.org> (raw)
In-Reply-To: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com>

On Fri,  5 Oct 2018 00:07:04 +0300 Mike Rapoport <rppt@linux.vnet.ibm.com> wrote:

> When a memblock allocation APIs are called with align = 0, the alignment is
> implicitly set to SMP_CACHE_BYTES.
> 
> Replace all such uses of memblock APIs with the 'align' parameter explicitly
> set to SMP_CACHE_BYTES and stop implicit alignment assignment in the
> memblock internal allocation functions.
> 
> For the case when memblock APIs are used via helper functions, e.g. like
> iommu_arena_new_node() in Alpha, the helper functions were detected with
> Coccinelle's help and then manually examined and updated where appropriate.
> 
> ...
>
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1298,9 +1298,6 @@ static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
>  {
>  	phys_addr_t found;
>  
> -	if (!align)
> -		align = SMP_CACHE_BYTES;
> -

Can we add a WARN_ON_ONCE(!align) here?  To catch unconverted code
which sneaks in later on.

  parent reply	other threads:[~2018-10-05 22:19 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 21:07 [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES Mike Rapoport
2018-10-04 21:07 ` Mike Rapoport
2018-10-04 21:07 ` Mike Rapoport
2018-10-04 21:07 ` Mike Rapoport
2018-10-04 21:07 ` Mike Rapoport
2018-10-05  3:25 ` Benjamin Herrenschmidt
2018-10-05  3:25   ` Benjamin Herrenschmidt
2018-10-05  3:25   ` Benjamin Herrenschmidt
2018-10-05  3:25   ` Benjamin Herrenschmidt
2018-10-05 15:05   ` Mike Rapoport
2018-10-05 15:05     ` Mike Rapoport
2018-10-05 15:05     ` Mike Rapoport
2018-10-05 15:05     ` Mike Rapoport
2018-10-05 22:19 ` Andrew Morton [this message]
2018-10-05 22:19   ` Andrew Morton
2018-10-05 22:19   ` Andrew Morton
2018-10-05 22:19   ` Andrew Morton
2018-10-11  6:08   ` Mike Rapoport
2018-10-11  6:08     ` Mike Rapoport
2018-10-11  6:08     ` Mike Rapoport
2018-10-11  6:08     ` Mike Rapoport
2018-10-11  6:08     ` Mike Rapoport
2018-10-11  6:08     ` Mike Rapoport
2018-10-11  6:08     ` Mike Rapoport
2018-10-09 23:01 ` Paul Burton
2018-10-09 23:01   ` Paul Burton
2018-10-09 23:01   ` Paul Burton
2018-10-09 23:01   ` Paul Burton
2018-10-09 23:01   ` Paul Burton
2018-10-09 23:01   ` Paul Burton
2018-10-10  7:58 ` Michal Hocko
2018-10-10  7:58   ` Michal Hocko
2018-10-10  7:58   ` Michal Hocko
2018-10-10  7:58   ` Michal Hocko
2018-10-10  7:58   ` Michal Hocko
2018-10-10 12:04 ` Michael Ellerman
2018-10-10 12:04   ` Michael Ellerman
2018-10-10 12:04   ` Michael Ellerman
2018-10-10 12:04   ` Michael Ellerman
2018-10-10 12:04   ` Michael Ellerman
2018-10-10 12:04   ` Michael Ellerman

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=20181005151934.87226fa92825c3002a475413@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=chris@zankel.net \
    --cc=geert@linux-m68k.org \
    --cc=gxt@pku.edu.cn \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mattst88@gmail.com \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=mpe@ellerman.id.au \
    --cc=paul.burton@mips.com \
    --cc=richard@nod.at \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.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.