From patchwork Wed Feb 17 10:08:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 12091263 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 9C366C433DB for ; Wed, 17 Feb 2021 10:08:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 193E864E42 for ; Wed, 17 Feb 2021 10:08:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 193E864E42 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 7B2228D002E; Wed, 17 Feb 2021 05:08:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 73B368D0019; Wed, 17 Feb 2021 05:08:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 650E98D002D; Wed, 17 Feb 2021 05:08:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id 4F5878D0019 for ; Wed, 17 Feb 2021 05:08:28 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 15C871F06 for ; Wed, 17 Feb 2021 10:08:28 +0000 (UTC) X-FDA: 77827335096.19.comb47_5b0e8f32764b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id EC7BD1AD1B5 for ; Wed, 17 Feb 2021 10:08:27 +0000 (UTC) X-HE-Tag: comb47_5b0e8f32764b X-Filterd-Recvd-Size: 2139 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Wed, 17 Feb 2021 10:08:27 +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 1BC93AFE1; Wed, 17 Feb 2021 10:08:26 +0000 (UTC) From: Oscar Salvador To: Andrew Morton Cc: Mike Kravetz , David Hildenbrand , Muchun Song , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador Subject: [PATCH 0/2] Make alloc_contig_range handle Hugetlb pages Date: Wed, 17 Feb 2021 11:08:14 +0100 Message-Id: <20210217100816.28860-1-osalvador@suse.de> X-Mailer: git-send-email 2.13.7 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 is the new version of [1]. RFC -> v1: - Drop RFC - Addressed feedback from David and Mike - Fence off gigantic pages as there is a cyclic dependency between them and alloc_contig_range - Re-organize the code to make race-window smaller and to put all details in hugetlb code - Drop nodemask initialization. First a node will be tried and then we will back to other nodes containing memory (N_MEMORY). Details in patch#1's changelog - Count new page as surplus in case we failed to dissolve the old page and the new one. Details in patch#1. I already have a patch that uses the new alloc_and_dissolve() from hotplug code, but I decided to leave that patch out until this patchset is settled. [1] https://patchwork.kernel.org/project/linux-mm/list/?series=429833 Oscar Salvador (2): mm: Make alloc_contig_range handle free hugetlb pages mm: Make alloc_contig_range handle in-use hugetlb pages include/linux/hugetlb.h | 7 ++++ mm/compaction.c | 21 +++++++++++ mm/hugetlb.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ mm/vmscan.c | 5 +-- 4 files changed, 124 insertions(+), 2 deletions(-)