[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190221173237.GK2813@redhat.com>
Date: Thu, 21 Feb 2019 12:32:37 -0500
From: Jerome Glisse <jglisse@...hat.com>
To: Peter Xu <peterx@...hat.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
David Hildenbrand <david@...hat.com>,
Hugh Dickins <hughd@...gle.com>,
Maya Gokhale <gokhale2@...l.gov>,
Pavel Emelyanov <xemul@...tuozzo.com>,
Johannes Weiner <hannes@...xchg.org>,
Martin Cracauer <cracauer@...s.org>, Shaohua Li <shli@...com>,
Marty McFadden <mcfadden8@...l.gov>,
Andrea Arcangeli <aarcange@...hat.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Denis Plotnikov <dplotnikov@...tuozzo.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Mel Gorman <mgorman@...e.de>,
"Kirill A . Shutemov" <kirill@...temov.name>,
"Dr . David Alan Gilbert" <dgilbert@...hat.com>
Subject: Re: [PATCH v2 11/26] mm: merge parameters for change_protection()
On Tue, Feb 12, 2019 at 10:56:17AM +0800, Peter Xu wrote:
> change_protection() was used by either the NUMA or mprotect() code,
> there's one parameter for each of the callers (dirty_accountable and
> prot_numa). Further, these parameters are passed along the calls:
>
> - change_protection_range()
> - change_p4d_range()
> - change_pud_range()
> - change_pmd_range()
> - ...
>
> Now we introduce a flag for change_protect() and all these helpers to
> replace these parameters. Then we can avoid passing multiple parameters
> multiple times along the way.
>
> More importantly, it'll greatly simplify the work if we want to
> introduce any new parameters to change_protection(). In the follow up
> patches, a new parameter for userfaultfd write protection will be
> introduced.
>
> No functional change at all.
>
> Signed-off-by: Peter Xu <peterx@...hat.com>
It would have been nice if this was a coccinelle patch, easier to
review.
Reviewed-by: Jérôme Glisse <jglisse@...hat.com>
> ---
> include/linux/huge_mm.h | 2 +-
> include/linux/mm.h | 14 +++++++++++++-
> mm/huge_memory.c | 3 ++-
> mm/mempolicy.c | 2 +-
> mm/mprotect.c | 29 ++++++++++++++++-------------
> 5 files changed, 33 insertions(+), 17 deletions(-)
[...]
Powered by blists - more mailing lists