Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp199262rwj; Thu, 22 Dec 2022 06:44:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXuOJM1rXHu0Gzsr5v2wjGJleAgz6eHOy5zzRxtNAttiiz9r3WQk4/sAaqUfqM/BQCihUqG2 X-Received: by 2002:a17:90b:250b:b0:21a:4bf:eeb0 with SMTP id ns11-20020a17090b250b00b0021a04bfeeb0mr6664795pjb.28.1671720291639; Thu, 22 Dec 2022 06:44:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671720291; cv=none; d=google.com; s=arc-20160816; b=ylacGTCQIRi7JBhLtL/RLSEwIMKvMm7SRFAN1aoATKB71br/DvilLs5Kg/RdpKpHAN FleG9S3swDPjL5+xyej/mqrzlIa46HIWaol4+M8aEEZDpZQkEMxLgISzAaSk/pi7tYCd +hRkDAd3YjIIr/8SMT7W+6Wv5AZJ+f0tIb0+Aj1C5qBlnvn8+ju80Rr/6yHSgxKV3Je0 yXY2uaDrwsK7EqdZPI/JUzpmri1gdSp8RmpRb0+o7ukKci9FryWxWVFr+BnGqaIkP1KQ e6IE49Pq1+jQhmHE5w+6J9hfjyZ75zbCN2r53WvJPfM6gconhdgHczqoT0M2PYg0yRPT 9a/A== 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=HsPZCMVpzYDswKegA5+aIxMzLBPMDR8IghZms8lnOTE=; b=pHQ0p9EhxgbSE+Q6WhYl7dS8ZerxH5hrYJYVH++tq1RiXGH7crp4ImpOFH/bRIjdrq Sdg8xJxcXb9IjXZHN1R10foz/y1ioKARKplUfGWqxKk4bqiVNEQS9jyHE8zUwanAwh+a pv97GKn413wSQjKng8VMZKac9qAHb6koA/P+Shl8qhWf/CVqM81ziPjE5w3PR1LMO1g7 im3FwRf0kYzeH45d/pysZtSJYDEZdc0p8n5KHLVm8jFZi5q05W9seZgD0UElMevCLqLV pl/hSdIdmghggrZggwzq94NjfWx+zxo6pIRI9P+GCe+kdLi6gnsiU8i8TK6dHi0MMVCI Nb6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CN3F00G3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm1-20020a17090b3ec100b00218592c28casi5292369pjb.33.2022.12.22.06.44.42; Thu, 22 Dec 2022 06:44:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CN3F00G3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbiLVObW (ORCPT + 67 others); Thu, 22 Dec 2022 09:31:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbiLVObT (ORCPT ); Thu, 22 Dec 2022 09:31:19 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05AF62A247 for ; Thu, 22 Dec 2022 06:30:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671719433; h=from:from:reply-to:subject:subject: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=HsPZCMVpzYDswKegA5+aIxMzLBPMDR8IghZms8lnOTE=; b=CN3F00G33qtE3mAt7M5eR2be016yF5wbameqSoctJV/Tfkk5c07HZldkGZZqPHie44sNBi AKKo2P2VBmEimX8AWmfdWjzdPkKfbKovWOWH8VxWjAlC9RCIkQCypO5gXaRwpzrD/FhdKl ZGN0M4vtaPsn6qv9shFFXLNYonnX53c= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-108-y4O1joU7OCqSjMcePJFsUw-1; Thu, 22 Dec 2022 09:30:31 -0500 X-MC-Unique: y4O1joU7OCqSjMcePJFsUw-1 Received: by mail-qk1-f197.google.com with SMTP id bm30-20020a05620a199e00b006ff813575b1so1284817qkb.16 for ; Thu, 22 Dec 2022 06:30:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HsPZCMVpzYDswKegA5+aIxMzLBPMDR8IghZms8lnOTE=; b=Icg1b/EikwFI+xYbbMvfi3bR52QElfAMM1NYygLt5z0xpM33gueuy4e7agc4h3mGU/ 8HePEhLoemDGU1RJMzzfppGfJE7pH/WTtfM9SQiHKdQ6sIiPFZP9bcPVTLA5EcE4MwNK cXdgrAB3953GvoIphSlekx4lcx3G0kGLn1Nhs/iYq6TIuY4RBxsv9cD07a9tmlE/cJry 5QnHiQQAqbabL9fqBHc36u8eXkBcztmckQoxTRLhsbQpDLH57GcrPSGMhBXA/w5V6t/s SKR/dkavtcC/3d1zcUJJuw+LVIcMeIVgpoO8O+cjROqi/reULsBZDqE8KSjqzEdY8VGb II+w== X-Gm-Message-State: AFqh2kr1UY241n2h/edbMQ/jyZB6YXoi7yfo68wlUEsaI4kFj9osCxl2 Vd17tqsMm8Vv8apNrr9CtINWYHYWdVSDdut8Iq1Z2nnhxUOyi47guzSJ0YNuIR6+Psq+cwmimo2 ev6rL/cBjy0TQrUYe2WwA39YG X-Received: by 2002:ac8:6b8b:0:b0:3a7:e91e:60fd with SMTP id z11-20020ac86b8b000000b003a7e91e60fdmr7374537qts.62.1671719430523; Thu, 22 Dec 2022 06:30:30 -0800 (PST) X-Received: by 2002:ac8:6b8b:0:b0:3a7:e91e:60fd with SMTP id z11-20020ac86b8b000000b003a7e91e60fdmr7374513qts.62.1671719430325; Thu, 22 Dec 2022 06:30:30 -0800 (PST) Received: from x1n (bras-base-aurron9127w-grc-45-70-31-26-132.dsl.bell.ca. [70.31.26.132]) by smtp.gmail.com with ESMTPSA id dt17-20020a05620a479100b006fbf88667bcsm369321qkb.77.2022.12.22.06.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 06:30:28 -0800 (PST) Date: Thu, 22 Dec 2022 09:30:25 -0500 From: Peter Xu To: James Houghton Cc: Mike Kravetz , Muchun Song , David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Zach O'Keefe , Manish Mishra , Naoya Horiguchi , "Dr . David Alan Gilbert" , "Matthew Wilcox (Oracle)" , Vlastimil Babka , Baolin Wang , Miaohe Lin , Yang Shi , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 33/47] userfaultfd: add UFFD_FEATURE_MINOR_HUGETLBFS_HGM Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 21, 2022 at 08:24:45PM -0500, James Houghton wrote: > Not sure what the best name for this flag is either. MADV_ENABLE_HGM > sounds ok. MADV_HUGETLB_HGM or MADV_HUGETLB_SMALL_PAGES could work > too. No need to figure it out now. One more option to consider is MADV_SPLIT (hopefully to be more generic). We already decided to reuse thp MADV_COLLAPSE, we can also introduce MADV_SPLIT and leave thp for later if it can be anything helpful (I remember we used to discuss this for thp split). For hugetlb one SPLIT should enable hgm advise bit on the vma forever. Thanks, -- Peter Xu