From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Alexey Dobriyan <adobriyan@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] mm, vmacache: hash addresses based on pmd
Date: Wed, 11 Jul 2018 16:10:30 -0700 [thread overview]
Message-ID: <20180711161030.b5ae2f5b1210150c13b1a832@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.21.1807091822460.130281@chino.kir.corp.google.com>
On Mon, 9 Jul 2018 18:37:37 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:
> > Did you consider LRU-sorting the array instead?
> >
>
> It adds 40 bytes to struct task_struct,
What does? LRU sort? It's a 4-entry array, just do it in place, like
bh_lru_install(). Confused.
> but I'm not sure the least
> recently used is the first preferred check. If I do
> madvise(MADV_DONTNEED) from a malloc implementation where I don't control
> what is free()'d and I'm constantly freeing back to the same hugepages,
> for example, I may always get first slot cache hits with this patch as
> opposed to the 25% chance that the current implementation has (and perhaps
> an lru would as well).
>
> I'm sure that I could construct a workload where LRU would be better and
> could show that the added footprint were worthwhile, but I could also
> construct a workload where the current implementation based on pfn would
> outperform all of these. It simply turns out that on the user-controlled
> workloads that I was profiling that hashing based on pmd was the win.
That leaves us nowhere to go. Zapping the WARN_ON seems a no-brainer
though?
next prev parent reply other threads:[~2018-07-11 23:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 0:50 David Rientjes
2018-07-10 1:08 ` Andrew Morton
2018-07-10 1:37 ` David Rientjes
2018-07-11 23:10 ` Andrew Morton [this message]
2018-07-11 23:43 ` David Rientjes
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=20180711161030.b5ae2f5b1210150c13b1a832@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=dave@stgolabs.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=torvalds@linux-foundation.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