Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Qian Cai
On Wed, 2019-10-23 at 11:03 -0400, Rafael Aquini wrote: > > > > this still isn't a bulletproof fix. Maybe just terminate the list > > > > walk if freecount reaches 1024. Would anyone really care? > > > > > > > > Sigh. I wonder if anyone really uses this thing for anything > > > > important.

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Rafael Aquini
On Wed, Oct 23, 2019 at 10:48:13AM -0400, Qian Cai wrote: > On Wed, 2019-10-23 at 10:30 -0400, Waiman Long wrote: > > On 10/22/19 5:59 PM, Andrew Morton wrote: > > > On Tue, 22 Oct 2019 12:21:56 -0400 Waiman Long wrote: > > > > > > > The pagetypeinfo_showfree_print() function prints out the

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Qian Cai
On Wed, 2019-10-23 at 11:01 -0400, Waiman Long wrote: > On 10/23/19 10:48 AM, Qian Cai wrote: > > > > this still isn't a bulletproof fix. Maybe just terminate the list > > > > walk if freecount reaches 1024. Would anyone really care? > > > > > > > > Sigh. I wonder if anyone really uses this

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Waiman Long
On 10/23/19 10:48 AM, Qian Cai wrote: >>> this still isn't a bulletproof fix. Maybe just terminate the list >>> walk if freecount reaches 1024. Would anyone really care? >>> >>> Sigh. I wonder if anyone really uses this thing for anything >>> important. Can we just remove it all? >>> >>

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Qian Cai
On Wed, 2019-10-23 at 10:30 -0400, Waiman Long wrote: > On 10/22/19 5:59 PM, Andrew Morton wrote: > > On Tue, 22 Oct 2019 12:21:56 -0400 Waiman Long wrote: > > > > > The pagetypeinfo_showfree_print() function prints out the number of > > > free blocks for each of the page orders and migrate

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Waiman Long
On 10/22/19 5:59 PM, Andrew Morton wrote: > On Tue, 22 Oct 2019 12:21:56 -0400 Waiman Long wrote: > >> The pagetypeinfo_showfree_print() function prints out the number of >> free blocks for each of the page orders and migrate types. The current >> code just iterates the each of the free lists to

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Qian Cai
> On Oct 23, 2019, at 5:56 AM, Mel Gorman wrote: > > Again, the cost is when reading a proc file. From what Andrew said, > the lock is necessary to safely walk the list but if anything. I would > be ok with limiting the length of the walk but honestly, I would also > be ok with simply

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Mel Gorman
On Wed, Oct 23, 2019 at 11:04:22AM +0200, Michal Hocko wrote: > On Wed 23-10-19 09:31:43, Mel Gorman wrote: > > On Tue, Oct 22, 2019 at 06:57:45PM +0200, Michal Hocko wrote: > > > [Cc Mel] > > > > > > On Tue 22-10-19 12:21:56, Waiman Long wrote: > > > > The pagetypeinfo_showfree_print() function

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Michal Hocko
On Wed 23-10-19 09:31:43, Mel Gorman wrote: > On Tue, Oct 22, 2019 at 06:57:45PM +0200, Michal Hocko wrote: > > [Cc Mel] > > > > On Tue 22-10-19 12:21:56, Waiman Long wrote: > > > The pagetypeinfo_showfree_print() function prints out the number of > > > free blocks for each of the page orders and

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Mel Gorman
On Tue, Oct 22, 2019 at 06:57:45PM +0200, Michal Hocko wrote: > [Cc Mel] > > On Tue 22-10-19 12:21:56, Waiman Long wrote: > > The pagetypeinfo_showfree_print() function prints out the number of > > free blocks for each of the page orders and migrate types. The current > > code just iterates the

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-23 Thread Michal Hocko
On Tue 22-10-19 14:59:02, Andrew Morton wrote: > On Tue, 22 Oct 2019 12:21:56 -0400 Waiman Long wrote: [...] > > - for (mtype = 0; mtype < MIGRATE_TYPES; mtype++) { > > - seq_printf(m, "Node %4d, zone %8s, type %12s ", > > - pgdat->node_id, > > -

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-22 Thread David Rientjes
On Tue, 22 Oct 2019, Waiman Long wrote: > >>> and used nr_free to compute the missing count. Since MIGRATE_MOVABLE > >>> is usually the largest one on large memory systems, this is the one > >>> to be skipped. Since the printing order is migration-type => order, we > >>> will have to store the

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-22 Thread Andrew Morton
On Tue, 22 Oct 2019 12:21:56 -0400 Waiman Long wrote: > The pagetypeinfo_showfree_print() function prints out the number of > free blocks for each of the page orders and migrate types. The current > code just iterates the each of the free lists to get counts. There are > bug reports about hard

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-22 Thread Waiman Long
On 10/22/19 2:00 PM, Waiman Long wrote: > On 10/22/19 12:57 PM, Michal Hocko wrote: > >>> and used nr_free to compute the missing count. Since MIGRATE_MOVABLE >>> is usually the largest one on large memory systems, this is the one >>> to be skipped. Since the printing order is migration-type =>

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-22 Thread Waiman Long
On 10/22/19 12:57 PM, Michal Hocko wrote: > [Cc Mel] > > On Tue 22-10-19 12:21:56, Waiman Long wrote: >> The pagetypeinfo_showfree_print() function prints out the number of >> free blocks for each of the page orders and migrate types. The current >> code just iterates the each of the free lists to

Re: [PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-22 Thread Michal Hocko
[Cc Mel] On Tue 22-10-19 12:21:56, Waiman Long wrote: > The pagetypeinfo_showfree_print() function prints out the number of > free blocks for each of the page orders and migrate types. The current > code just iterates the each of the free lists to get counts. There are > bug reports about hard

[PATCH] mm/vmstat: Reduce zone lock hold time when reading /proc/pagetypeinfo

2019-10-22 Thread Waiman Long
The pagetypeinfo_showfree_print() function prints out the number of free blocks for each of the page orders and migrate types. The current code just iterates the each of the free lists to get counts. There are bug reports about hard lockup panics when reading the /proc/pagetyeinfo file just