Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned

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

 



On Fri, Sep 25, 2020 at 5:41 PM Jason Gunthorpe <jgg@xxxxxxxx> wrote:
>
> I don't completely grok the consequences of the anon_vma check. We
> can exclude file backed mappings as they are broken for pinning
> anyhow, so what is left that could be MAP_PRIVATE of a non-anon_vma?

It really shouldn't ever happen.

The only way a COW vma can have a NULL anon_vma should be if it has no
pages mapped at all.

Technically I think it could happen if you only ever mapped the
special zero page in there (but that shouldn't then get to the
"vm_normal_page()").

> Otherwise, I do prefer Peter's version because of the GFP_KERNEL. To
> touch on your other email..

Yeah, no, I just hadn't seen a new version, so I started getting antsy
and that's when I decided to see what a minimal patch looks like.

I think that over the weekend I'll do Peter's version but with the
"page_mapcount() == 1"  check, because I'm starting to like that
better than the mm->has_pinned.

Comments on that plan?

              Linus




[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