From patchwork Wed Sep 5 15:59:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10589129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57076112B for ; Wed, 5 Sep 2018 16:00:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF0B82A685 for ; Wed, 5 Sep 2018 16:00:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCB0D285E5; Wed, 5 Sep 2018 16:00:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53E3D2A654 for ; Wed, 5 Sep 2018 16:00:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A60476B7404; Wed, 5 Sep 2018 12:00:27 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9E4D76B7405; Wed, 5 Sep 2018 12:00:27 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 862E76B7406; Wed, 5 Sep 2018 12:00:27 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by kanga.kvack.org (Postfix) with ESMTP id 3F9496B7404 for ; Wed, 5 Sep 2018 12:00:27 -0400 (EDT) Received: by mail-oi0-f71.google.com with SMTP id y135-v6so8953656oie.11 for ; Wed, 05 Sep 2018 09:00:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:in-reply-to:references:message-id; bh=E3fjE0+oQcVWwsiB9Pm4R6kXDL5AyZqKew/L/3djGBg=; b=HAFPFkbywNhq8Mwum76w8nKzZkLYFc/SN/ibqG6PJmXEuV93e9r29dBjtI027SPUOa BWAwr3XsqavedwOLMuBngnFM7TEsnM5DASRK0r0UEWiIi/HKHCXNEPFUFT1QIqRyxKwI xuGjm34hsvB+NqjgP+dudcBxsuaT2BezeqsbWfjBxLysLHsi0E5Wql2f4qqQzCg9fZh6 I/QhTxyqxYfDW10nrL0R2x/4IGMlQGLDxV692Kv6sBm3lGvcTaFagsSnkhWjbkFfxYV+ vOEhrGFdprYIRXSodZlb+chGebWVboVhCdvyGRFI/htLEadPLSpRP8iCTCpNpq2W+FsS Ybwg== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: APzg51A23z0rXrUjAiPfC85EGkL+s2aXRW46Bz7LKSh7UJHQkDlqAsZn EV8q7PKVwjd9HMTKGRZcT9t1NAtl7P/WTmA+GeYsQ7jOwwOSozNFBcrxXzKdWp2WmQot72i2oX+ I+PaAUYR1NIFaCaXRUG2wJrglWP3W9HsvAFJI7m2TWkcgZYrRJ/kymuJvk0HjWB0= X-Received: by 2002:aca:f0a:: with SMTP id 10-v6mr29816482oip.183.1536163226855; Wed, 05 Sep 2018 09:00:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdanZBRiozZiopasS6/ZQIt2EABdZ4FKzyw6CdMV/JlTist/Plsji8jQN1ujfVI2dCKaWESP X-Received: by 2002:aca:f0a:: with SMTP id 10-v6mr29816422oip.183.1536163226196; Wed, 05 Sep 2018 09:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536163226; cv=none; d=google.com; s=arc-20160816; b=VAX95sjmdoRaF2jkjyuvl94dZPBMvyFzfS0iHwMoUYISLNRwu4O6EqhG2qKXPeM7Xh AzEHIF2m9W/LASGSGyEtOXa2s3Tz6QxSXcM1okrhzylRmPuDtaTNA9YxNz4vA4Hik36M NEsIt3nOEPVRlLj5Ds97gFQ4VdqTkbhfmAkPy3TCKQpx1LEIXtgO+ortOLBJ1eT0EGf0 cbCh+4/U75df8EwWZuj+IB0iE4JviTGp/pnoGfY3c6M5kbJrqetphcrXvTfTi+4ilHcE WDLXS22jVFXUB28luu7HmYj8L1CjQRTjXnsuHJGLVKxajijaBkZI5BlPdFlD5MzsE2Ju 33yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from; bh=E3fjE0+oQcVWwsiB9Pm4R6kXDL5AyZqKew/L/3djGBg=; b=lCXLzRok4V48P/iXZoKytxdRXhDDrbj5uq/T+hXXb8wDeBjE75tHOKRy6MkVFnk1Ox YRy/J6XHuWG0jNeca5Je1SC+MdJU4AW5OCi0AJePfO8IWMlgSx/zW2V1kMSTEylAv9y/ zdSiezaDXwVzAtXScj8u0fSla3qemirFOy0VOPeSLCT+kSUJ1Zxq0ZpT0DMXnfi3JZtO 7cSBqH/AUXxcU4QJc515SrJWao339eEj10SXOD3QVrYDKPltV0DHEdWeJxLbrvWrc9ej FcMmS1+/0ygMEnlVHh/FpVRz/ZhEzRCeciMeca7d9AhC3MXV93kCrzaPmN87pNmAHodI WCEg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id t196-v6si1682756oif.57.2018.09.05.09.00.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 09:00:26 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w85FvaUe081493 for ; Wed, 5 Sep 2018 12:00:25 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mah4g3qyr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 05 Sep 2018 12:00:24 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 5 Sep 2018 17:00:21 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 5 Sep 2018 17:00:16 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w85G0FHm38666490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Sep 2018 16:00:15 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0EAEB11C05B; Wed, 5 Sep 2018 19:00:08 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E9C9E11C070; Wed, 5 Sep 2018 19:00:05 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.92]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 5 Sep 2018 19:00:05 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 05 Sep 2018 19:00:12 +0300 From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , "David S. Miller" , Greg Kroah-Hartman , Ingo Molnar , Michael Ellerman , Michal Hocko , 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, Mike Rapoport Subject: [RFC PATCH 10/29] memblock: replace __alloc_bootmem_node_nopanic with memblock_alloc_try_nid_nopanic Date: Wed, 5 Sep 2018 18:59:25 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18090516-0020-0000-0000-000002C1B2EA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090516-0021-0000-0000-0000210EE259 Message-Id: <1536163184-26356-11-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-05_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=745 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809050164 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The __alloc_bootmem_node_nopanic() is used only once, there is no reason to add a wrapper for memblock_alloc_try_nid_nopanic for it. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/x86/kernel/setup_percpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index ea554f8..67d48e26 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c @@ -112,8 +112,10 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, pr_debug("per cpu data for cpu%d %lu bytes at %016lx\n", cpu, size, __pa(ptr)); } else { - ptr = __alloc_bootmem_node_nopanic(NODE_DATA(node), - size, align, goal); + ptr = memblock_alloc_try_nid_nopanic(size, align, goal, + BOOTMEM_ALLOC_ACCESSIBLE, + node); + pr_debug("per cpu data for cpu%d %lu bytes on node%d at %016lx\n", cpu, size, node, __pa(ptr)); }