Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-24 Thread Vlastimil Babka
On 07/21/2017 04:39 PM, Michal Hocko wrote: > From: Michal Hocko > > build_zonelists gradually builds zonelists from the nearest to the most > distant node. As we do not know how many populated zones we will have in > each node we rely on the _zoneref to terminate initialized

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-24 Thread Vlastimil Babka
On 07/21/2017 04:39 PM, Michal Hocko wrote: > From: Michal Hocko > > build_zonelists gradually builds zonelists from the nearest to the most > distant node. As we do not know how many populated zones we will have in > each node we rely on the _zoneref to terminate initialized part of the >

[PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-21 Thread Michal Hocko
From: Michal Hocko build_zonelists gradually builds zonelists from the nearest to the most distant node. As we do not know how many populated zones we will have in each node we rely on the _zoneref to terminate initialized part of the zonelist by a NULL zone. While this is

[PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-21 Thread Michal Hocko
From: Michal Hocko build_zonelists gradually builds zonelists from the nearest to the most distant node. As we do not know how many populated zones we will have in each node we rely on the _zoneref to terminate initialized part of the zonelist by a NULL zone. While this is functionally correct

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-20 Thread Michal Hocko
On Thu 20-07-17 08:55:42, Vlastimil Babka wrote: > On 07/14/2017 10:00 AM, Michal Hocko wrote: > > From: Michal Hocko > > > > build_zonelists gradually builds zonelists from the nearest to the most > > distant node. As we do not know how many populated zones we will have in > >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-20 Thread Michal Hocko
On Thu 20-07-17 08:55:42, Vlastimil Babka wrote: > On 07/14/2017 10:00 AM, Michal Hocko wrote: > > From: Michal Hocko > > > > build_zonelists gradually builds zonelists from the nearest to the most > > distant node. As we do not know how many populated zones we will have in > > each node we rely

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-20 Thread Vlastimil Babka
On 07/14/2017 10:00 AM, Michal Hocko wrote: > From: Michal Hocko > > build_zonelists gradually builds zonelists from the nearest to the most > distant node. As we do not know how many populated zones we will have in > each node we rely on the _zoneref to terminate initialized

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-20 Thread Vlastimil Babka
On 07/14/2017 10:00 AM, Michal Hocko wrote: > From: Michal Hocko > > build_zonelists gradually builds zonelists from the nearest to the most > distant node. As we do not know how many populated zones we will have in > each node we rely on the _zoneref to terminate initialized part of the >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Michal Hocko
On Mon 17-07-17 09:58:04, Mel Gorman wrote: > On Mon, Jul 17, 2017 at 10:19:42AM +0200, Michal Hocko wrote: > > On Mon 17-07-17 09:07:23, Mel Gorman wrote: > > > On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > > > > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > > > > Fairly sure

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Michal Hocko
On Mon 17-07-17 09:58:04, Mel Gorman wrote: > On Mon, Jul 17, 2017 at 10:19:42AM +0200, Michal Hocko wrote: > > On Mon 17-07-17 09:07:23, Mel Gorman wrote: > > > On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > > > > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > > > > Fairly sure

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Mel Gorman
On Mon, Jul 17, 2017 at 10:19:42AM +0200, Michal Hocko wrote: > On Mon 17-07-17 09:07:23, Mel Gorman wrote: > > On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > > > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > > > Fairly sure that's not what you meant. > > > > > > > > > > > > >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Mel Gorman
On Mon, Jul 17, 2017 at 10:19:42AM +0200, Michal Hocko wrote: > On Mon 17-07-17 09:07:23, Mel Gorman wrote: > > On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > > > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > > > Fairly sure that's not what you meant. > > > > > > > > > > > > >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Michal Hocko
On Mon 17-07-17 09:07:23, Mel Gorman wrote: > On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > > Fairly sure that's not what you meant. > > > > > > > > > > pg_data_t *node = NODE_DATA(node_order[i]); > > > > > > >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Michal Hocko
On Mon 17-07-17 09:07:23, Mel Gorman wrote: > On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > > Fairly sure that's not what you meant. > > > > > > > > > > pg_data_t *node = NODE_DATA(node_order[i]); > > > > > > >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Mel Gorman
On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > Fairly sure that's not what you meant. > > > > > > > pg_data_t *node = NODE_DATA(node_order[i]); > > > > > > - zoneref_idx = build_zonelists_node(node, zonelist,

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Mel Gorman
On Mon, Jul 17, 2017 at 08:06:40AM +0200, Michal Hocko wrote: > On Fri 14-07-17 15:18:23, Mel Gorman wrote: > > Fairly sure that's not what you meant. > > > > > > > pg_data_t *node = NODE_DATA(node_order[i]); > > > > > > - zoneref_idx = build_zonelists_node(node, zonelist,

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Michal Hocko
On Fri 14-07-17 15:18:23, Mel Gorman wrote: > On Fri, Jul 14, 2017 at 03:02:42PM +0200, Michal Hocko wrote: [...] > > What do you think about this on top? > > --- > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 49bade7ff049..3b98524c04ec 100644 > > --- a/mm/page_alloc.c > > +++

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-17 Thread Michal Hocko
On Fri 14-07-17 15:18:23, Mel Gorman wrote: > On Fri, Jul 14, 2017 at 03:02:42PM +0200, Michal Hocko wrote: [...] > > What do you think about this on top? > > --- > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 49bade7ff049..3b98524c04ec 100644 > > --- a/mm/page_alloc.c > > +++

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Mel Gorman
On Fri, Jul 14, 2017 at 03:02:42PM +0200, Michal Hocko wrote: > > It *might* be safer given the next patch to zero out the remainder of > > the _zonerefs to that there is no combination of node add/remove that has > > an iterator working with a semi-valid _zoneref which is beyond the last > >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Mel Gorman
On Fri, Jul 14, 2017 at 03:02:42PM +0200, Michal Hocko wrote: > > It *might* be safer given the next patch to zero out the remainder of > > the _zonerefs to that there is no combination of node add/remove that has > > an iterator working with a semi-valid _zoneref which is beyond the last > >

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Michal Hocko
On Fri 14-07-17 13:46:46, Mel Gorman wrote: > On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > build_zonelists gradually builds zonelists from the nearest to the most > > distant node. As we do not know how many populated zones we will

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Michal Hocko
On Fri 14-07-17 13:46:46, Mel Gorman wrote: > On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > build_zonelists gradually builds zonelists from the nearest to the most > > distant node. As we do not know how many populated zones we will have in > > each

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Mel Gorman
On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > From: Michal Hocko > > build_zonelists gradually builds zonelists from the nearest to the most > distant node. As we do not know how many populated zones we will have in > each node we rely on the _zoneref to

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Mel Gorman
On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > From: Michal Hocko > > build_zonelists gradually builds zonelists from the nearest to the most > distant node. As we do not know how many populated zones we will have in > each node we rely on the _zoneref to terminate initialized

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Michal Hocko
On Fri 14-07-17 10:55:34, Mel Gorman wrote: > On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > > > > zonelist = >node_zonelists[ZONELIST_NOFALLBACK]; > > - j = build_zonelists_node(pgdat, zonelist, 0); > > - zonelist->_zonerefs[j].zone = NULL; > > -

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Michal Hocko
On Fri 14-07-17 10:55:34, Mel Gorman wrote: > On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > > > > zonelist = >node_zonelists[ZONELIST_NOFALLBACK]; > > - j = build_zonelists_node(pgdat, zonelist, 0); > > - zonelist->_zonerefs[j].zone = NULL; > > -

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Mel Gorman
On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > > zonelist = >node_zonelists[ZONELIST_NOFALLBACK]; > - j = build_zonelists_node(pgdat, zonelist, 0); > - zonelist->_zonerefs[j].zone = NULL; > - zonelist->_zonerefs[j].zone_idx = 0; > + zoneref_idx =

Re: [PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Mel Gorman
On Fri, Jul 14, 2017 at 10:00:03AM +0200, Michal Hocko wrote: > > zonelist = >node_zonelists[ZONELIST_NOFALLBACK]; > - j = build_zonelists_node(pgdat, zonelist, 0); > - zonelist->_zonerefs[j].zone = NULL; > - zonelist->_zonerefs[j].zone_idx = 0; > + zoneref_idx =

[PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Michal Hocko
From: Michal Hocko build_zonelists gradually builds zonelists from the nearest to the most distant node. As we do not know how many populated zones we will have in each node we rely on the _zoneref to terminate initialized part of the zonelist by a NULL zone. While this is

[PATCH 6/9] mm, page_alloc: simplify zonelist initialization

2017-07-14 Thread Michal Hocko
From: Michal Hocko build_zonelists gradually builds zonelists from the nearest to the most distant node. As we do not know how many populated zones we will have in each node we rely on the _zoneref to terminate initialized part of the zonelist by a NULL zone. While this is functionally correct