From patchwork Wed Aug 22 03:07:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10572563 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 5FF16921 for ; Wed, 22 Aug 2018 03:07:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5286D2A4CB for ; Wed, 22 Aug 2018 03:07:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4367B2B399; Wed, 22 Aug 2018 03:07:53 +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,FREEMAIL_FROM,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 2314A2B393 for ; Wed, 22 Aug 2018 03:07:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2DEC16B2220; Tue, 21 Aug 2018 23:07:51 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2639C6B2221; Tue, 21 Aug 2018 23:07:51 -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 0DFE76B2222; Tue, 21 Aug 2018 23:07:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by kanga.kvack.org (Postfix) with ESMTP id BB6906B2220 for ; Tue, 21 Aug 2018 23:07:50 -0400 (EDT) Received: by mail-pg1-f200.google.com with SMTP id h5-v6so357935pgs.13 for ; Tue, 21 Aug 2018 20:07:50 -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:cc:subject:date :message-id:in-reply-to:references; bh=qB8wQLRm567sPd0BwIEEQEjYlqnBOl4UOSs2cGebjxQ=; b=g31b3OVmoXniNG4PWWD4em4JmmNPMgv63syDsnkft/GmzR0r+lfZihdnsumhkMDtB3 ht3ZzyefjkhquQ7JLyOKN7Odf73hjHM1jBoQDAkR0OJaGt/6BAlr2tn0kLZsS8MkCGKL vCg1nKLID6D2qB/Qyw/KTfFXtP/PUMGtI2A+t08ko3YQxqxFGS+T2UqN2nHlwDqL0xC0 GgSLl0kb/f9MPRMH7Qf9UkVu+yPY8303++N4jGFKvm7tor8XNgzdsUvE7oJWCSsMfLAI N6UdmZKt7vmZXrxjfFq9wBiXFdluImMwZY0De4d//8SGWpfjtDORdTw6BiFF2W1fvI/v vLow== X-Gm-Message-State: AOUpUlFU/WPnXSnEpSsk8yBhcea58gPAFU5OYxqA6hd02p4CGxZzJu1n 47Q+UTPms73VB5mv6oNXtCc/fX4I4MCfqa5pGYcJqtCJBXwDdsqPO2dOYSLvtbevYunVZ20U+ax km6+n9YHZufbPridzkftPo1DFTN14oOTB2Wk+S95vHXLNlPBqO6oWPQCTgdO9MelN8wREZHcS6O k3wt7RUFTmVz3s78jsvbLxxX3FRfeE4L46zYjCWwwcqJeWeuBVl1N4OowQHcX2huf82pK/mpK51 DTHB3gV75xkmFImAJAF3V+V2B9mXNjl9LYBABnlgRTpi2mOPSY/ojKOWc2IEw1ZvzvWrSr8MOqI w0KbS1JFIYVDIpyFD9BpM3o0oH+OgjP1O5NPGkmqB593DpNy5308knhzH+D+QiDCZKoSSyQhagT b X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr53024275plo.81.1534907270407; Tue, 21 Aug 2018 20:07:50 -0700 (PDT) X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr53024237plo.81.1534907269656; Tue, 21 Aug 2018 20:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534907269; cv=none; d=google.com; s=arc-20160816; b=Wxsh2FKvpF+KT3DdPytcOxSLz91p6ZwzZTJLPWUCtW+KC2LR7MfUfN4S4LGY4w6SEH aaLRQazgXJGP9WZ0kqDoK+rJpWWhx+zvHphUDcz0IHIZTRV+3MDnErCmXS38/orNTLVw Jtblbo8vDL3YPc01OlVBVZecyqQoZw8hID3zL2sAPLjDCdNo45rdlT5d1U7pFr7AWc2C 8DU2D9Fz6b3GDYNNe4VpSUvJmyhx7U6buSA+4lCF7AXo9QKeW5wgLicPcuzh3CSkp1nN ZB/Wd766yc+0tRPqxN8hbpdWT++AbmZfV+Mb+j89ChLkqo0O575O1zD11KlM8aFuT+M3 1Ymg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=qB8wQLRm567sPd0BwIEEQEjYlqnBOl4UOSs2cGebjxQ=; b=YqYntuv3Q5TkP7o40jbOA9h04/nQmOhqqUbIMJEgODoa+Us6GWfdkm1k0cQ9G3/bSS GXM9ntyEXTJGefs2guRIPdVelJlvtnloXFZV9GU/rogmiG6EAmszAf1rTgQeYDJZla4M bTplqFnWAzGnvHRaaS2S1VQwIn57hVmZXf5ol6PeZHO4Em6OfRSQgZX5w9UteuJDzqyo 8T2uzxqcNnTRzrGL7/rIyHE258T6GkToSIrdraTP+J5MQMXPRWpeD8Hve6lz/MqsDZ4X p+CdGEyftv76O1Qmfdw5OpezVJ+TV8r9S7xvFkV+mep5uLZSD/o9eXDAQwp10Ol2hir5 U1sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="P/PJBkwE"; spf=pass (google.com: domain of hejianet@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=hejianet@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d33-v6sor129664pgb.146.2018.08.21.20.07.49 for (Google Transport Security); Tue, 21 Aug 2018 20:07:49 -0700 (PDT) Received-SPF: pass (google.com: domain of hejianet@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="P/PJBkwE"; spf=pass (google.com: domain of hejianet@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=hejianet@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qB8wQLRm567sPd0BwIEEQEjYlqnBOl4UOSs2cGebjxQ=; b=P/PJBkwEPMZUsM7aFZSoSuMyZ+ESKprPlOZTIvj+YyTLkNr053ypWmVga5VMc06/2c CR7+mhHGvNik5HsqSTOAxkq1GeZG0sVfo+S2jxkIr91Z4gB91raZ4efl4oEKTLvxc+6T AazzPIqEiuuzu3meJfA1z183Fmn7DymWkBSlrhml//oJ8A0LytS5b3RDIth6VZizrenq fzHYl+0CvECgT+OoM97SsDKLkOpItmsbEzbU2zlnpsz9ms6SqABXr3vO92lbxAYdhtbW 9O1Gye0QNq7JVhqpgqcLppc9JRgbtbLCtC3qAky/acYd7plrEAkAM/+HSGrGyrPVEa/Q 9nHQ== X-Google-Smtp-Source: AA+uWPzJBdDsbSrchc52klfb1DQ0wJelNefkYjsYYabOmrVH5TFk/ERFhQ9F0GfOux4D49sKOkvVLA== X-Received: by 2002:a63:4005:: with SMTP id n5-v6mr10897866pga.221.1534907269416; Tue, 21 Aug 2018 20:07:49 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id q7-v6sm440165pfq.43.2018.08.21.20.07.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 20:07:48 -0700 (PDT) From: Jia He X-Google-Original-From: Jia He To: Russell King , Catalin Marinas , Will Deacon , Mark Rutland , Ard Biesheuvel , Andrew Morton , Michal Hocko Cc: Wei Yang , Kees Cook , Laura Abbott , Vladimir Murzin , Philip Derrin , AKASHI Takahiro , James Morse , Steve Capper , Gioh Kim , Vlastimil Babka , Mel Gorman , Johannes Weiner , Kemi Wang , Petr Tesarik , YASUAKI ISHIMATSU , Andrey Ryabinin , Nikolay Borisov , Daniel Jordan , Daniel Vacek , Eugeniu Rosca , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jia He Subject: [PATCH v11 1/3] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID Date: Wed, 22 Aug 2018 11:07:15 +0800 Message-Id: <1534907237-2982-2-git-send-email-jia.he@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1534907237-2982-1-git-send-email-jia.he@hxt-semitech.com> References: <1534907237-2982-1-git-send-email-jia.he@hxt-semitech.com> 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 Make CONFIG_HAVE_MEMBLOCK_PFN_VALID a new config option so it can move memblock_next_valid_pfn to generic code file. All the latter optimizations are based on this config. The memblock initialization time on arm/arm64 can benefit from this. Signed-off-by: Jia He Reviewed-by: Pavel Tatashin --- arch/arm/Kconfig | 1 + arch/arm64/Kconfig | 1 + mm/Kconfig | 3 +++ 3 files changed, 5 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 843edfd..d3c7705 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1641,6 +1641,7 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM + select HAVE_MEMBLOCK_PFN_VALID config HAVE_GENERIC_GUP def_bool y diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 42c090c..d4119e6 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -777,6 +777,7 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM + select HAVE_MEMBLOCK_PFN_VALID config HW_PERF_EVENTS def_bool y diff --git a/mm/Kconfig b/mm/Kconfig index 94af022..28fcf54 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -137,6 +137,9 @@ config HAVE_MEMBLOCK_NODE_MAP config HAVE_MEMBLOCK_PHYS_MAP bool +config HAVE_MEMBLOCK_PFN_VALID + bool + config HAVE_GENERIC_GUP bool