Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-15 Thread Michal Hocko
On Wed 14-08-19 21:51:47, Yang Shi wrote: > > > On 8/14/19 4:08 AM, Michal Hocko wrote: > > On Mon 12-08-19 10:00:17, Yang Shi wrote: > > > > > > On 8/12/19 2:34 AM, Michal Hocko wrote: > > > > On Fri 09-08-19 16:54:43, Yang Shi wrote: > > > > > On 8/9/19 11:26 AM, Yang Shi wrote: > > > > > > On

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-14 Thread Yang Shi
On 8/14/19 5:55 AM, Vlastimil Babka wrote: On 8/12/19 7:00 PM, Yang Shi wrote: I can see that memcg rss size was the primary problem David was looking at. But MemAvailable will not help with that, right? Moreover is Yes, but David actually would like to have memcg MemAvailable (the accounter

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-14 Thread Yang Shi
On 8/14/19 5:49 AM, Vlastimil Babka wrote: On 8/9/19 8:26 PM, Yang Shi wrote: Here the new counter is introduced for patch 2/2 to account deferred split THPs into available memory since NR_ANON_THPS may contain non-deferred split THPs. I could use an internal counter for deferred split THPs,

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-14 Thread Yang Shi
On 8/14/19 4:08 AM, Michal Hocko wrote: On Mon 12-08-19 10:00:17, Yang Shi wrote: On 8/12/19 2:34 AM, Michal Hocko wrote: On Fri 09-08-19 16:54:43, Yang Shi wrote: On 8/9/19 11:26 AM, Yang Shi wrote: On 8/9/19 11:02 AM, Michal Hocko wrote: [...] I have to study the code some more but is

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-14 Thread Vlastimil Babka
On 8/12/19 7:00 PM, Yang Shi wrote: >> I can see that memcg rss size was the primary problem David was looking >> at. But MemAvailable will not help with that, right? Moreover is > > Yes, but David actually would like to have memcg MemAvailable (the > accounter like the global one), which should

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-14 Thread Michal Hocko
On Wed 14-08-19 14:49:18, Vlastimil Babka wrote: > On 8/9/19 8:26 PM, Yang Shi wrote: > > Here the new counter is introduced for patch 2/2 to account deferred > > split THPs into available memory since NR_ANON_THPS may contain > > non-deferred split THPs. > > > > I could use an internal counter

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-14 Thread Vlastimil Babka
On 8/9/19 8:26 PM, Yang Shi wrote: > Here the new counter is introduced for patch 2/2 to account deferred > split THPs into available memory since NR_ANON_THPS may contain > non-deferred split THPs. > > I could use an internal counter for deferred split THPs, but if it is > accounted by mod_nod

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-14 Thread Michal Hocko
On Mon 12-08-19 10:00:17, Yang Shi wrote: > > > On 8/12/19 2:34 AM, Michal Hocko wrote: > > On Fri 09-08-19 16:54:43, Yang Shi wrote: > > > > > > On 8/9/19 11:26 AM, Yang Shi wrote: > > > > > > > > On 8/9/19 11:02 AM, Michal Hocko wrote: > > [...] > > > > > I have to study the code some more bu

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-12 Thread Yang Shi
On 8/12/19 2:34 AM, Michal Hocko wrote: On Fri 09-08-19 16:54:43, Yang Shi wrote: On 8/9/19 11:26 AM, Yang Shi wrote: On 8/9/19 11:02 AM, Michal Hocko wrote: [...] I have to study the code some more but is there any reason why those pages are not accounted as proper THPs anymore? Sure th

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-12 Thread Michal Hocko
On Fri 09-08-19 16:54:43, Yang Shi wrote: > > > On 8/9/19 11:26 AM, Yang Shi wrote: > > > > > > On 8/9/19 11:02 AM, Michal Hocko wrote: [...] > > > I have to study the code some more but is there any reason why those > > > pages are not accounted as proper THPs anymore? Sure they are partially

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-09 Thread Yang Shi
On 8/9/19 11:26 AM, Yang Shi wrote: On 8/9/19 11:02 AM, Michal Hocko wrote: On Fri 09-08-19 09:19:13, Yang Shi wrote: On 8/9/19 1:32 AM, Michal Hocko wrote: On Fri 09-08-19 07:57:44, Yang Shi wrote: When doing partial unmap to THP, the pages in the affected range would be considered to

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-09 Thread Yang Shi
On 8/9/19 11:02 AM, Michal Hocko wrote: On Fri 09-08-19 09:19:13, Yang Shi wrote: On 8/9/19 1:32 AM, Michal Hocko wrote: On Fri 09-08-19 07:57:44, Yang Shi wrote: When doing partial unmap to THP, the pages in the affected range would be considered to be reclaimable when memory pressure com

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-09 Thread Michal Hocko
On Fri 09-08-19 09:19:13, Yang Shi wrote: > > > On 8/9/19 1:32 AM, Michal Hocko wrote: > > On Fri 09-08-19 07:57:44, Yang Shi wrote: > > > When doing partial unmap to THP, the pages in the affected range would > > > be considered to be reclaimable when memory pressure comes in. And, > > > such p

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-09 Thread Yang Shi
On 8/9/19 1:32 AM, Michal Hocko wrote: On Fri 09-08-19 07:57:44, Yang Shi wrote: When doing partial unmap to THP, the pages in the affected range would be considered to be reclaimable when memory pressure comes in. And, such pages would be put on deferred split queue and get minus from the m

Re: [RESEND PATCH 1/2 -mm] mm: account lazy free pages separately

2019-08-09 Thread Michal Hocko
On Fri 09-08-19 07:57:44, Yang Shi wrote: > When doing partial unmap to THP, the pages in the affected range would > be considered to be reclaimable when memory pressure comes in. And, > such pages would be put on deferred split queue and get minus from the > memory statistics (i.e. /proc/meminfo)