Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1657788pxb; Wed, 9 Feb 2022 01:24:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbICqP9Ql/4eilW8N0oTxhKUT70wWVaebpWy/Fb+WvNN6/rerOFi2Ae1JIik+XSV6yreBG X-Received: by 2002:a17:90a:be03:: with SMTP id a3mr2405659pjs.46.1644398683622; Wed, 09 Feb 2022 01:24:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644398683; cv=none; d=google.com; s=arc-20160816; b=ubkGTdBOeYLbuJ4wJjHKJ2MvEk89psG3VClv6V97psiRZ16I3jxmIkQFmcNknVYDWr BCIWIOmsJSCpFNrQluiA8sLHBvwOvd04WUhEbvU7pf3JdIog5OEcoN1Td8SLq4zADywe LV6OW+yGVCU35D+uCrwLLOtiNTyXt+wxYFPua88b/qr/3KpKNVgHI7CUx3ASSB4PkiZt lgTounGkzbOQ34IqNdeTieENxp8AS5DQN9ZkhBYmk1+gIcCbYEv+yuAwi9zml96SpMcb VaTzEGFY3k5M5LOAZdGIoq7yQ+jUbjNAy0+8IKA038S0u2mqy1nzcLXdhV4HoeNVHCfH MKRA== 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=KD2mhkvCSD9l5DS6DbIhgn3YmMbk8ySuicBlkkQACtc=; b=uOHOlvJePVsJsdWex8P2Lj8gWz6TSomZBzmJsVNYut7JAp1MSAOseFvkZCBI9yDBou suliCWdEc2XZF9jrXR2MEVjwA4D4//vr+qJuf1gez0vQTPnhHje35k2v2TN+ECadHeqx bGBkg9dATDDP0IM20D2TVvfRfSgT6epeBFo6nK1BLdmP7EQTA+ZhB9VZm3ACyo7AgHXS Rra+tsaNgIDTbzHRBKR32iw5mMXq9HEqpEEdeVoY8Z+g/1zVC2SsBXdAKZLzDpJBfQDP bEK94Hy89Y4H4Oc2eIAQnzHN95FO08sHs0hS35RbtvKXbuSBK6tTocdDfeRHuq1QFLza ZvWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cqySIEy9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x38si15722958pfh.310.2022.02.09.01.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:24:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cqySIEy9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95F7AE00E58E; Wed, 9 Feb 2022 00:57:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345255AbiBHCJE (ORCPT + 99 others); Mon, 7 Feb 2022 21:09:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345468AbiBHCFP (ORCPT ); Mon, 7 Feb 2022 21:05:15 -0500 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19A6FC061355 for ; Mon, 7 Feb 2022 18:05:15 -0800 (PST) Received: by mail-yb1-xb2f.google.com with SMTP id v47so20623243ybi.4 for ; Mon, 07 Feb 2022 18:05:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KD2mhkvCSD9l5DS6DbIhgn3YmMbk8ySuicBlkkQACtc=; b=cqySIEy9bKgJKJ7/J7NeKqC3EVMbDwk/apfX1u6+XEeO0ytFU0hNat47ynchPwDIvK +FyhYeCyEoFgI3wRksRZm8A6RIGyjxloYmYxadw/KEYQ755rBiuDOJcSeQMSg5eF+XMw poZ0GAwwOtvBUtYVuZjz5/jjY93/2zQfg0c1+7bbWOR1kIsl8y72eNE6czFLu4NwELhg +2KLKzfwV2QHFyD9k7qYBT3wp6je0O8o3Jv509qgiIgNvIlHrnEwIylA80nVHV8Mj/c5 y6Fv6x8nZITAIxuWzPZFJPbmREJwcmYPoGUsZZeyTdTA/4gymiIw5Ik+d7CJ/0gZFqhi Yatg== 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=KD2mhkvCSD9l5DS6DbIhgn3YmMbk8ySuicBlkkQACtc=; b=46MGLA1G8BAUWI/bIqMAl8u1jOjUp/AQPObJjy9Bot67nBLXLJHHfBeLe/vXPa8TK3 PelQ4xFJyamvucFlkP3wdr1op1TZ8uZNWtthfwzYnQ0z+ZSMrg9AQTSfG41b9D4IPNVX cpgTG/7KwSAhSjlvIw2UEI5/2Lny3NsxychCYTqhMnAl0Os0BhLcq41s0qqoqcocZZZD 5QOg3r5DNJLU7giAEcgKqQuBmkUidX1bSXTgvlAg8a8FuW1awAtuTiygb9wUxcgPPFFM q2t7mt3rNGytkrHyt9cm2qYu2iUiIoXpgQ49shtELbg2Peo1xYnd3bTj6h6A7nr1JHfW Sg5A== X-Gm-Message-State: AOAM530SsAXUUiSiBaodvYc1xOX2+3cA87HErcokF6op59XR/pdmzncw baQVj37HrXcwk5FqCmvT/9bGyZnduFucI3qLFRI= X-Received: by 2002:a05:6902:c4:: with SMTP id i4mr2597802ybs.343.1644285914274; Mon, 07 Feb 2022 18:05:14 -0800 (PST) MIME-Version: 1.0 References: <20220203131237.298090-1-pedrodemargomes@gmail.com> In-Reply-To: From: Pedro Gomes Date: Mon, 7 Feb 2022 23:05:03 -0300 Message-ID: Subject: Re: [PATCH] mm/damon: Add option to monitor only writes To: David Hildenbrand Cc: SeongJae Park , Steven Rostedt , Ingo Molnar , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, John Hubbard Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, Feb 7, 2022 at 7:32 AM David Hildenbrand wrote: > > Just like clearrefs, this can race against GUP-fast to detect pinned > pages. And just like clearrefs, we're not handling PMDs properly. And > just like anything that write-protects random anon pages right now, this > does not consider O_DIRECT as is. > > Fortunately, there are not too many users of clearreefs/softdirty > tracking out there (my search a while ago returned no open source > users). My assumption is that your feature might see more widespread use. > > Adding more random write protection until we fixed the COW issues [1] > really makes my stomach hurt on a Monday morning. I was not aware of these issues. > Please, let's defer any more features that rely on write-protecting > random anon pages until we have ways in place to not corrupt random user > space. > > That is: > 1) Teaching the COW logic to not copy pages that are pinned -- I'm > working on that. > 2) Converting O_DIRECT to use FOLL_PIN instead of FOLL_GET. John is > working on that. > > So I'm not against this change. I'm against this change at this point in > time. I agree. I will wait until the COW problems are solved to send this patch. -- Atenciosamente, Pedro Demarchi Gomes.