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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,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 B821BC433DB for ; Thu, 21 Jan 2021 18:59:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1D19923A5D for ; Thu, 21 Jan 2021 18:59:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D19923A5D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 97E296B0006; Thu, 21 Jan 2021 13:59:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 907D76B0007; Thu, 21 Jan 2021 13:59:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D1326B0008; Thu, 21 Jan 2021 13:59:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 674926B0006 for ; Thu, 21 Jan 2021 13:59:34 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2DCF31730866 for ; Thu, 21 Jan 2021 18:59:34 +0000 (UTC) X-FDA: 77730695868.06.man15_0c0034e27565 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 0394310042632 for ; Thu, 21 Jan 2021 18:59:33 +0000 (UTC) X-HE-Tag: man15_0c0034e27565 X-Filterd-Recvd-Size: 5263 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Thu, 21 Jan 2021 18:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611255573; 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=Q9aC69Rrd685E5LorLOvTrA44ELra9S4V5jph1Dfqxg=; b=VVrREHmaOS6lopABBdT2b6lH+1gEFDUwvB1yGPYvZ5d5M07igUkZ7uSULmuwqyoc9b5xLE OYwtKhc2V6m1qX0eqPOPorhCNrLwKrFQAPBG4b7bPwVuk7fGpdslZXr2ciLdFNS6631nOC uTYSn21KSb4KxIKfH81OIpSVm3xS8fc= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-imNAdwmhNQOKcLo2-3FAVg-1; Thu, 21 Jan 2021 13:59:31 -0500 X-MC-Unique: imNAdwmhNQOKcLo2-3FAVg-1 Received: by mail-qk1-f200.google.com with SMTP id i82so2297761qke.19 for ; Thu, 21 Jan 2021 10:59:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Q9aC69Rrd685E5LorLOvTrA44ELra9S4V5jph1Dfqxg=; b=hs8CLPsJwpy25r2xFbfT2hCSGH2KZTHxsrXT9wN8Ur7Tj27Ps+8UUtWtGLyVa37I5k VLSvrmBhn0JF5pVimQ860VWb1E6QhV8/mdo5OmV60pAlvz7GW+RzsXUHSARYtI9xkBeb hTNb7l32fz5zc4IolvvqPMoD1DEeIQYp3/jimvxsduvQ8Fi6Mi0vFHhf/wJlOmZ+TmKk YvwhJO8eFTNKwoNesWtKnXTmcG7DvFO2RCXDQJpvVBsD0qIbfBLdbWI8hZmlmdTU+0Zw oYWBetbiWR+nyD6BpZZE8l4J2ms8CX/DZAomGO9XnZuyI7Ai3cIYoaKZrYA9PsB40PuL aLzw== X-Gm-Message-State: AOAM531RV+qeZsFv8MrpYWqZe9eqDDjaO85VJ1FskwF24kKAZk9wNwlx lS3h1Ogd5aLqE0fjNHV3qFB8YZSII062aOJyiGDCB422wpZBd/Ly78xBPAUEcBP1dVikm+//9J5 WszPUGXXEtE0= X-Received: by 2002:a37:4905:: with SMTP id w5mr1238042qka.332.1611255571015; Thu, 21 Jan 2021 10:59:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpPfqGEB5hWMaS7ODRJG0nJlz/OA1oFXO3oLmpasvHghnddIsNoZXPMGIOq60g/FNnFLxxvQ== X-Received: by 2002:a37:4905:: with SMTP id w5mr1238009qka.332.1611255570798; Thu, 21 Jan 2021 10:59:30 -0800 (PST) Received: from xz-x1 ([142.126.83.202]) by smtp.gmail.com with ESMTPSA id u5sm4409823qka.86.2021.01.21.10.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 10:59:30 -0800 (PST) Date: Thu, 21 Jan 2021 13:59:28 -0500 From: Peter Xu To: Axel Rasmussen Cc: Alexander Viro , Alexey Dobriyan , Andrea Arcangeli , Andrew Morton , Anshuman Khandual , Catalin Marinas , Chinwen Chang , Huang Ying , Ingo Molnar , Jann Horn , Jerome Glisse , Lokesh Gidra , "Matthew Wilcox (Oracle)" , Michael Ellerman , Michal =?utf-8?Q?Koutn=C3=BD?= , Michel Lespinasse , Mike Kravetz , Mike Rapoport , Nicholas Piggin , Shaohua Li , Shawn Anastasio , Steven Rostedt , Steven Price , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Adam Ruprecht , Cannon Matthews , "Dr . David Alan Gilbert" , David Rientjes , Oliver Upton Subject: Re: [PATCH 6/9] userfaultfd: disable huge PMD sharing for MINOR registered VMAs Message-ID: <20210121185928.GF260413@xz-x1> References: <20210115190451.3135416-1-axelrasmussen@google.com> <20210115190451.3135416-7-axelrasmussen@google.com> MIME-Version: 1.0 In-Reply-To: <20210115190451.3135416-7-axelrasmussen@google.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 Fri, Jan 15, 2021 at 11:04:48AM -0800, Axel Rasmussen wrote: > As the comment says: for the MINOR fault use case, although the page > might be present and populated in the other (non-UFFD-registered) half > of the shared mapping, it may be out of date, and we explicitly want > userspace to get a minor fault so it can check and potentially update > the page's contents. > > Huge PMD sharing would prevent these faults from occurring for > suitably aligned areas, so disable it upon UFFD registration. > > Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu -- Peter Xu