Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-07 Thread Daniel Jordan
On Thu, May 07, 2020 at 02:18:42PM -0700, Alexander Duyck wrote: > The idea behind merging ranges it to address possible cases where a > range is broken up such that there is a hole in a max order block as a > result. Gah, yes, you're right, there could be multiple ranges in a max order block, so

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-07 Thread Alexander Duyck
On Thu, May 7, 2020 at 1:20 PM Daniel Jordan wrote: > > On Thu, May 07, 2020 at 08:26:26AM -0700, Alexander Duyck wrote: > > On Wed, May 6, 2020 at 3:39 PM Daniel Jordan > > wrote: > > > On Tue, May 05, 2020 at 08:27:52AM -0700, Alexander Duyck wrote: > > > > > Maybe it's better to leave deferre

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-07 Thread Daniel Jordan
On Thu, May 07, 2020 at 08:26:26AM -0700, Alexander Duyck wrote: > On Wed, May 6, 2020 at 3:39 PM Daniel Jordan > wrote: > > On Tue, May 05, 2020 at 08:27:52AM -0700, Alexander Duyck wrote: > > > > Maybe it's better to leave deferred_init_maxorder alone and adapt the > > > > multithreading to the

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-07 Thread Alexander Duyck
On Wed, May 6, 2020 at 3:39 PM Daniel Jordan wrote: > > On Tue, May 05, 2020 at 08:27:52AM -0700, Alexander Duyck wrote: > > As it turns out that deferred_free_range will be setting the > > migratetype for the page. In a sparse config the migratetype bits are > > stored in the section bitmap. So t

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-06 Thread Daniel Jordan
On Tue, May 05, 2020 at 08:27:52AM -0700, Alexander Duyck wrote: > As it turns out that deferred_free_range will be setting the > migratetype for the page. In a sparse config the migratetype bits are > stored in the section bitmap. So to avoid cacheline bouncing it would > make sense to section ali

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-05 Thread Alexander Duyck
On Mon, May 4, 2020 at 5:54 PM Daniel Jordan wrote: > > On Mon, May 04, 2020 at 03:10:46PM -0700, Alexander Duyck wrote: > > So we cannot stop in the middle of a max order block. That shouldn't > > be possible as part of the issue is that the buddy allocator will > > attempt to access the buddy fo

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-04 Thread Daniel Jordan
On Mon, May 04, 2020 at 03:10:46PM -0700, Alexander Duyck wrote: > So we cannot stop in the middle of a max order block. That shouldn't > be possible as part of the issue is that the buddy allocator will > attempt to access the buddy for the page which could cause issues if > it tries to merge the

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-05-04 Thread Alexander Duyck
On Thu, Apr 30, 2020 at 7:45 PM Daniel Jordan wrote: > > Hi Alex, > > On Thu, Apr 30, 2020 at 02:43:28PM -0700, Alexander Duyck wrote: > > On 4/30/2020 1:11 PM, Daniel Jordan wrote: > > > padata will soon divide up pfn ranges between threads when parallelizing > > > deferred init, and deferred_ini

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-04-30 Thread Daniel Jordan
Hi Alex, On Thu, Apr 30, 2020 at 02:43:28PM -0700, Alexander Duyck wrote: > On 4/30/2020 1:11 PM, Daniel Jordan wrote: > > padata will soon divide up pfn ranges between threads when parallelizing > > deferred init, and deferred_init_maxorder() complicates that by using an > > opaque index in addit

Re: [PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-04-30 Thread Alexander Duyck
On 4/30/2020 1:11 PM, Daniel Jordan wrote: padata will soon divide up pfn ranges between threads when parallelizing deferred init, and deferred_init_maxorder() complicates that by using an opaque index in addition to start and end pfns. Move the index outside the function to make splitting the j

[PATCH 5/7] mm: move zone iterator outside of deferred_init_maxorder()

2020-04-30 Thread Daniel Jordan
padata will soon divide up pfn ranges between threads when parallelizing deferred init, and deferred_init_maxorder() complicates that by using an opaque index in addition to start and end pfns. Move the index outside the function to make splitting the job easier, and simplify the code while at it.