From patchwork Fri Jun 29 02:29:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10495521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0456D602B3 for ; Fri, 29 Jun 2018 02:30:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E44892A6B0 for ; Fri, 29 Jun 2018 02:30:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D76662A6E0; Fri, 29 Jun 2018 02:30:19 +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 BD96D2A6B0 for ; Fri, 29 Jun 2018 02:30:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CBB886B0007; Thu, 28 Jun 2018 22:30:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C6C0E6B0008; Thu, 28 Jun 2018 22:30:17 -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 B5C186B000A; Thu, 28 Jun 2018 22:30:17 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f197.google.com (mail-qk0-f197.google.com [209.85.220.197]) by kanga.kvack.org (Postfix) with ESMTP id 8A9D56B0007 for ; Thu, 28 Jun 2018 22:30:17 -0400 (EDT) Received: by mail-qk0-f197.google.com with SMTP id f132-v6so7811049qkb.12 for ; Thu, 28 Jun 2018 19:30:17 -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=Lj3wRwFhiqvhjk9/PgujvZmJv6KMETqTDZpMlyrN0qo=; b=OGE2qoSr0C6Nm/jcu7pK9wPjw1jlpW8sTG3DlMaN92v/Qu5wAK9NEGfAOUD/XgGCSN I9k7ea6G/6gvpjhQTvICfG5WtWQpAnssPndDjX00ZcGCMf5t5Tf6teSVnzVfhTkAlSB0 Z8qkfWGAl0UbmIwcsJwOwF5//B0qdoCDuVuJl6y4rems09ucx/vRi3Oyjx3dgq9OhJrk h0vGM3idPq6d7bLunLejyXswPtUPVfMmumBxajTMUhmN1q0wYHf90tWMcEKma9CmTsNZ G+n3pSmuToht/zsJUYAksPJDg6EuLWTro/OQGGdL7+0/qZB3ZfSsHg6pRzkPFzArEmMz rp7Q== X-Gm-Message-State: APt69E2K8/zSKze6/OGaxV7dUIYuq/rh5SnnFqJk2+ZHmy6l25/5ELcV pgMb/PVdDJ9ddAwFU9e0kumpl7jN5+KV6A5N8sRaflWZfFks5WDTmOFQDrtoVgaM8s0+b8sH8XJ Vrdu8Sp//TLkpaWoz67Qu9nzqF2+LP1zIcnviGOs9u6LfFhONIQlPz1bwmeeWRnXffB/LtX9RCg p6jgZRte8vVGlcsPQ8gB9LWK19kaioRMQbI2QAX1f80lXJJzP2JG90kbGcSt94+U4IJ7F00FVcw HrbQf98fntYki2nOsCdYyte4Hv0gpCA3cUtaqYwDmvZijuLol43Ib6E2YaZtJYOAgc6HKPeiW4v HiwpzG+7gpFfiEUV8aq1KbvvKpQyVR4pZ7apKFXP7TCi0jLZSfEbyZebiFXrkuHU3vfj4qy4oR9 v X-Received: by 2002:a37:c91b:: with SMTP id q27-v6mr11348232qki.397.1530239417355; Thu, 28 Jun 2018 19:30:17 -0700 (PDT) X-Received: by 2002:a37:c91b:: with SMTP id q27-v6mr11348209qki.397.1530239416764; Thu, 28 Jun 2018 19:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530239416; cv=none; d=google.com; s=arc-20160816; b=byk8Tu7w9WZcSoxvOlNs/NG2arJVpzqJ7gidGEs7hqINTKSvuxim22RzpW9E5PCMlG w8WVH4smqalqzEM/patk70bdIUFu6NMYTJWA6eXvZjVBrIxwlre1jIsEYWJ5V+Msj8ub td5LMkYM9oRCdC3t8x3stvPWe60mehOtNQDnUadPV3GP8nXsZdKvX1ji1VDtQtUh+Fl4 qpymmvW18RAxY2uYpnBHN4PkXxG1wN46llEFX+58QNrEoQmLNgFDBLNt0PSCJIYTbuW8 MYZCCnXwG05yBVJrzX1trVU+b5ycVxqqOZKIZocWY6o/GFB4xm9zC+alzDxhz0CjiwF0 lGYQ== 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=Lj3wRwFhiqvhjk9/PgujvZmJv6KMETqTDZpMlyrN0qo=; b=ISynedxReQZKBozeEFHzRL5fyjqd1hbDVerr44VF/OhzOWf7k7tdwZy/CcPuhmoxrD ysYTROuopMVB78uONhP/jJ9wPj2Cmb/vLmSgaRtcF1eR6FU6hQAcMNLeID+d2chydLDj N4Z1yqPlN0cUm9/If/tDzzILEbT+DSqi2Z59o0TBdfAR5gVpDL5nSBrPJEvy4ecDWjKl +h5XnwCGZdcZLHc8Rl/jOW1UEbpfPGj8p9OA/bg1L3qBqRAsq3RZnBOuMUKQG4Vwbk8G ShRptFbbXYDsBoFfpYUgf1TR8BX0YHJC4LeGbq8UJlJNK+TX8Rfl58Y0MiqcQ9q8h21Z r00A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FUwYH8qv; 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 q10-v6sor3721131qva.73.2018.06.28.19.30.16 for (Google Transport Security); Thu, 28 Jun 2018 19:30:16 -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=FUwYH8qv; 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=Lj3wRwFhiqvhjk9/PgujvZmJv6KMETqTDZpMlyrN0qo=; b=FUwYH8qvWlWiDTh3HYwdv6ocoY5tW7AjZEkl8G/MK3GhowSOE1z2Vgonn28QwioLXi h4UmTJ19o6m92F3QkZ5E6fX94lhaSPN/c7cT7HNZ5KzXvA2bIkbgtOxJ2/h2dKf3Rk5l M3fY2i5jo/gJEPt6X2oBY4TxmZ3g899AE04I+Tkw6NkTCfgNhjg2cpOvI6c2YQowqhtS iaSL5bqsnUmVSKkTSTD3A8O4b6RO6CSWrdJvKgL2LiZOav5VLTz1rtVv8sG4I6uY1F8V pz3oHw3jpOLTHK0oiPWa3DjYIFthkVn1QQs9RHzEogIzTiU2oSk7UqZXRwQphvLRgi63 ZHxw== X-Google-Smtp-Source: AAOMgpcr15tvzrmotL7YCPhxKeazfX+vkZljcNp1aj4CmaZJ6NHnr6pVvuLaX4r56q2a2S7YTU4HsA== X-Received: by 2002:a0c:b20e:: with SMTP id x14-v6mr11561299qvd.46.1530239416593; Thu, 28 Jun 2018 19:30:16 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id y25-v6sm6390186qtc.48.2018.06.28.19.30.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 19:30:15 -0700 (PDT) From: Jia He To: Russell King , Andrew Morton , Michal Hocko , Catalin Marinas , Mel Gorman , Will Deacon , Mark Rutland , "H. Peter Anvin" Cc: Pavel Tatashin , Daniel Jordan , AKASHI Takahiro , Gioh Kim , Steven Sistare , Daniel Vacek , Eugeniu Rosca , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, James Morse , Ard Biesheuvel , Steve Capper , Thomas Gleixner , Ingo Molnar , Greg Kroah-Hartman , Kate Stewart , Philippe Ombredanne , Johannes Weiner , Kemi Wang , Petr Tesarik , YASUAKI ISHIMATSU , Andrey Ryabinin , Nikolay Borisov , richard.weiyang@gmail.com, Jia He , Jia He Subject: [PATCH v9 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID Date: Fri, 29 Jun 2018 10:29:18 +0800 Message-Id: <1530239363-2356-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530239363-2356-1-git-send-email-hejianet@gmail.com> References: <1530239363-2356-1-git-send-email-hejianet@gmail.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 | 4 ++++ arch/arm64/Kconfig | 4 ++++ mm/Kconfig | 3 +++ 3 files changed, 11 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 843edfd..7ea2636 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1642,6 +1642,10 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM +config HAVE_MEMBLOCK_PFN_VALID + def_bool y + depends on HAVE_ARCH_PFN_VALID + config HAVE_GENERIC_GUP def_bool y depends on ARM_LPAE diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 42c090c..26d75f4 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -778,6 +778,10 @@ config ARCH_SELECT_MEMORY_MODEL config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM +config HAVE_MEMBLOCK_PFN_VALID + def_bool y + depends on HAVE_ARCH_PFN_VALID + config HW_PERF_EVENTS def_bool y depends on ARM_PMU diff --git a/mm/Kconfig b/mm/Kconfig index ce95491..2c38080a5 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