All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: Yuanchu Xie <yuanchu@google.com>
Cc: Ivan Babrou <ivan@cloudflare.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Barrett <steven@liquorix.net>,
	Brian Geffon <bgeffon@google.com>,
	Oleksandr Natalenko <oleksandr@natalenko.name>,
	Suren Baghdasaryan <surenb@google.com>,
	Arnd Bergmann <arnd@arndb.de>, Peter Xu <peterx@redhat.com>,
	Hugh Dickins <hughd@google.com>,
	Gaosheng Cui <cuigaosheng1@huawei.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH 1/2] mm: add vma_has_locality()
Date: Thu, 22 Dec 2022 12:52:07 -0700	[thread overview]
Message-ID: <CAOUHufYN8UPHrsni5fohOUK4=Od8Ny312CJrKvHjou=Zxj=+DQ@mail.gmail.com> (raw)
In-Reply-To: <20221222061341.381903-1-yuanchu@google.com>

On Wed, Dec 21, 2022 at 11:13 PM Yuanchu Xie <yuanchu@google.com> wrote:
>
> From: Yu Zhao <yuzhao@google.com>
>
> Currently in vm_flags in vm_area_struct, both VM_SEQ_READ and
> VM_RAND_READ indicate a lack of locality in accesses to the vma. Some
> places that check for locality are missing one of them. We add
> vma_has_locality to replace the existing locality checks for clarity.

Need benchmark results. A simple fio test will do; doesn't need to be
the curl one.

> +       /*
> +        * If we are reclaiming on behalf of a cgroup, skip counting on behalf
> +        * of references from different cgroups

Nit: add a period at the end.

> @@ -906,6 +908,7 @@ int folio_referenced(struct folio *folio, int is_locked,
>                 .arg = (void *)&pra,
>                 .anon_lock = folio_lock_anon_vma_read,
>                 .try_lock = true,
> +               .invalid_vma = invalid_folio_referenced_vma,

Nice. (What I suggested isn't as clean:
https://lore.kernel.org/all/Y31s%2FK8T85jh05wH@google.com/)

      parent reply	other threads:[~2022-12-22 19:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22  6:13 [PATCH 1/2] mm: add vma_has_locality() Yuanchu Xie
2022-12-22  6:13 ` [PATCH 2/2] mm: support POSIX_FADV_NOREUSE for generic fadvise handler Yuanchu Xie
2022-12-22 21:37   ` Yu Zhao
2022-12-22  6:38 ` [PATCH 1/2] mm: add vma_has_locality() Yuanchu Xie
2022-12-22 18:49 ` Andrew Morton
2022-12-22 19:44   ` Yu Zhao
2022-12-22 20:29     ` Andrew Morton
2022-12-30 21:59       ` Yu Zhao
2022-12-22 19:52 ` Yu Zhao [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='CAOUHufYN8UPHrsni5fohOUK4=Od8Ny312CJrKvHjou=Zxj=+DQ@mail.gmail.com' \
    --to=yuzhao@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bgeffon@google.com \
    --cc=cuigaosheng1@huawei.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=ivan@cloudflare.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleksandr@natalenko.name \
    --cc=peterx@redhat.com \
    --cc=steven@liquorix.net \
    --cc=surenb@google.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yuanchu@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.