Re: [PATCHv2 17/28] thp: skip file huge pmd on copy_huge_pmd()

From: Kirill A. Shutemov
Date: Tue Feb 16 2016 - 05:15:01 EST


On Fri, Feb 12, 2016 at 10:42:09AM -0800, Dave Hansen wrote:
> On 02/11/2016 06:21 AM, Kirill A. Shutemov wrote:
> > File pmds can be safely skip on copy_huge_pmd(), we can re-fault them
> > later. COW for file mappings handled on pte level.
>
> Is this different from 4k pages? I figured we might skip copying
> file-backed ptes on fork, but I couldn't find the code.

Currently, we only filter out on per-VMA basis. See first comment in
copy_page_range().

Here we handle PMD mapped file pages in COW mapping. File THP can be
mapped into COW mapping as result of read page fault.

--
Kirill A. Shutemov