Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-12 Thread Yang Shi
On 6/12/19 11:44 AM, Hugh Dickins wrote: On Mon, 10 Jun 2019, Yang Shi wrote: On 6/7/19 8:58 PM, Hugh Dickins wrote: Yes, that is correct; and correctly placed. But a little more is needed: see how mm/memory.c's transhuge_vma_suitable() will only allow a pmd to be used instead of a pte if th

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-12 Thread Hugh Dickins
On Mon, 10 Jun 2019, Yang Shi wrote: > On 6/7/19 8:58 PM, Hugh Dickins wrote: > > Yes, that is correct; and correctly placed. But a little more is needed: > > see how mm/memory.c's transhuge_vma_suitable() will only allow a pmd to > > be used instead of a pte if the vma offset and size permit. smap

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-10 Thread Yang Shi
On 6/7/19 8:58 PM, Hugh Dickins wrote: On Wed, 24 Apr 2019, Yang Shi wrote: The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") introduced THPeligible bit for processes' smaps. But, when checking the eligibility for shmem vma, __transparent_hugepage_enabled() is ca

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-07 Thread Hugh Dickins
On Wed, 24 Apr 2019, Yang Shi wrote: > The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each > vma") introduced THPeligible bit for processes' smaps. But, when checking > the eligibility for shmem vma, __transparent_hugepage_enabled() is > called to override the result from shme

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-07 Thread Yang Shi
On 6/7/19 3:57 AM, Hugh Dickins wrote: On Thu, 6 Jun 2019, Yang Shi wrote: On 5/7/19 10:10 AM, Yang Shi wrote: On 5/7/19 3:47 AM, Michal Hocko wrote: [Hmm, I thought, Hugh was CCed] On Mon 06-05-19 16:37:42, Yang Shi wrote: On 4/28/19 12:13 PM, Yang Shi wrote: On 4/23/19 10:52 AM, Michal

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-07 Thread Michal Hocko
On Fri 07-06-19 03:57:18, Hugh Dickins wrote: [...] > The addition of "THPeligible" without an "Anon" in its name was > unfortunate. I suppose we're two releases too late to change that. Well, I do not really see any reason why THPeligible should be Anon specific at all. Even if ... > Applying pr

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-07 Thread Hugh Dickins
On Thu, 6 Jun 2019, Yang Shi wrote: > On 5/7/19 10:10 AM, Yang Shi wrote: > > On 5/7/19 3:47 AM, Michal Hocko wrote: > > > [Hmm, I thought, Hugh was CCed] > > > > > > On Mon 06-05-19 16:37:42, Yang Shi wrote: > > > > > > > > On 4/28/19 12:13 PM, Yang Shi wrote: > > > > > > > > > > On 4/23/19 10:

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-06 Thread Yang Shi
On 5/7/19 10:10 AM, Yang Shi wrote: On 5/7/19 3:47 AM, Michal Hocko wrote: [Hmm, I thought, Hugh was CCed] On Mon 06-05-19 16:37:42, Yang Shi wrote: On 4/28/19 12:13 PM, Yang Shi wrote: On 4/23/19 10:52 AM, Michal Hocko wrote: On Wed 24-04-19 00:43:01, Yang Shi wrote: The commit 7635

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-05-07 Thread Yang Shi
On 5/7/19 3:47 AM, Michal Hocko wrote: [Hmm, I thought, Hugh was CCed] On Mon 06-05-19 16:37:42, Yang Shi wrote: On 4/28/19 12:13 PM, Yang Shi wrote: On 4/23/19 10:52 AM, Michal Hocko wrote: On Wed 24-04-19 00:43:01, Yang Shi wrote: The commit 7635d9cbe832 ("mm, thp, proc: report THP el

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-05-07 Thread Michal Hocko
[Hmm, I thought, Hugh was CCed] On Mon 06-05-19 16:37:42, Yang Shi wrote: > > > On 4/28/19 12:13 PM, Yang Shi wrote: > > > > > > On 4/23/19 10:52 AM, Michal Hocko wrote: > > > On Wed 24-04-19 00:43:01, Yang Shi wrote: > > > > The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility >

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-05-06 Thread Yang Shi
On 4/28/19 12:13 PM, Yang Shi wrote: On 4/23/19 10:52 AM, Michal Hocko wrote: On Wed 24-04-19 00:43:01, Yang Shi wrote: The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") introduced THPeligible bit for processes' smaps. But, when checking the eligibility for s

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-04-28 Thread Yang Shi
On 4/23/19 10:52 AM, Michal Hocko wrote: On Wed 24-04-19 00:43:01, Yang Shi wrote: The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") introduced THPeligible bit for processes' smaps. But, when checking the eligibility for shmem vma, __transparent_hugepage_enabled()

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-04-24 Thread Michal Hocko
On Tue 23-04-19 17:22:36, Yang Shi wrote: > > > On 4/23/19 11:34 AM, Yang Shi wrote: > > > > > > On 4/23/19 10:52 AM, Michal Hocko wrote: > > > On Wed 24-04-19 00:43:01, Yang Shi wrote: > > > > The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility > > > > for each > > > > vma") introd

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-04-23 Thread Yang Shi
On 4/23/19 11:34 AM, Yang Shi wrote: On 4/23/19 10:52 AM, Michal Hocko wrote: On Wed 24-04-19 00:43:01, Yang Shi wrote: The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") introduced THPeligible bit for processes' smaps. But, when checking the eligibility for s

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-04-23 Thread Yang Shi
On 4/23/19 10:52 AM, Michal Hocko wrote: On Wed 24-04-19 00:43:01, Yang Shi wrote: The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") introduced THPeligible bit for processes' smaps. But, when checking the eligibility for shmem vma, __transparent_hugepage_enabled()

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-04-23 Thread Michal Hocko
On Wed 24-04-19 00:43:01, Yang Shi wrote: > The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each > vma") introduced THPeligible bit for processes' smaps. But, when checking > the eligibility for shmem vma, __transparent_hugepage_enabled() is > called to override the result from

[v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-04-23 Thread Yang Shi
The commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") introduced THPeligible bit for processes' smaps. But, when checking the eligibility for shmem vma, __transparent_hugepage_enabled() is called to override the result from shmem_huge_enabled(). It may result in the anonym