Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1128602ybn; Wed, 2 Oct 2019 11:15:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyl7T8w+7RRqnQsjC3/yKbXEYA0mSsuCZh3UUGL4NjxY5SOZIID6/XHlZWhZgcj9uBxJqFA X-Received: by 2002:a50:acc1:: with SMTP id x59mr5332245edc.278.1570040124936; Wed, 02 Oct 2019 11:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570040124; cv=none; d=google.com; s=arc-20160816; b=Vn04vNl07my5/wschPElszqeErcc3qgHF7sj3nsj/t9IiD0XLxPbtqOdKibzhbNjp5 bxCg58cJmDUHxyeakSfpnzfILIeFJfnoqB6ugN2ASNxUbM5uHi0AfS/OWLmQGtx16SU8 ZU7198iToGnzH+ikIYx2mFlmpuweyvNF/MbqscsSUJl/JWfCvAHuQOkgh5fMNAGsX2pw NqNh9Ai4LG6zh6NU+ezGix6YeHvGnsyobwaon3Fa3a0gi5hMNo4zSkVFZckwO+RbR5Xf NKv8sE5sfb6+rkH6ohZbkaDe8CTB06nuTeif/4RUXSrrnEvpsuTJnAUnLoudYV3IRm6W 90ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=B05xaQuhRjJFx1QiohMUgG3+4tbrPvqqJ4/dan/Std8=; b=oE2C76lJtCsiHYn69FUCezf03kuiXAVGJNkqjwgIboDBU0TWD0xhFi+Cx/UxFBoXeS kHyJxVuNLJSx+wJxuGBS1Ixiyb/YzXVZGJrd6yv4Fm8m07TjzJbTO188pop44yveEORm 5aKH04O1vbpNhWF3OVpWK8waboJsu5Z44sAYCyuKX8aifYxcRntzD5xOgyX83Gj+HoEh QubIHuw0jxU6vzpJVcpl7aXGk28P1mYCDArB99ue/E6Cw6pmFMhYnbE6JptxLebm9Jsg DJxZwBEWUKlbnTStD64m855Hfrw7PE4AsDE1biFG8i7uPioOmWp1MqKsykvZWaL3eYHl HOYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XsW8B0AD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si11238408eji.94.2019.10.02.11.14.59; Wed, 02 Oct 2019 11:15:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XsW8B0AD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728203AbfJBSNt (ORCPT + 99 others); Wed, 2 Oct 2019 14:13:49 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51822 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726076AbfJBSNt (ORCPT ); Wed, 2 Oct 2019 14:13:49 -0400 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 Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 02, 2019 at 11:06:43AM -0700, Linus Torvalds wrote: > On Wed, Oct 2, 2019 at 6:48 AM Thomas Hellstr?m (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?" > > 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.