Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp396448pxf; Wed, 10 Mar 2021 08:25:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxaMX/BCf8b8F9zWvbMSL5TFw8xxhAYl337UEk0GMiQwRpuKiiwk7w1NyfrYnZelGYThooq X-Received: by 2002:a17:906:f0c8:: with SMTP id dk8mr4587483ejb.300.1615393502134; Wed, 10 Mar 2021 08:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615393502; cv=none; d=google.com; s=arc-20160816; b=AKdzD6dYx83AsmYhyJCggZTAuCwVht0emxAmtMUMAv+G87o7LknoeWywc06Xd0/MK2 LtnZbu+1eOyprd6a/jxFDR0zwsn0ZrSjZ41dKJUBK2z/Y0fGYIDK7xqLum6p/5xR8WHO tlAsF2RJ1KswAIevJRALM1Xq3+ueUxpT0IRHrS0ESKv3LvPI53oYGDpYgmUeZwSU+xSP GxTb1mZMTa0Q+ZCWeBUC0QOI92xUqYloBZUKHK3yKPUneeQaOoxNRNTg6oRKjhCzSq01 w4V1B1LhIHVxEFt70YwVIOhYM04RK24rJJgy7n2xf38VchdAqkAAgfztP38xSs3In+ic /qVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZjcsPl8c1NpSuh6kdJ7LYMmcjRYGJQhsfZkCKKU6XuI=; b=n2mWUeDR6h+Hv7WdP+vWnFzH4IvDiyifKUA2V54IBFTL+Pm6fo5XwQKl6IGmDqZ6Qr ua/LUui+lDSfSgqnZe9XwFbPHSmZ88OiCBoUaa88zSW2BQ1hzJSVjKaEvvGo1hcWY7LO r60cRiY13S3tbckH2NkwnElTxpK9e5S/b8f7bhwXb0F+26gevvKMJrEveMAPGXTsP9Qx n4bXsaBr00JvaU6PccJytmL3CWotEtD96c5x8E1na+XiKW5f+KJiluO6PK+roTA3ACl+ IjDoCOnjCPyCNukkTsd8ABt7Bia2rm9Cczxpfkge7vrhktnEzCSJD80N5uRt4PzJ06cb IJXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=vXpPk4nM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si1635749edr.434.2021.03.10.08.24.38; Wed, 10 Mar 2021 08:25:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=vXpPk4nM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229851AbhCJQX0 (ORCPT + 99 others); Wed, 10 Mar 2021 11:23:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:53262 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbhCJQXQ (ORCPT ); Wed, 10 Mar 2021 11:23:16 -0500 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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