From: "Zach O'Keefe" <zokeefe@google.com>
To: David Hildenbrand <david@redhat.com>,
David Rientjes <rientjes@google.com>,
Matthew Wilcox <willy@infradead.org>,
Michal Hocko <mhocko@suse.com>, Peter Xu <peterx@redhat.com>,
linux-mm@kvack.org, rongwei.wang@linux.alibaba.com,
Yang Shi <shy828301@gmail.com>
Cc: Alex Shi <alex.shi@linux.alibaba.com>,
Song Liu <songliubraving@fb.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Axel Rasmussen <axelrasmussen@google.com>,
Hugh Dickins <hughd@google.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Minchan Kim <minchan@kernel.org>, SeongJae Park <sj@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>
Subject: Re: [RFC] mm: MADV_COLLAPSE semantics
Date: Fri, 3 Jun 2022 06:33:02 -0700 [thread overview]
Message-ID: <CAAa6QmS_TiQqUFCxgMJZ57QFNoiut6fmbEVE=KOFRtRXMgtFCQ@mail.gmail.com> (raw)
In-Reply-To: <CAAa6QmRrkutHk_f9fVy0tx-GXp3PXc5sN0g-_0JqH0kcwTH39A@mail.gmail.com>
Ok, I think I'll wrap up this thread.
Again, thanks all for taking the time to voice their thoughts and have
this great discussion.
As Yang suggested, I'll start by proposing MADV_COLLAPSE isn't tied to
any of the THP sysfs knobs and we'll see if there are any additional
issues / concerns raised.
Thanks again for everyone's time!
Best,
Zach
On Fri, Jun 3, 2022 at 6:26 AM Zach O'Keefe <zokeefe@google.com> wrote:
>
> On Thu, Jun 2, 2022 at 9:43 AM Yang Shi <shy828301@gmail.com> wrote:
> >
> > On Wed, Jun 1, 2022 at 11:56 PM Michal Hocko <mhocko@suse.com> wrote:
> > >
> > > On Wed 01-06-22 10:25:53, Yang Shi wrote:
> > > > On Wed, Jun 1, 2022 at 2:50 AM Michal Hocko <mhocko@suse.com> wrote:
> > > > >
> > > > > On Tue 31-05-22 16:47:49, Yang Shi wrote:
> > > > > > On Fri, May 27, 2022 at 2:46 AM Michal Hocko <mhocko@suse.com> wrote:
> > > > > [...]
> > > > > > > I really do not see any good reason to tightly couple kernel and user
> > > > > > > policies. Hints like MADV_{NO}HUGEPAGE are one thing and both kernel
> > > > > > > and userspace might decide to interpret them. But binding MADV_COLLAPSE
> > > > > > > to in kernel THP tunables just seems like pushing ourselves into the
> > > > > > > corner.
> > > > > >
> > > > > > I don't mean we should tightly couple kernel and user policies. I
> > > > > > think it is about how "never" is treated. AFAICT, typically sys admins
> > > > > > tend to expect "never" as a global switch and they don't expect any
> > > > > > THP allocation should happen in "never" mode even though it is
> > > > > > requested by the users. Maybe they should not expect so in the first
> > > > > > place.
> > > > >
> > > > > But this is not how the knob works, right? At least shmem has its own
> > > > > thing. So we do not have any global kill switch for transparent huge
> > > > > pages.
> > > >
> > > > Yeah, but shmem has "never" mode too, which has the same semantics and
> > > > it is the default mode actually. Since MADV_COLLAPSE just collapse
> > > > anon memory for now, so the discussion was focused on anon THP. But
> > > > shmem is same.
> > >
> > > Do you expect MADV_COLLAPSE would stick to the anonymous memory? Are we
> > > going to get MADV_COLLAPSE_SHMEM, MADV_COLLAPSE_FOR_REAL?
> >
> > No, my point is "never" mode has the same semantics for both anon and
> > shmem. When we were talking about whether MADV_COLLAPSE should respect
> > "never" or not, it means both.
>
> Ya, this is a good point, and something I honestly overlooked
> originally when posting this thread.
>
> > >
> > > --
> > > Michal Hocko
> > > SUSE Labs
next prev parent reply other threads:[~2022-06-03 13:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 0:18 [RFC] mm: MADV_COLLAPSE semantics Zach O'Keefe
2022-05-24 13:26 ` Peter Xu
2022-05-24 17:08 ` Zach O'Keefe
2022-05-24 20:02 ` Yang Shi
2022-05-25 8:24 ` Michal Hocko
2022-05-25 17:32 ` Yang Shi
2022-05-25 18:09 ` Zach O'Keefe
2022-05-26 7:12 ` Michal Hocko
2022-05-26 17:39 ` Yang Shi
2022-05-27 9:46 ` Michal Hocko
2022-05-31 23:47 ` Yang Shi
2022-06-01 9:50 ` Michal Hocko
2022-06-01 17:25 ` Yang Shi
2022-06-02 6:55 ` Michal Hocko
2022-06-02 16:43 ` Yang Shi
2022-06-03 13:26 ` Zach O'Keefe
2022-06-03 13:33 ` Zach O'Keefe [this message]
2022-05-26 18:30 ` Matthew Wilcox
2022-05-27 8:56 ` Michal Hocko
2022-05-27 18:09 ` Yang Shi
2022-05-31 21:36 ` Zach O'Keefe
2022-05-31 23:52 ` Yang Shi
2022-06-01 9:57 ` Michal Hocko
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='CAAa6QmS_TiQqUFCxgMJZ57QFNoiut6fmbEVE=KOFRtRXMgtFCQ@mail.gmail.com' \
--to=zokeefe@google.com \
--cc=aarcange@redhat.com \
--cc=alex.shi@linux.alibaba.com \
--cc=axelrasmussen@google.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=pasha.tatashin@soleen.com \
--cc=peterx@redhat.com \
--cc=rientjes@google.com \
--cc=rongwei.wang@linux.alibaba.com \
--cc=shy828301@gmail.com \
--cc=sj@kernel.org \
--cc=songliubraving@fb.com \
--cc=willy@infradead.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).