Re: [PATCH 3/3] mm,thp,shmem: make khugepaged obey tmpfs mount flags

2020-11-26 Thread Rik van Riel
On Thu, 2020-11-26 at 20:42 +0100, Vlastimil Babka wrote: > On 11/26/20 7:14 PM, Rik van Riel wrote: > > On Thu, 2020-11-26 at 18:18 +0100, Vlastimil Babka wrote: > > > > > This patch makes khugepaged treat the mount options > > and/or > > sysfs flag as enabling collapsing of huge pages in case >

Re: [PATCH 3/3] mm,thp,shmem: make khugepaged obey tmpfs mount flags

2020-11-26 Thread Vlastimil Babka
On 11/26/20 7:14 PM, Rik van Riel wrote: > On Thu, 2020-11-26 at 18:18 +0100, Vlastimil Babka wrote: >> On 11/24/20 8:49 PM, Rik van Riel wrote: >>> Currently if thp enabled=[madvise], mounting a tmpfs filesystem >>> with huge=always and mmapping files from that tmpfs does not >>> result in

Re: [PATCH 3/3] mm,thp,shmem: make khugepaged obey tmpfs mount flags

2020-11-26 Thread Rik van Riel
On Thu, 2020-11-26 at 18:18 +0100, Vlastimil Babka wrote: > On 11/24/20 8:49 PM, Rik van Riel wrote: > > Currently if thp enabled=[madvise], mounting a tmpfs filesystem > > with huge=always and mmapping files from that tmpfs does not > > result in khugepaged collapsing those mappings, despite the

Re: [PATCH 3/3] mm,thp,shmem: make khugepaged obey tmpfs mount flags

2020-11-26 Thread Vlastimil Babka
On 11/24/20 8:49 PM, Rik van Riel wrote: Currently if thp enabled=[madvise], mounting a tmpfs filesystem with huge=always and mmapping files from that tmpfs does not result in khugepaged collapsing those mappings, despite the mount flag indicating that it should. Fix that by breaking up the

[PATCH 3/3] mm,thp,shmem: make khugepaged obey tmpfs mount flags

2020-11-24 Thread Rik van Riel
Currently if thp enabled=[madvise], mounting a tmpfs filesystem with huge=always and mmapping files from that tmpfs does not result in khugepaged collapsing those mappings, despite the mount flag indicating that it should. Fix that by breaking up the blocks of tests in hugepage_vma_check a little