linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm@kvack.org, "David S. Miller" <davem@davemloft.net>,
	 Alexey Dobriyan <adobriyan@gmail.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	 Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	 Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	 Hugh Dickins <hughd@google.com>,
	sparclinux@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [RFC 3/3] mm/vma: Introduce some more VMA flag wrappers
Date: Mon, 2 Mar 2020 22:34:00 -0800 (PST)	[thread overview]
Message-ID: <alpine.LSU.2.11.2003022212090.1344@eggly.anvils> (raw)
In-Reply-To: <1583131666-15531-4-git-send-email-anshuman.khandual@arm.com>

On Mon, 2 Mar 2020, Anshuman Khandual wrote:

> This adds the following new VMA flag wrappers which will replace current
> open encodings across various places. This should not have any functional
> implications.
> 
> vma_is_dontdump()
> vma_is_noreserve()
> vma_is_special()
> vma_is_locked()
> vma_is_mergeable()
> vma_is_softdirty()
> vma_is_thp()
> vma_is_nothp()

Why?? Please don't. I am not at all keen on your 1/3 and 2/3 (some
of us actually like to see what the VM_ flags are where they're used,
without having to chase through scattered wrappers hiding them),
but this 3/3 particularly upset me.

There is a good reason for the (hideously named) is_vm_hugetlb_page(vma):
to save "#ifdef CONFIG_HUGETLB_PAGE"s all over (though I suspect the
same could have been achieved much more nicely by #define VM_HUGETLB 0);
but hiding all flags in vma_is_whatever()s is counter-productive churn.

Improved readability? Not to my eyes.

Hugh


  reply	other threads:[~2020-03-03  6:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02  6:47 [RFC 0/3] mm/vma: some new flags and helpers Anshuman Khandual
2020-03-02  6:47 ` [RFC 1/3] mm/vma: Define a default value for VM_DATA_DEFAULT_FLAGS Anshuman Khandual
2020-03-02  8:22   ` Geert Uytterhoeven
2020-03-03 17:25   ` Vlastimil Babka
2020-03-04  5:19     ` Anshuman Khandual
2020-03-02  6:47 ` [RFC 2/3] mm/vma: Introduce VM_ACCESS_FLAGS Anshuman Khandual
2020-03-03 17:48   ` Vlastimil Babka
2020-03-04  5:52     ` Anshuman Khandual
2020-03-02  6:47 ` [RFC 3/3] mm/vma: Introduce some more VMA flag wrappers Anshuman Khandual
2020-03-03  6:34   ` Hugh Dickins [this message]
2020-03-03  9:13     ` Anshuman Khandual
2020-03-10 20:26       ` Alexey Dobriyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.11.2003022212090.1344@eggly.anvils \
    --to=hughd@google.com \
    --cc=acme@kernel.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=anshuman.khandual@arm.com \
    --cc=davem@davemloft.net \
    --cc=jolsa@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).