[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 2 Feb 2021 12:05:36 -0500
From: Peter Xu <peterx@...hat.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: 20200918161902.GX8409@...pe.ca,
Linus Torvalds <torvalds@...ux-foundation.org>,
John Hubbard <jhubbard@...dia.com>,
Leon Romanovsky <leonro@...dia.com>,
Linux-MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Maya B . Gokhale" <gokhale2@...l.gov>,
Yang Shi <yang.shi@...ux.alibaba.com>,
Marty Mcfadden <mcfadden8@...l.gov>,
Kirill Shutemov <kirill@...temov.name>,
Oleg Nesterov <oleg@...hat.com>, Jann Horn <jannh@...gle.com>,
Jan Kara <jack@...e.cz>, Kirill Tkhai <ktkhai@...tuozzo.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Christoph Hellwig <hch@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
"Zhang, Wei" <wzam@...zon.com>
Subject: Re: [PATCH 1/4] mm: Trial do_wp_page() simplification
On Tue, Feb 02, 2021 at 12:44:20PM -0400, Jason Gunthorpe wrote:
> On Tue, Feb 02, 2021 at 11:31:27AM -0500, Peter Xu wrote:
> > On Tue, Feb 02, 2021 at 04:40:33PM +0200, Gal Pressman wrote:
> > > Hi Peter & Jason,
> >
> > Hi, Gal, Jason,
> >
> > >
> > > It seems the hugetlb part was overlooked?
> > > We're testing if the RDMA fork MADV_DONTFORK stuff can be removed on appropriate
> > > kernels, but our tests still fail due to lacking explicit huge pages support [1].
> >
> > I didn't think it high priority only because I think most hugetlbfs users
> > should be using it shared, but maybe I'm wrong.. Then it got lost indeed.
>
> It turns out people are doing this:
>
> mmap(NULL, SEND_BUFF_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0)
>
> Which makes some sense...
Yes, thanks Jason. Though my understanding is that hugetlb pages are normally
reserved in production, used with careful pre-provisioning on which app would
consume how much (either 2M or 1G). Such an app (especially if it forks
randomly) could actually easily exaust the huge page pool.
>
> Gal, you could also MADV_DONTFORK this range if you are explicitly
> allocating them via special mmap.
Yeah I wanted to mention this one too but I just forgot when reply: the issue
thread previously pasted smells like some people would like to drop
MADV_DONTFORK, but if it's able to still be applied I don't know why not.. It
should still be better than depending on the coming patch imho - it marks the
region as "not necessary for the fork" then we skip the whole hugetlbfs chunk.
It should at least be more efficient if applicable.
Thanks,
--
Peter Xu
Powered by blists - more mailing lists