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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 717DCC433F5 for ; Tue, 8 Feb 2022 02:05:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF0B66B0074; Mon, 7 Feb 2022 21:05:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CA07E6B0075; Mon, 7 Feb 2022 21:05:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B3FBB6B0078; Mon, 7 Feb 2022 21:05:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id A21916B0074 for ; Mon, 7 Feb 2022 21:05:15 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 69D2195285 for ; Tue, 8 Feb 2022 02:05:15 +0000 (UTC) X-FDA: 79117970190.10.4698D1B Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by imf25.hostedemail.com (Postfix) with ESMTP id 0F019A0002 for ; Tue, 8 Feb 2022 02:05:14 +0000 (UTC) Received: by mail-yb1-f182.google.com with SMTP id bt13so21613694ybb.2 for ; Mon, 07 Feb 2022 18:05:14 -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=clDWraBWTI3rm7bic40RH4na7TmdLPKmAdu10BpiBkiG/t/STGEeB3ulAOdt8I/wvP Et0/YbSJH7IZbT38JPTV4/mWMGT3eY5ZRjqGMxDhMOiaXITEyEXdn9ppaTY02dMmos2p 2h5En0bBNkD/QTvKnycqlRhu5yC6qEQrS9wzPCzek6NSzlq86BiBa9RXFG1NVuK27eKy K0aHle8XmCxv0zO7VMGGz5oCjGxvpBIPX+6G/AbN59IpQgPpiWWAzzh1NoHyzLH/jMyJ K1RVziaG3IkvBbVzgCXTHbzaiMdvzy89tTePxnt6mdu22xyz/Vut8gAQxmn0xq740gFh cSvQ== X-Gm-Message-State: AOAM533v2ZAksYILVJZwYf5/lPVKnedyEwQcUO55Bz4ClBzMkf8XfT8Q nTAWP+tRDq3zXWmvjDu2wp9U1laOFJuY8NF/IBIAK67DcToWtA== X-Google-Smtp-Source: ABdhPJxeHugI3DEllGx+J2WDZamQf12x0W60JKjf1YUmXbHrs+2Lfdq4/jr6emHIFyZ/anRDxr2TC6phuups104YuN0= 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" Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cqySIEy9; spf=pass (imf25.hostedemail.com: domain of pedrodemargomes@gmail.com designates 209.85.219.182 as permitted sender) smtp.mailfrom=pedrodemargomes@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: ndt7mqskktxe4u1t4gh9omohgjsrrfz5 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 0F019A0002 X-Rspam-User: X-HE-Tag: 1644285914-899796 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 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.