Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp249985imm; Thu, 6 Sep 2018 01:41:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZQ/2ngq0fUwWvvzU87er4W5vp+6j7rJJulQI8CfRh5ih4dQzObXuHsU+Os1+UeDqH+JUsL X-Received: by 2002:a63:2701:: with SMTP id n1-v6mr1693829pgn.146.1536223287099; Thu, 06 Sep 2018 01:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536223287; cv=none; d=google.com; s=arc-20160816; b=E5o78B9AlTNRViM1tlKVMtjQnBK9Oi20szrtjSVelLyHbx6a8Og/2ib3s+m1wpVbr5 PDnzDN/nC0zrxB6EqF07e6yljyK5+EIlBdwyiD2CG4K9bde79H0RcByu9hyjEuuDUFpD ZCc8sm7uyyXI7uidct8F0gYK9yIC4u58RIS7r17Yz3uB2lYUTudhLFCl8MfAlj1GrRKC WeLo+12JZeoowedYwjOhdhs67ecuse5p8cC33MwhPRSITz5Ubr+7nHF2qiCjO04/g5MV 6p+6TaVkMVZE2ksSj5qmEjpWO6SmNuygZMPH7mh76evYRX3a0rfxtKKIYS7pnbOgxOj6 Rkpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JiIRml0tWmjbp3ghi5GDu9HNMML9FtP6dZkcl7CS4QA=; b=JA6/iAfk2RLph0fhWlIG2I0TbmOVMYerRB9xlyLfzpFS4bnapYMEzMmq30RPKe6zlm o7vpm+nQno2eu5Y1u6jH4FWlPdSzHcMRVsiakv8J80TZMDJCACm/LHnkZtLY8gFO9uxJ JfKbIGpQ0Fnu2NC3gkM5wjOHBPlA+qj4s9TcXE05egsVNG8UlZJrNlNpfaNjnqVF2w8U ON6BTmUPRc8aFgEtorPsYqjXKxnETzWGsnw2OAC1sGsJmtvpZW6C3TanrNoUzmutp6dZ sJ3zOoSAeh4NtFXejl7aOzkA2I25RqTxLa57SYtxjTqL2K2GS2Xb8+keaOFQ8qeBIk8H nIbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p91-v6si4379772plb.51.2018.09.06.01.41.11; Thu, 06 Sep 2018 01:41:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728246AbeIFNNE (ORCPT + 99 others); Thu, 6 Sep 2018 09:13:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:39162 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728224AbeIFNNE (ORCPT ); Thu, 6 Sep 2018 09:13:04 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 26C04AE39; Thu, 6 Sep 2018 08:38:42 +0000 (UTC) Date: Thu, 6 Sep 2018 10:38:41 +0200 From: Michal Hocko To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , "David S. Miller" , Greg Kroah-Hartman , Ingo Molnar , Michael Ellerman , Paul Burton , Thomas Gleixner , Tony Luck , linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 16/29] memblock: replace __alloc_bootmem_node with appropriate memblock_ API Message-ID: <20180906083841.GA14951@dhcp22.suse.cz> References: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com> <1536163184-26356-17-git-send-email-rppt@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1536163184-26356-17-git-send-email-rppt@linux.vnet.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 05-09-18 18:59:31, Mike Rapoport wrote: > Use memblock_alloc_try_nid whenever goal (i.e. mininal address is > specified) and memblock_alloc_node otherwise. I suspect you wanted to say (i.e. minimal address) is specified > Signed-off-by: Mike Rapoport Acked-by: Michal Hocko One note below > --- > arch/ia64/mm/discontig.c | 6 ++++-- > arch/ia64/mm/init.c | 2 +- > arch/powerpc/kernel/setup_64.c | 6 ++++-- > arch/sparc/kernel/setup_64.c | 10 ++++------ > arch/sparc/kernel/smp_64.c | 4 ++-- > 5 files changed, 15 insertions(+), 13 deletions(-) > > diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c > index 1928d57..918dda9 100644 > --- a/arch/ia64/mm/discontig.c > +++ b/arch/ia64/mm/discontig.c > @@ -451,8 +451,10 @@ static void __init *memory_less_node_alloc(int nid, unsigned long pernodesize) > if (bestnode == -1) > bestnode = anynode; > > - ptr = __alloc_bootmem_node(pgdat_list[bestnode], pernodesize, > - PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); > + ptr = memblock_alloc_try_nid(pernodesize, PERCPU_PAGE_SIZE, > + __pa(MAX_DMA_ADDRESS), > + BOOTMEM_ALLOC_ACCESSIBLE, > + bestnode); > > return ptr; > } > diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c > index ffcc358..2169ca5 100644 > --- a/arch/ia64/mm/init.c > +++ b/arch/ia64/mm/init.c > @@ -459,7 +459,7 @@ int __init create_mem_map_page_table(u64 start, u64 end, void *arg) > pte = pte_offset_kernel(pmd, address); > > if (pte_none(*pte)) > - set_pte(pte, pfn_pte(__pa(memblock_alloc_node(PAGE_SIZE, PAGE_SIZE, node))) >> PAGE_SHIFT, > + set_pte(pte, pfn_pte(__pa(memblock_alloc_node(PAGE_SIZE, PAGE_SIZE, node)) >> PAGE_SHIFT, > PAGE_KERNEL)); This doesn't seem to belong to the patch, right? > } > return 0; -- Michal Hocko SUSE Labs