From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42Kt473HVnzF3Kv for ; Wed, 26 Sep 2018 19:31:35 +1000 (AEST) Date: Wed, 26 Sep 2018 11:31:27 +0200 From: Michal Hocko To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , Catalin Marinas , Chris Zankel , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Ingo Molnar , "James E.J. Bottomley" , Jonas Bonn , Jonathan Corbet , Ley Foon Tan , Mark Salter , Martin Schwidefsky , Matt Turner , Michael Ellerman , Michal Simek , Palmer Dabbelt , Paul Burton , Richard Kuo , Richard Weinberger , Rich Felker , Russell King , Serge Semin , Thomas Gleixner , Tony Luck , Vineet Gupta , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp Subject: Re: [PATCH 14/30] memblock: add align parameter to memblock_alloc_node() Message-ID: <20180926093127.GO6278@dhcp22.suse.cz> References: <1536927045-23536-1-git-send-email-rppt@linux.vnet.ibm.com> <1536927045-23536-15-git-send-email-rppt@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1536927045-23536-15-git-send-email-rppt@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri 14-09-18 15:10:29, Mike Rapoport wrote: > With the align parameter memblock_alloc_node() can be used as drop in > replacement for alloc_bootmem_pages_node() and __alloc_bootmem_node(), > which is done in the following patches. /me confused. Why do we need this patch at all? Maybe it should be folded into the later patch you are refereing here? > Signed-off-by: Mike Rapoport > --- > include/linux/bootmem.h | 4 ++-- > mm/sparse.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h > index 7d91f0f..3896af2 100644 > --- a/include/linux/bootmem.h > +++ b/include/linux/bootmem.h > @@ -157,9 +157,9 @@ static inline void * __init memblock_alloc_from_nopanic( > } > > static inline void * __init memblock_alloc_node( > - phys_addr_t size, int nid) > + phys_addr_t size, phys_addr_t align, int nid) > { > - return memblock_alloc_try_nid(size, 0, BOOTMEM_LOW_LIMIT, > + return memblock_alloc_try_nid(size, align, BOOTMEM_LOW_LIMIT, > BOOTMEM_ALLOC_ACCESSIBLE, nid); > } > > diff --git a/mm/sparse.c b/mm/sparse.c > index 04e97af..509828f 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -68,7 +68,7 @@ static noinline struct mem_section __ref *sparse_index_alloc(int nid) > if (slab_is_available()) > section = kzalloc_node(array_size, GFP_KERNEL, nid); > else > - section = memblock_alloc_node(array_size, nid); > + section = memblock_alloc_node(array_size, 0, nid); > > return section; > } > -- > 2.7.4 > -- Michal Hocko SUSE Labs