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=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 931B2ECE58A for ; Wed, 2 Oct 2019 18:13:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5E61E21848 for ; Wed, 2 Oct 2019 18:13:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XsW8B0AD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E61E21848 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EFBBB6B0003; Wed, 2 Oct 2019 14:13:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EABFF6B0006; Wed, 2 Oct 2019 14:13:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE89B6B0007; Wed, 2 Oct 2019 14:13:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id BE1526B0003 for ; Wed, 2 Oct 2019 14:13:50 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 4E4B62A87 for ; Wed, 2 Oct 2019 18:13:50 +0000 (UTC) X-FDA: 75999643020.18.wheel62_4533593a7236 X-HE-Tag: wheel62_4533593a7236 X-Filterd-Recvd-Size: 3567 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Oct 2019 18:13:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=B05xaQuhRjJFx1QiohMUgG3+4tbrPvqqJ4/dan/Std8=; b=XsW8B0ADu2Ia3ARlJ6UN+ywm7z GbT0P98DDvav7eCuvXuSAepYqOhnY6+KEYEMZRyhXEsdFe8shiLpy6785dO3/bAQROU3OwAtkQeez NYZznFxJPQPzB5DyV44TQzfLkGCvZsMBygTgvR+/T3OGfBYT2+zeSVtzDdIlV+KatcBIFzZWO2vQF 7A6iuwwZ+CQDbCoUuNbNPYcBHnyj5kfBn2F1CvMgtIC2A3dWlFrlWFDGm1z/2vyxKAj6ZUk+hMnSB C+ZL7Cwurt0wlF9yJ2FktiV23jaP9Ok5HtOW6Ni3Jy5ZBRpmXfQJfH58BkmIaTR/OvtOmTPluvIZ3 BjlAL3mw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFj8A-0006WK-Ak; Wed, 02 Oct 2019 18:13:42 +0000 Date: Wed, 2 Oct 2019 11:13:42 -0700 From: Matthew Wilcox To: Linus Torvalds Cc: Thomas =?iso-8859-1?Q?Hellstr=F6m_=28VMware=29?= , Linux-MM , Linux Kernel Mailing List , Thomas Hellstrom , Andrew Morton , Will Deacon , Peter Zijlstra , Rik van Riel , Minchan Kim , Michal Hocko , Huang Ying , =?iso-8859-1?B?Suly9G1l?= Glisse , "Kirill A . Shutemov" Subject: Re: [PATCH v3 3/7] mm: Add write-protect and clean utilities for address space ranges Message-ID: <20191002181342.GB32665@bombadil.infradead.org> References: <20191002134730.40985-1-thomas_os@shipmail.org> <20191002134730.40985-4-thomas_os@shipmail.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Content-Transfer-Encoding: quoted-printable 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 Wed, Oct 02, 2019 at 11:06:43AM -0700, Linus Torvalds wrote: > On Wed, Oct 2, 2019 at 6:48 AM Thomas Hellstr=F6m (VMware) > wrote: > > > > From: Thomas Hellstrom > > > > Add two utilities to a) write-protect and b) clean all ptes pointing = into > > a range of an address space. [...] > Yes, it's a bit more typing. But I really think > "clean_mapping_dirty_pages()" is just not only more in line with the > mm naming, I think it's a lot more legible and understandable than > "as_dirty_clean()", which just makes me go "what the heck does that > function do?" >=20 > And I really think it needs more than just "as" -> "mapping". > "mapping_dirty_clean()" still makes me go "what?" in a way that > "clean_mapping_dirty_pages()" does not. One name reads as a series or > random words, the other reads as a "this is what the function does". I'd suggest clean_mapping_pages() -- a function which does that would naturally skip the non-dirty pages, and that doesn't need to be in the function name.