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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 87A93C32792 for ; Mon, 30 Sep 2019 17:12:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 13C122190F for ; Mon, 30 Sep 2019 17:12:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="V7RLMXPE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13C122190F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A52BA6B0003; Mon, 30 Sep 2019 13:12:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A03726B0006; Mon, 30 Sep 2019 13:12:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9194F6B0007; Mon, 30 Sep 2019 13:12:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) by kanga.kvack.org (Postfix) with ESMTP id 70F4A6B0003 for ; Mon, 30 Sep 2019 13:12:44 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 1317B180AD804 for ; Mon, 30 Sep 2019 17:12:44 +0000 (UTC) X-FDA: 75992231448.17.juice07_51f9e95ee1f1e X-HE-Tag: juice07_51f9e95ee1f1e X-Filterd-Recvd-Size: 4494 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Sep 2019 17:12:43 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id j19so10351479lja.1 for ; Mon, 30 Sep 2019 10:12:43 -0700 (PDT) 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=3Act6rfhr6ll6+lxDGIt9p6YkkxuZ3qqsousOClbC28=; b=V7RLMXPETXEXeWwE1Sbnizu2qEFIZYZq5cHmesMNso3mhFcDh0YU3w13uEDwi4/e7M gJ+BO6drpJpEQ0Js3lc9uRgVOARgIqUEGJ6wTOYYpcZxE8hNq1rhk8iDoPfDqTkT+AwE a0YtiITRaLk9xBmk/4pRQlcopVx7UWpdCLzTY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3Act6rfhr6ll6+lxDGIt9p6YkkxuZ3qqsousOClbC28=; b=mzhQmoDEgsg4Ct0YGc2sUb7o35/mU6Oe5oTJr6Yq4y0pT1HQfhIYw/elzC+FkGCD82 sMUBi2ttZ3L0Enskg2zbkAKCLHUKEkYGsu3D7KWycNgWf4223/v4xr7yzAh2N/nQUIe1 IL5oCBnwvQ2IpdasX4cnlYxuIFjSx97+ATKWon1N4qOUkN1zPdU2SnMLrdE4KaN/PY3B Vxr65UIXW27s/bP7gmjAH9mlXyUV1OHWBvudNUsCN3phWwd7357tM/3pyP6alKI0MVGh y7YoJQHpIcslhTdvO8LZ8to8nuPuS939bE+ribcCzFMh7CIq/zxlxO+E7ivxVCJdVTM5 q52A== X-Gm-Message-State: APjAAAU7AUsJG0hmHdNJ7YCabTNOWznqxEa8F/Hoj8AonulaTih6a9U2 dZfAG/hA3oOmqfCemzFiWd+AqxDyDww= X-Google-Smtp-Source: APXvYqx/WUffUpojv5iSth3dbMtqiHwvUXiZ6HSP54Pf84LryL1WcIjPJmDVOKf1JT7iV90+2Maakw== X-Received: by 2002:a2e:9a50:: with SMTP id k16mr13302469ljj.221.1569863561287; Mon, 30 Sep 2019 10:12:41 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id 28sm3320979lfy.47.2019.09.30.10.12.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Sep 2019 10:12:39 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id y23so10291198lje.9 for ; Mon, 30 Sep 2019 10:12:39 -0700 (PDT) X-Received: by 2002:a2e:3015:: with SMTP id w21mr12950349ljw.165.1569863559288; Mon, 30 Sep 2019 10:12:39 -0700 (PDT) MIME-Version: 1.0 References: <20190926115548.44000-1-thomas_os@shipmail.org> <20190926115548.44000-2-thomas_os@shipmail.org> <85e31bcf-d3c8-2fcf-e659-2c9f82ebedc7@shipmail.org> <20190927121754.kn46qh2crvsnw5z2@box> <20190930130357.ye3zlkbka2jtd56a@box> In-Reply-To: <20190930130357.ye3zlkbka2jtd56a@box> From: Linus Torvalds Date: Mon, 30 Sep 2019 10:12:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges To: "Kirill A. Shutemov" Cc: =?UTF-8?Q?Thomas_Hellstr=C3=B6m_=28VMware=29?= , Linux Kernel Mailing List , dri-devel , Linux-MM , Andrew Morton , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" 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, Sep 30, 2019 at 6:04 AM Kirill A. Shutemov wrote: > > Have you seen page_vma_mapped_walk()? I made it specifically for rmap code > to cover cases when a THP is mapped with PTEs. To me it's not a big > stretch to make it cover multiple pages too. I agree that is closer, but it does make for calling that big complex function for every iteration step. Of course, you are right that the callback approach is problematic too, now that we have retpoline issues, making those very expensive. But at least that hopefully gets fixed some day and gets to be a rare problem. Matter ot taste, I guess. Linus