linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	<linux-kernel@vger.kernel.org>, <patches@lists.linux.dev>,
	<tglx@linutronix.de>
Cc: <linux-crypto@vger.kernel.org>, <linux-api@vger.kernel.org>,
	<x86@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Adhemerval Zanella Netto" <adhemerval.zanella@linaro.org>,
	Carlos O'Donell <carlos@redhat.com>,
	Florian Weimer <fweimer@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>, Jann Horn <jannh@google.com>,
	Christian Brauner <brauner@kernel.org>,
	David Hildenbrand <dhildenb@redhat.com>, <linux-mm@kvack.org>
Subject: Re: [PATCH v17 1/5] mm: add VM_DROPPABLE for designating always lazily freeable mappings
Date: Fri, 14 Jun 2024 19:12:36 -0700	[thread overview]
Message-ID: <722af60d-efde-48f7-b521-657c25f68195@nvidia.com> (raw)
In-Reply-To: <20240614190646.2081057-2-Jason@zx2c4.com>

On 6/14/24 12:06 PM, Jason A. Donenfeld wrote:
...
> diff --git a/mm/Kconfig b/mm/Kconfig
> index b4cb45255a54..6cd65ea4b3ad 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -1056,6 +1056,9 @@ config ARCH_USES_HIGH_VMA_FLAGS
>   	bool
>   config ARCH_HAS_PKEYS
>   	bool
> +config NEED_VM_DROPPABLE
> +	select ARCH_USES_HIGH_VMA_FLAGS

Hi Jason!

The naming and use of NEED_VM_DROPPABLE are a little bit backwards. :)
First of all, the name should probably be:

     HAVE_VM_DROPPABLE

...although that doesn't yet work here. And the reason it doesn't work
yet is that the logic also needs to change: only the arch layers should
be doing this:

     select ARCH_USES_HIGH_VMA_FLAGS

If a feature does it, then the logic and dependency tree gets all weird
and wrong.

So:

a) 64-bit arches should do this part:

     select ARCH_USES_HIGH_VMA_FLAGS (already done, in most cases) select
     HAVE_VM_DROPPABLE

b) VDSO_GETRANDOM should depend on:

     HAVE_VM_DROPPABLE

...and then you'll find that the uses of HAVE_VM_DROPPABLE read more
like the pre-existing cases of other "HAVE_" items, too.



thanks,
-- 
John Hubbard
NVIDIA



      reply	other threads:[~2024-06-15  2:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240614190646.2081057-1-Jason@zx2c4.com>
2024-06-14 19:06 ` Jason A. Donenfeld
2024-06-15  2:12   ` John Hubbard [this message]

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=722af60d-efde-48f7-b521-657c25f68195@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=Jason@zx2c4.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=arnd@arndb.de \
    --cc=brauner@kernel.org \
    --cc=carlos@redhat.com \
    --cc=dhildenb@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=patches@lists.linux.dev \
    --cc=tglx@linutronix.de \
    --cc=x86@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