Re: [PATCH 1/4] mm: Trial do_wp_page() simplification

Linus Torvalds
2020-09-14T22:59:57Z

On Mon, Sep 14, 2020 at 3:55 PM Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> Just as an aside, the RDMA stuff is also supposed to set MADV_DONTFORK
> on these regions, so I'm a bit puzzled what is happening here.

Did the fork perhaps happen _before_ , so the pages are shared when
you do the pin?

MADV_DONTFORK doesn't mean COW doesn't happen. It just means that the
next fork() won't be copying that memory area.

That said, it's possible that the test cases do something invalid - or
maybe we've broken MADV_DONTFORK - and it all just happened to work
before.

So it's possible the breakage is exposing some other bug..

Linus