Re: [RFC] mm: MADV_COLLAPSE semantics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 2, 2022 at 9:43 AM Yang Shi <shy828301@xxxxxxxxx> wrote:
>
> On Wed, Jun 1, 2022 at 11:56 PM Michal Hocko <mhocko@xxxxxxxx> wrote:
> >
> > On Wed 01-06-22 10:25:53, Yang Shi wrote:
> > > On Wed, Jun 1, 2022 at 2:50 AM Michal Hocko <mhocko@xxxxxxxx> wrote:
> > > >
> > > > On Tue 31-05-22 16:47:49, Yang Shi wrote:
> > > > > On Fri, May 27, 2022 at 2:46 AM Michal Hocko <mhocko@xxxxxxxx> 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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux