From patchwork Tue Mar 9 21:40:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 12126599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20116C433E0 for ; Tue, 9 Mar 2021 21:41:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8D5F464FAD for ; Tue, 9 Mar 2021 21:41:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D5F464FAD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BD2888D0050; Tue, 9 Mar 2021 16:41:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B81DC8D000F; Tue, 9 Mar 2021 16:41:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A49688D0050; Tue, 9 Mar 2021 16:41:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0127.hostedemail.com [216.40.44.127]) by kanga.kvack.org (Postfix) with ESMTP id 8CDF58D000F for ; Tue, 9 Mar 2021 16:41:13 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4A1971E1C for ; Tue, 9 Mar 2021 21:41:13 +0000 (UTC) X-FDA: 77901656826.20.CC3ED17 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf12.hostedemail.com (Postfix) with ESMTP id 79C1AF0 for ; Tue, 9 Mar 2021 21:41:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 83297AFF1; Tue, 9 Mar 2021 21:41:11 +0000 (UTC) From: Oscar Salvador To: Andrew Morton Cc: David Hildenbrand , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Michal Hocko , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador Subject: [PATCH v6 0/4] Cleanup and fixups for vmemmap handling Date: Tue, 9 Mar 2021 22:40:46 +0100 Message-Id: <20210309214050.4674-1-osalvador@suse.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 79C1AF0 X-Stat-Signature: 4i76kbthnezu5oznseieqqa9448h7d36 Received-SPF: none (suse.de>: No applicable sender policy available) receiver=imf12; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1615326069-183487 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: Hi, this series contains cleanups to remove dead code that handles unaligned cases for 4K and 1GB pages (patch#1 and patch#2) when removing the vemmmap range, and a fix (patch#3) to handle the case when two vmemmap ranges intersect the same PMD. More details can be found in the respective changelogs. v5 -> v6: - Fix some compilation errors when !CONFIG_MEMORY_HOTPLUG (Reported by Zi Yan) - Collect Acked-by from Dave v4 -> v5: - Rebase on top of 5.12-rc2 - Addessed feedback from Dave - Split previous patch#3 into core-changes (current patch#3) and the optimization (current patch#4) - Document better what is unused_pmd_start and its optimization - Added Acked-by for patch#1 v3 -> v4: - Rebase on top of 5.12-rc1 as Andrew suggested - Added last Reviewed-by for the last patch v2 -> v3: - Make sure we do not clear the PUD entry in case we are not removing the whole range. - Add Reviewed-by v1 -> v2: - Remove dead code in remove_pud_table as well - Addessed feedback by David - Place the vmemap functions that take care of unaligned PMDs within CONFIG_SPARSEMEM_VMEMMAP Oscar Salvador (4): x86/vmemmap: Drop handling of 4K unaligned vmemmap range x86/vmemmap: Drop handling of 1GB vmemmap ranges x86/vmemmap: Handle unpopulated sub-pmd ranges x86/vmemmap: Optimize for consecutive sections in partial populated PMDs arch/x86/mm/init_64.c | 203 +++++++++++++++++++++++++++++++------------------- 1 file changed, 128 insertions(+), 75 deletions(-)