From patchwork Thu Jul 26 19:35:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Tatashin X-Patchwork-Id: 10546339 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 6189814E2 for ; Thu, 26 Jul 2018 19:35:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59E082B685 for ; Thu, 26 Jul 2018 19:35:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D8012BCDA; Thu, 26 Jul 2018 19:35:35 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY 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 D70DD2B685 for ; Thu, 26 Jul 2018 19:35:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DA0236B000D; Thu, 26 Jul 2018 15:35:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D504B6B000E; Thu, 26 Jul 2018 15:35:32 -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 BF27A6B0010; Thu, 26 Jul 2018 15:35:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id 6009E6B000D for ; Thu, 26 Jul 2018 15:35:32 -0400 (EDT) Received: by mail-ed1-f69.google.com with SMTP id b12-v6so1190062edi.12 for ; Thu, 26 Jul 2018 12:35:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:subject:date:message-id; bh=bVTATY/8BDhLbkA9mIha7thqBNFMjhkLxJwAAo4KRu0=; b=UZt+Ad4F4UkmXMARV2BKQtXe+Nt6KGb8sjGT3BebCbPgFdKfw9f4irCASEN4i2npLx 2LRCn83I0owmJBThGqxN7eFYqhMyZU1znJmRUINb0THkO68Axdndr8xvDPU5YDW9ZvAH X5Hb3I3l2hCHLdy+2bPcE8ThfL2kxM610oQUpH8FtYho2wgRv0KinvzZX2v9VWosp0BJ 32YyACDP8EaRsxK1l5RqZ1W3Nf1sRi+PyOKB7fbflA6DaIAxleoJ7tCFCy95Uz7uhJIY Taa3njXgirTZJOv7oUgE7sOFwjcBftIbM2Nu5akfVw8AqEh+pmjxWxFVtPKK9XX8/FSY Xm3g== X-Gm-Message-State: AOUpUlHcUvqO+D0rwAKE5QnlTL8MgpYJBeehYqcDtFoiqlR7UEA8lDz7 4rATt3xW5IcD/e9kTahfvZvmEITGal0dbDaDwXL1VsUpeZcJYuGJmcVlS/egFuqoY4qY93IXfPg Di0WZZ1uSAOtuxzK2x7ReekuNI+uLdUpLJCVrz1WEcVlqwqyChjxpVNyURluUAulv/Q== X-Received: by 2002:a50:ad55:: with SMTP id z21-v6mr3975404edc.142.1532633731831; Thu, 26 Jul 2018 12:35:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeR6+l9hs5HzzRpP3ZcHKNeH1BNnoqKv3kGggNwQk4ZjhIAa3Vvw2+RXFImu0fIQPjPEeoO X-Received: by 2002:a50:ad55:: with SMTP id z21-v6mr3975374edc.142.1532633731185; Thu, 26 Jul 2018 12:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532633731; cv=none; d=google.com; s=arc-20160816; b=gB3bygYhs/q4pnypxOYTM45EvG8rWX2W+5g+QiztV1d2XjrnRCB2oiJhESXLFeBeFD mJW+MLDG0hxy2HKHdMvOLzSHvxLL/QbgulGruerYS2d78MdkJo44/p3dRhMv/z9f91FS ZvPKsoknanVn44K6iUHErtfJm2tA7K+UgzWOrii/Xb54FNRkiXCmAdHARyo2SLOdAOaz XNTySldf/0kb+gVXsE1bEd7q3eemWa+TeVST8u9TlSLl9/6IW1qN8Rs08/kczjmBSKIV ZJDgjRKzG5RVBT2L9YLuirWUCIjFjpDuUEOwMzTIUNk0Gp3PN2+ndhae4wi2I+/TgIzD uFTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:dkim-signature :arc-authentication-results; bh=bVTATY/8BDhLbkA9mIha7thqBNFMjhkLxJwAAo4KRu0=; b=NumCEbkqZYEZUeiCinG34I/QNZcExKgqe34khuv7L+UfTzjlGs3vIql8Ob4eYLwILj Hty4KdOhjb6ZqcM5nwe14iwXEzi+ob3TE4sKOn3P/BKBsMtFBAxTn/YrwrN1IEROBdso Yye6c90DtQTclrkMzGX78qZ/hKlk6fkqOUE78oJ8ySkgiIoppv77XyBZlPq9RdrSalRr XNJkbtZQOqeZE+oUNguBbMwDjwKFK+rgeYA66ZMRzp8Au4bxkp/MA8Tx4ezFrqlnASZo WppM8UtWmUEWRkhQ+UKXJwb2xjlWO0LSt/3c/nJTzBD5WjN1wxVq5CmWtgna/9LjUljd Q9DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=h39gz+vC; spf=pass (google.com: domain of pasha.tatashin@oracle.com designates 141.146.126.79 as permitted sender) smtp.mailfrom=pasha.tatashin@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from aserp2130.oracle.com (aserp2130.oracle.com. [141.146.126.79]) by mx.google.com with ESMTPS id g2-v6si1434611edc.349.2018.07.26.12.35.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 12:35:31 -0700 (PDT) Received-SPF: pass (google.com: domain of pasha.tatashin@oracle.com designates 141.146.126.79 as permitted sender) client-ip=141.146.126.79; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=h39gz+vC; spf=pass (google.com: domain of pasha.tatashin@oracle.com designates 141.146.126.79 as permitted sender) smtp.mailfrom=pasha.tatashin@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6QJSQ0A149203; Thu, 26 Jul 2018 19:35:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2018-07-02; bh=bVTATY/8BDhLbkA9mIha7thqBNFMjhkLxJwAAo4KRu0=; b=h39gz+vCpOKZbrPwKM4u45S6asYpZ0Y3feJWYPtehZUCgshaFHIxQQFK4wfJwG4hrIzO 8U4QJMVVv3+p9hWtSolstek5lhBGkR4nEFeunG9y3+2aV30LBK1RwwVPSYphIrDbyTBg DW4fM+KpPhNhyi+u/vN74aD115d3l9jLBOSe+SAsSIEIDx1xrmBU8kQXvbICwdxJQtJW YmdhcoM/jBv8u/vbDog4jTNYCnTex/cgSjaU9ExmV8Yf3RWqUhBbYoL52/O3lWDXK4p6 t6vKY1jdpnTgYKagM7frRKMKAs5SmzKRZL8GXYcmnAYWoVYKrIu3WgtgNm1AIfGQoFrQ bA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2kbtbd4p3q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Jul 2018 19:35:18 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w6QJZH90012958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Jul 2018 19:35:17 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6QJZF9D002772; Thu, 26 Jul 2018 19:35:16 GMT Received: from localhost.localdomain (/73.69.118.222) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 26 Jul 2018 12:35:15 -0700 From: Pavel Tatashin To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, linux-mm@kvack.org, dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, jrdr.linux@gmail.com, bhe@redhat.com, gregkh@linuxfoundation.org, vbabka@suse.cz, richard.weiyang@gmail.com, dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org, osalvador@techadventures.net, pasha.tatashin@oracle.com, abdhalee@linux.vnet.ibm.com, mpe@ellerman.id.au Subject: [PATCH v2 0/3] memmap_init_zone improvements Date: Thu, 26 Jul 2018 15:35:06 -0400 Message-Id: <20180726193509.3326-1-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.18.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8966 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=766 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807260200 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 Changelog: v1 - v2 - Merged with linux-next - Removed inline from functions that have static variables. - Added a comment to defer_init() that it is called early in boot and therefore no need to protect static. Three small patches that improve memmap_init_zone() and also fix a small deferred pages bug. The improvements include reducing number of ifdefs and making code more modular. The bug is the deferred_init_update() should be called after the mirrored memory skipping is taken into account. Pavel Tatashin (3): mm: make memmap_init a proper function mm: calculate deferred pages after skipping mirrored memory mm: move mirrored memory specific code outside of memmap_init_zone arch/ia64/include/asm/pgtable.h | 1 - mm/page_alloc.c | 124 ++++++++++++++++---------------- 2 files changed, 62 insertions(+), 63 deletions(-)