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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5D5FC77B7A for ; Wed, 7 Jun 2023 14:40:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2683E8E0003; Wed, 7 Jun 2023 10:40:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F03E8E0001; Wed, 7 Jun 2023 10:40:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 091B78E0003; Wed, 7 Jun 2023 10:40:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E711F8E0001 for ; Wed, 7 Jun 2023 10:40:55 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 9B14F1C7720 for ; Wed, 7 Jun 2023 14:40:55 +0000 (UTC) X-FDA: 80876213670.14.1F8A542 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf09.hostedemail.com (Postfix) with ESMTP id 05B5E14001B for ; Wed, 7 Jun 2023 14:40:50 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=fmsEaeQ1; spf=none (imf09.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686148852; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vKk6Y1xyuIGcns4yf/0ZQkH0qbWMcWARbSOqv+RpSCs=; b=Ijd/Iml85+NfTNEqyb3uDMgS5vuyuhSM1/w23h5zWAqDl99snpZnLRe0b4WSg8NHpo51dX XItFtfxhd9r5o2A/pnLe1ZbTx+ruMy7Ry3mZKfpck6aMEMHO1Yfvlv//vZPchaugX62ZHp siuV/a7zX1nnP4xia1HuVVeQrAK8kAU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686148852; a=rsa-sha256; cv=none; b=YnQuzoDHrISYwWLJE7WRoe+u8IOLonZRUGQst3LcU9J2z6q4KiM38dhZ778pwg/NzhB0RM y4AgbRPYlMtMJbwY6PLGbnkrqmdlG3re4KjWgcsnRdKb/9ktMwyzWBof7D2HhR0H2NZYwd v2oo39bmJrq3gSLy63VkormYzY3u0yY= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=fmsEaeQ1; spf=none (imf09.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vKk6Y1xyuIGcns4yf/0ZQkH0qbWMcWARbSOqv+RpSCs=; b=fmsEaeQ1OoqGPtvfDSLzUqEgm3 /xsd1551soHMeEJnsMzZk8t7fh/A8o76KHXgs5q4TuTKgQrTJ9T6nXjCSztqBpnGY7KHWFoATw/PN bmAX67lvP2iFsWKsOXSVSkHzWvOgFbNDkgLqRkbyQTQQEUepEhdcWO/VuoknWD+jcccIwrrpJLddR K+DXrGUeXHa1POJIpqJpyjWGu6NGHU7HopIKuGBYEGmzx7atbDra39wq1Hw/piQFCUjpmVEn6FGWU i5AEUgn9hjQcpKNmOiBCoQd27eCSbGSveXH33ePYg3GNzzplCVur0WDBbGakJK0Mfy1WEx+mOIJ2S LC8s5j8A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1q6uKZ-00ELXv-Fc; Wed, 07 Jun 2023 14:40:11 +0000 Date: Wed, 7 Jun 2023 15:40:11 +0100 From: Matthew Wilcox To: David Hildenbrand Cc: David Rientjes , Mike Kravetz , James Houghton , Naoya Horiguchi , Miaohe Lin , lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, Peter Xu , Michal Hocko , Axel Rasmussen , Jiaqi Yan Subject: Re: [LSF/MM/BPF TOPIC] HGM for hugetlbfs Message-ID: References: <20230306191944.GA15773@monkey> <20230602172723.GA3941@monkey> <7e0ce268-f374-8e83-2b32-7c53f025fec5@google.com> <7c42a738-d082-3338-dfb5-fd28f75edc58@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c42a738-d082-3338-dfb5-fd28f75edc58@redhat.com> X-Rspamd-Queue-Id: 05B5E14001B X-Rspam-User: X-Stat-Signature: 3ehn4bgadm1nfwqo3kazupxiy6n4p3nm X-Rspamd-Server: rspam03 X-HE-Tag: 1686148850-718088 X-HE-Meta: U2FsdGVkX18uODC1kzwMrAJW4Y2pzOA7jli431PqrVjYXyjtTBjdMZjMOvjB1qq7wbgFWipULDjdR+Yk7qLZJ/046uBj91DXNshW6tVNyXRO56jrewsGJh81iX/cxODi4b/yC1J3LZxdSB1Oy4tU/qK/Q/r0xsl+nGz8v1Nl0Q+SViMJtIehKoEn7L8DTOlOKwRc93QT3JlzCmODyAGr666grgUVAu6fR0kbLOJWDygDpL9XmE+4ukH8+z+x9T184T/AS44Ez8iGKqDsmm2ThZdk7JZPhYbjsrf4/S7+AkUq0j5T+BCPxCGREpDerZ4D6tBg1xITbC/Si4AsbIukxaU4gETXOlukvXUwLztcSRDKIIll6EDugIkjbkmz5/cTezIxlUFBkv07haZ62365Azdf4h1JiOxeprLcCptA1g2C4ycJnoO5dlLbCaemYYYYQD2Mm+9tmBlmK7zhPCuBErqXYwYozutRexlPk14QCs0QqYPLc4ItYgyTde1s3l7GDzJzo5bEZNWH25ddyKH3Kp6EJah1JbatT5ogv2IvEhiV+w8Qc3r/HrTPuw+7iNBehy2dGX4aQCU4fEvfDgNWB6yxZ9B1ngoiDJyeK/Nv/Bzog5ahUynfWeThljduKXy1Jc1VWPkzA2IDTb9ywz1fHSuG0KCe4cSHGG8uTPu5BQyMlVTiFdwsj2RkSJg+A/7aLj9lmsEhPVkddpGHGXcpbLa+H2kfWGzizxFklbTl8SDRAC5h4uh5HR0z/jYjfJ1Egi0eyRET+0v4KkPn1TZ0nUaYeC92reJp0G+3BcgSY6B7wAo/xvAVsxeXCOy4EZmWXLQUQIlouYIOjob+DOaVgbcG+IxnwT0p5EbyMQF+I34K+b3dRkQJcyfkaO/5alQpcanzU3l1TUNfiixZbkcgB6BeX5sfjuE44UeJ2Oz/BGcAZ0dLrQQE2qG/xrBUcbk4ZxELtOa3aAs2J38ArbX Rym+UeJZ o7NHUYrVRzmHsDvQ6zmqzXISPJmqjUNKkwBsbas1wg3uTibb/ZL8w6tnZMQjY/UclFLt2+o2T2VUS0jp42a2ALxHPa4iRQEvwbpAISHfSU+ksFk1bOdogoM0nyQxJ+hTrQcyCSyPLgMNT7CI= 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 Wed, Jun 07, 2023 at 09:38:35AM +0200, David Hildenbrand wrote: > I don't want to get too involved in this discussion (busy), but I absolutely > agree on the points that were raised at LSF/MM that > > (A) hugetlb is complicated and very special (many things not integrated with > core-mm, so we need special-casing all over the place). [example: what is a > pte?] This is somethign that absolutely does need to get fixed. It's one of the big sources of complexity and confusion around code that is supposed to work with both hugetlb & THP. I understand why hugetlb originally said "everything is a pte", but THP went a different route, and I think hugetlb now needs to follow. Fixing pagewalk.h to not be complete garbage would be a good start. I can elaborate more along these lines if someone's actually going to put in the work to do it. > (B) We added a bunch of complexity in the past that some people considered > very important (and it was not feature frozen, right? ;) ). Looking back, we > might just not have done some of that, or done it differently/cleaner -- > better integrated in the core. (PMD sharing, MAP_PRIVATE, a reservation > mechanism that still requires preallocation because it fails with NUMA/fork, > ...) It'd be nice if people engaged seriously with the efforts to move that functionality into the core. eg mshare. Saying "Oh just share the hugetlb implementation" is not serious engagement, it's an indication you haven't been paying attention to what the needs are. I haven't looked at the hugetlb reservation mechanism in enough detail to be able to understand why people use it, what they actually want, and how it could be done better in the core. Maybe somebody else could do that.