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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E179C433F5 for ; Wed, 22 Dec 2021 18:40:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344811AbhLVSkk (ORCPT ); Wed, 22 Dec 2021 13:40:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233997AbhLVSki (ORCPT ); Wed, 22 Dec 2021 13:40:38 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56277C061574 for ; Wed, 22 Dec 2021 10:40:38 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id j21so12122239edt.9 for ; Wed, 22 Dec 2021 10:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Aq/wssbJW97LOVr0Eh6yDelER0nFi1ZCZpjRsYoDD3M=; b=REM7DgpgJmkfIJdXvPcefxx96s82wJsCzGWmJn0cvbBNm41AzviVhzuNtpthlyec3s UGTiKQqTbUxvgaQ7HgM0DrpzcNs62ueQTQhGdqh1NAJHhNe+Su+eXdejZMNZl6kf7Sg1 AOMnLNyEuDxkkkjn3LNUqoR/nzbn3aEL5NIHs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Aq/wssbJW97LOVr0Eh6yDelER0nFi1ZCZpjRsYoDD3M=; b=otitbfkoGWqIU/DoO5fxcsqdioAov4luE5t/I2H9JzcfOBALR5SR++V6qdzqBtBhIP mHL0YJ2FLSOI1SH/FhY4GrTo/Aw+8begnGifKQx1dnp0ph+alrl+pwqs65jBLLbseze8 nbYqQ1ilegierKOmAazC9cv5q8x6C9NWJpRGZZ7nNWVK0u91lnXAJC8skf3hVfzAEJT4 ruOVlhB89n7OUDrwbgjGmpketyZdEwhbMpVLloYvX0JKGKcDITYm9c1bHC6HLG/JLbb3 m2Ln0079XSCpmRda7XfmArfaVbhEIVIAT9YbhyqJaFSHoqZ+NMgj5CZv6ZdLbWXUYqOn PYxg== X-Gm-Message-State: AOAM530mgqB7DvUKx2/dJXciUTgdi9sN5prPXwxdYN5qLkcKwz6sJjIH 91P6JdwmytVWNLreswus310GuKIv1C21pjINPTI= X-Google-Smtp-Source: ABdhPJxK+WZq0sxoV14OJd1jT6ym2lRbPUYYQJaF36isy0GaAHXJXgXXfIsx84WAKZKOXozOnJiWqw== X-Received: by 2002:a17:907:169e:: with SMTP id hc30mr3368531ejc.433.1640198436229; Wed, 22 Dec 2021 10:40:36 -0800 (PST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com. [209.85.221.54]) by smtp.gmail.com with ESMTPSA id f1sm973114ejl.127.2021.12.22.10.40.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Dec 2021 10:40:35 -0800 (PST) Received: by mail-wr1-f54.google.com with SMTP id d9so6798640wrb.0 for ; Wed, 22 Dec 2021 10:40:34 -0800 (PST) X-Received: by 2002:a5d:6211:: with SMTP id y17mr2950577wru.97.1640198434545; Wed, 22 Dec 2021 10:40:34 -0800 (PST) MIME-Version: 1.0 References: <900b7d4a-a5dc-5c7b-a374-c4a8cc149232@redhat.com> <20211221190706.GG1432915@nvidia.com> <3e0868e6-c714-1bf8-163f-389989bf5189@redhat.com> <20211222124141.GA685@quack2.suse.cz> <4a28e8a0-2efa-8b5e-10b5-38f1fc143a98@redhat.com> <20211222144255.GE685@quack2.suse.cz> <505d3d0f-23ee-0eec-0571-8058b8eedb97@redhat.com> <20211222160846.GH685@quack2.suse.cz> In-Reply-To: <20211222160846.GH685@quack2.suse.cz> From: Linus Torvalds Date: Wed, 22 Dec 2021 10:40:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 06/11] mm: support GUP-triggered unsharing via FAULT_FLAG_UNSHARE (!hugetlb) To: Jan Kara Cc: David Hildenbrand , Jason Gunthorpe , Nadav Amit , Linux Kernel Mailing List , Andrew Morton , Hugh Dickins , David Rientjes , Shakeel Butt , John Hubbard , Mike Kravetz , Mike Rapoport , Yang Shi , "Kirill A . Shutemov" , Matthew Wilcox , Vlastimil Babka , Jann Horn , Michal Hocko , Rik van Riel , Roman Gushchin , Andrea Arcangeli , Peter Xu , Donald Dutile , Christoph Hellwig , Oleg Nesterov , Linux-MM , "open list:KERNEL SELFTEST FRAMEWORK" , "open list:DOCUMENTATION" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 22, 2021 at 8:08 AM Jan Kara wrote: > > Well, but O_DIRECT reads must use FOLL_PIN in any case because they modify > page data (and so we need to detect them both for COW and filesystem needs). Well, O_DIRECT reads do, but not necessarily writes. And hey, even reads have been dodgy in the past when we didn't really have the pinning logic - there's been a lot of users that just wanted it to work for their particular use-case rather than in general and in all situations.. Linus