Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3479159rwl; Tue, 27 Dec 2022 09:42:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXtAcvTtnYWlvSCCp6JMIsoZ4rdi7uLvtXj083gNY98Qb12ICBnixMaGMGlCex4bjb0+/flg X-Received: by 2002:a17:90a:c213:b0:224:5f8a:52e4 with SMTP id e19-20020a17090ac21300b002245f8a52e4mr25190583pjt.9.1672162967838; Tue, 27 Dec 2022 09:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672162967; cv=none; d=google.com; s=arc-20160816; b=YJCGW580Hw6Y2IpbKayxPZaCEtsF5lDo+FZ9skkAcLPCnZds1XlKYh5BJ+iYNaoqwz JOq1JMoBirSK2AoFh2mL8DsQ6zfNNaA2XHgtysPTCtDf26KXdFp5c0VJXIFV1WfWRh2o PbOqpCramcrpH+nxQcy37+qYYq1V7tUvNFQ1c7Zbk8OzIK2umMHIjvJfZWxfmRNqINGX 488Ug5MVYzNFH3X4FwIqz8WaY/sSvD7gqxjm911xScZEs6GiKQaHEe7x7p8qVALSOZtX 6WL3ydUJtrJLvjhF0NniUPtGTV0MCLYizKR3sO89B6S6MyusbQf3JkdELPC3a7smMu/V 15DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9wRW7TKueArBUfnnmbZEuYC3CJj8NI6TnvFxQoqEUT0=; b=HqAqU1i8VLS+ekr8AYcWnYKRPmlV+KVH52a+KRTu5k9gfTc9VESq4eiYRVMFeuiZe/ 2L1c6QZS6a2MlMg3d4CCIJaZQLcGHmtqN3lYaYjNzqqtqADe5gQQMh5ZGN6l7H9EY8/d tYJjwCrUGM3HaKZLwpvSFwyaFfd/g49ahvizEw6uL1bHlGFADWAVZp4/KRMaqpyHZgAz bLEW/xQGRoOGn5cctOggszLK2brKOVRMet0v3PjBtQF2WmWIdwYEwlDS6FsMDwC/Z7Fd cXmXKmbDGmwCNz5WlkPTfnHHGjvINLo6ZrH0Hq/Ujhot/QTRUkW6QWBLTQgopt7YkmhB CGoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=d+xPdL7c; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id il5-20020a17090b164500b00223c0f9570fsi15228419pjb.12.2022.12.27.09.42.39; Tue, 27 Dec 2022 09:42:47 -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=@google.com header.s=20210112 header.b=d+xPdL7c; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231478AbiL0QjO (ORCPT + 66 others); Tue, 27 Dec 2022 11:39:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbiL0Qip (ORCPT ); Tue, 27 Dec 2022 11:38:45 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06299BE21 for ; Tue, 27 Dec 2022 08:38:45 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id y8so12825467wrl.13 for ; Tue, 27 Dec 2022 08:38:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9wRW7TKueArBUfnnmbZEuYC3CJj8NI6TnvFxQoqEUT0=; b=d+xPdL7coIPZRO5nn3egLZtv3PN3VOJ1gOzyBA88vkN76zmYEbmNdb7rYq3FKGyYib 2iOrcnGeRaD4g6aVanQdshfYBFpmcmkZk3xaTZgYTYkR+o5teU0meZ2Nml2vsrXU04h5 NOTcMmDdprrOZFPXI+uRWD3nX4cRr18qmGbwJOymdbC8EgUkyVEIG2rtv7BsToVxi2Yp GIF5Ped4Rh1RWbRTDe8BL4VPvbQemc6yd98J44QhIKFibik3LmMw5RmNvx0Yb7xxjdiW 5XWacGwoRjdndljAlRWYgdrLkZLpf93vpyhXVqYv5WMU9KpAhIMjpvmertNO0e6zylMa A9WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9wRW7TKueArBUfnnmbZEuYC3CJj8NI6TnvFxQoqEUT0=; b=qjvyFHxdEF3dFrhb21GFlvIN4PC7rISMCVKSpZBLTIz5tBlcEx1D/TQmqk7yqydGGk l4S3g381gYxnC2GGhATSJKPSjHQBjN9QWeNoWSlfsFcuc645hMSEW4oPO2aIxavnf2pB lAcbVol7NBn/8mQobpKSg3A9zipcFFQWnJuSp40mEAGC5obdZD+DPgh0pXR7U5R1pfmU 18VvBLDlIisFpUuQmpcf/XhBiyGmVJVKfcTZQX0kOChZwE9IHSUPWtx9v6SYx2caWinu 5fiDQWzgIpKWom0KoJUyQEDuYdEtKJOuDYf619PlBf10KoRDsobsXoSzbhzVspPOW7xe mG0g== X-Gm-Message-State: AFqh2koV3+JE90vJptxhyUBsmKpT/Mqvmk7J2VmV1KgAdtHAD/+uRU3t XY65CyJMeZy3nbCM1EeN7ErNi5ANMxchWgNJVo7tmg== X-Received: by 2002:a5d:4574:0:b0:272:859c:54fb with SMTP id a20-20020a5d4574000000b00272859c54fbmr604144wrc.355.1672159123482; Tue, 27 Dec 2022 08:38:43 -0800 (PST) MIME-Version: 1.0 References: <20221021163703.3218176-1-jthoughton@google.com> <20221021163703.3218176-35-jthoughton@google.com> In-Reply-To: From: James Houghton Date: Tue, 27 Dec 2022 11:38:31 -0500 Message-ID: Subject: Re: [RFC PATCH v2 34/47] hugetlb: userfaultfd: add support for high-granularity UFFDIO_CONTINUE To: Peter Xu 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Fri, Dec 23, 2022 at 1:38 PM Peter Xu wrote: > > James, > > On Fri, Oct 21, 2022 at 04:36:50PM +0000, James Houghton wrote: > > + bool use_hgm = uffd_ctx_has_hgm(&dst_vma->vm_userfaultfd_ctx) && > > + mode == MCOPY_ATOMIC_CONTINUE; > > Do you think in your new version use_hgm can work even for MISSING by > default? I don't think so -- UFFDIO_COPY will allocate a hugepage, so I'm not sure if it makes sense to allow it at high-granularity. If UFFDIO_COPY didn't allocate a new page, then it could make sense (maybe we'd need a new ioctl or new UFFDIO_COPY mode?). I think it makes most sense to add this with another series. Thanks, - James