From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 2AE40C433E0 for ; Wed, 10 Mar 2021 16:23:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A817764F40 for ; Wed, 10 Mar 2021 16:23:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A817764F40 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 323F58D01C9; Wed, 10 Mar 2021 11:23:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D4798D01A6; Wed, 10 Mar 2021 11:23:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19C658D01C9; Wed, 10 Mar 2021 11:23:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 008258D01A6 for ; Wed, 10 Mar 2021 11:23:21 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id AD20C82499B9 for ; Wed, 10 Mar 2021 16:23:21 +0000 (UTC) X-FDA: 77904484602.15.38A6ED4 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf25.hostedemail.com (Postfix) with ESMTP id C342A6000116 for ; Wed, 10 Mar 2021 16:23:15 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1615393395; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZjcsPl8c1NpSuh6kdJ7LYMmcjRYGJQhsfZkCKKU6XuI=; b=vXpPk4nMksjsPTm6wnCe/gPNciZkJNGEefix5jvb3KFs6tXbBoy+hl+zdTf3kMMJ+cY5h8 olKivXhawvrubG2/NzLPA+3ZCj2zZvbNQQhJIfnW/lZBTLERsZMXaRF/m3w1GbOM1R1/4a yiNcWczNI5F5gz9LJlaD+4SjW7Sqs68= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A8B15ABD7; Wed, 10 Mar 2021 16:23:15 +0000 (UTC) Date: Wed, 10 Mar 2021 17:23:09 +0100 From: Michal Hocko To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Hildenbrand , Oscar Salvador , Zi Yan , David Rientjes , Andrew Morton Subject: Re: [RFC PATCH 0/3] hugetlb: add demote/split page functionality Message-ID: References: <20210309001855.142453-1-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210309001855.142453-1-mike.kravetz@oracle.com> X-Stat-Signature: h59kxzcebzk5jtcebb4secir3ho3y4ef X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C342A6000116 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf25; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615393395-468586 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: On Mon 08-03-21 16:18:52, Mike Kravetz wrote: [...] > Converting larger to smaller hugetlb pages can be accomplished today by > first freeing the larger page to the buddy allocator and then allocating > the smaller pages. However, there are two issues with this approach: > 1) This process can take quite some time, especially if allocation of > the smaller pages is not immediate and requires migration/compaction. > 2) There is no guarantee that the total size of smaller pages allocated > will match the size of the larger page which was freed. This is > because the area freed by the larger page could quickly be > fragmented. I will likely not surprise to show some level of reservation. While your concerns about reconfiguration by existing interfaces are quite real is this really a problem in practice? How often do you need such a reconfiguration? Is this all really worth the additional code to something as tricky as hugetlb code base? > include/linux/hugetlb.h | 8 ++ > mm/hugetlb.c | 199 +++++++++++++++++++++++++++++++++++++++- > 2 files changed, 204 insertions(+), 3 deletions(-) > > -- > 2.29.2 > -- Michal Hocko SUSE Labs