From patchwork Tue Jul 24 23:55:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Tatashin X-Patchwork-Id: 10543337 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 675DE90E3 for ; Tue, 24 Jul 2018 23:55:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CA8929769 for ; Tue, 24 Jul 2018 23:55:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4049D297F1; Tue, 24 Jul 2018 23:55:46 +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 CB5FF29769 for ; Tue, 24 Jul 2018 23:55:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A7A386B0006; Tue, 24 Jul 2018 19:55:44 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A29286B0007; Tue, 24 Jul 2018 19:55:44 -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 8F25E6B0008; Tue, 24 Jul 2018 19:55:44 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f198.google.com (mail-qk0-f198.google.com [209.85.220.198]) by kanga.kvack.org (Postfix) with ESMTP id 6398C6B0006 for ; Tue, 24 Jul 2018 19:55:44 -0400 (EDT) Received: by mail-qk0-f198.google.com with SMTP id q3-v6so5106903qki.4 for ; Tue, 24 Jul 2018 16:55:44 -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=SrZSB0NymPZVESO9mhldWYECRmLCB6Qy+uaRQZPVRjc=; b=plqYxSpsBJGBYq8s5KAgS2LSFnuO5y7ZtZZ8qzhg1mmhVmYCBktiBkpr7Qt5ZSxDaO eRJ7xbDaUwIhCi1fKgczq497be+tfOHctUvLbzmILd6WDTxJ5jmkhtHIKftyRbBEDF/6 PLk6LDE1YAcZD8MXdKkM84nBFxhCChN9NaB7sEYTCWX2vX85JP5KXyVfXfN9xuEVb7io AYWHJYZSfzEKgwnzt4Q9U9YdqLuqy6I0DXAuwWCD3nIQYXe5h6AV23ZOyWxFk4N3I43q f57KGIfCVQVeirRczuTsgr4gPu3OhEcaMmC3F9oHEA+2fWBXhV888E3F3A3vFhu2YueU XCsA== X-Gm-Message-State: AOUpUlGTJ6/7JWkKFdhD3GjWsqznsf7U1alF+U4qiWrm3SzfO3S75noj +Su2vR0StFcMPCX/ZEjdyWCnqis6dUX2pgOsRu3SHHtAHn4EJcFPIYkVc1DWOsvXHutgya//Bym pKXXOrxsRCqQ+qGVUz6UIHqaPFQHQMOBj1GjLsQftF77jN7/vkSa4YIO01ECD51GzDw== X-Received: by 2002:a37:e216:: with SMTP id g22-v6mr17600314qki.61.1532476544137; Tue, 24 Jul 2018 16:55:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfiSgn6f42WnhV+8aimHl15v145GQlOJqecclKRDqgemUw28YsSZtkCbnAYCTNPXCl7VTzL X-Received: by 2002:a37:e216:: with SMTP id g22-v6mr17600294qki.61.1532476543620; Tue, 24 Jul 2018 16:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532476543; cv=none; d=google.com; s=arc-20160816; b=FP3Xt5oEhEAdYumNncLWgI6+6bsHQxNYociXmTRF8zDVSyuUHcA/qK40dSUTfON1Se 0wXcmbnH2kiaJ3tyaqYAAhZ2Rk5hwklpn3WTefyxXwRxiBATX0KDL/6Cjz2bdAWfZ96S 2HILY7/4jG7WmjQITIJuh1hoAt2FoeCCEouLQ7wEkftlRSeGKrXO1E/1wM+qer+UdiQq 3xgn1F4q7s5g9d5E8eRmikaN9YII6BGAG8GOS4uOryPKMtzrtxPQHrDIw+7jGFCMcu6x SQTiFjn7zopqP/7Llk+piKQV0RnCXkmhYkOQguBSy//ywEjzMz1YtenkT8efnV8Cu96K 2oow== 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=SrZSB0NymPZVESO9mhldWYECRmLCB6Qy+uaRQZPVRjc=; b=zgKuK218379qzb/bA7YQS+dgpxs/teVk0vs5yrd5N6Rsbpnvn0n9jk38WvmetCjV3y 1gtMJ28il+I8bANLUYcRyhj+uZgmzejwayLIzJMnC+Cnu4HySPwPPiFmoIHvSFDhbehY NpsvqeBejibRzS2rArDmFmRbNc5EA9gWWBuRDr4FqtsByD/n9/bOg+rJ02rOIbtRgYTh Re80ho4lcg3dIlec3vrP7uTm4mq0z5G6OyqkykOz1g0pFcwstMxNamgNHSagnsLHJmUc mgZe6wXsTQlhuOc1zVNr0Qn2A01hnSLMBEMGJbedXZmNp5EgNO02y+Phm6VlQ4CdEwG0 EmHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=B46YZsE4; spf=pass (google.com: domain of pasha.tatashin@oracle.com designates 156.151.31.85 as permitted sender) smtp.mailfrom=pasha.tatashin@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from userp2120.oracle.com (userp2120.oracle.com. [156.151.31.85]) by mx.google.com with ESMTPS id x45-v6si9153628qtk.32.2018.07.24.16.55.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 16:55:43 -0700 (PDT) Received-SPF: pass (google.com: domain of pasha.tatashin@oracle.com designates 156.151.31.85 as permitted sender) client-ip=156.151.31.85; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=B46YZsE4; spf=pass (google.com: domain of pasha.tatashin@oracle.com designates 156.151.31.85 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 (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6ONs7RV101361; Tue, 24 Jul 2018 23:55:33 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=SrZSB0NymPZVESO9mhldWYECRmLCB6Qy+uaRQZPVRjc=; b=B46YZsE4AftOTHTdBEZyeU/dy3sSjKdtYUqtOYDKQMgK068KYx0jnjE+SVBzdL42d3sn 1Sz/hG0mtJME5VlDOTgiUFcewEl/HT3VDdDMKtmzN4Af012sCOmbpO9T7WHKVTX5mdhd fa1SMBHfCfbP9bplz7W9SIGXY61dk8qaGfJBlA73LAhWKyHQAGfoK0LwT/x+kYU8Jf0j PhDkfNM+GPtU4LmkvqckbpDdk2vFy+EgHUItRydiPlKqb3BoYlNfVPTXpKY63PotQ47r /bFGWzqeA97wbVlDphUc/3KCn2rZW9Zpv9UZUC/aRWRqGC7o4n8DXeRzJRExN0aW+rLk XQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2kbwfpu7kj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Jul 2018 23:55:33 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w6ONtTWH005365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Jul 2018 23:55:30 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6ONtQ9R025872; Tue, 24 Jul 2018 23:55:26 GMT Received: from localhost.localdomain (/73.69.118.222) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 24 Jul 2018 16:55:25 -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 0/3] memmap_init_zone improvements Date: Tue, 24 Jul 2018 19:55:17 -0400 Message-Id: <20180724235520.10200-1-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.18.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8964 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=686 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807240248 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 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 | 115 +++++++++++++++----------------- 2 files changed, 55 insertions(+), 61 deletions(-)