Re: linux-next: Tree for Jul 6 (mm/memory_failure.c)

2020-07-06 Thread Randy Dunlap
On 7/6/20 5:35 PM, Joonsoo Kim wrote:
> On Mon, Jul 06, 2020 at 09:59:06AM -0700, Randy Dunlap wrote:
>> On 7/6/20 12:40 AM, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20200703:
>>>
>>
>> on i386:
>>
>> when CONFIG_MIGRATION is not set/enabled:
>>
>> ../mm/memory-failure.c: In function ‘new_page’:
>> ../mm/memory-failure.c:1688:9: error: implicit declaration of function 
>> ‘alloc_migration_target’; did you mean ‘alloc_migrate_target’? 
>> [-Werror=implicit-function-declaration]
>>   return alloc_migration_target(p, (unsigned long));
>>  ^~
>>
>>
>> -- 
>> ~Randy
>> Reported-by: Randy Dunlap 
> 
> Hello,
> 
> Thanks for reporting.
> 
> Below is the fix for this error.
> Andrew, Could you squash this fix into the patch,
> "mm-migrate-make-a-standard-target-allocation-function.patch"?
> 
> Thanks.
> 
> 
> --->8---
> From 5fac269125dfb2d03e38a75319305e0e70b23a4b Mon Sep 17 00:00:00 2001
> From: Joonsoo Kim 
> Date: Tue, 7 Jul 2020 09:16:58 +0900
> Subject: [PATCH] mm/migrate: fix for
>  mm-migrate-make-a-standard-target-allocation-function.patch in mm tree
> 
> new_page_nodemask() is renamed to alloc_migration_target in
> mm-migrate-make-a-standard-target-allocation-function.patch, but,
> one declaration for !CONFIG_MIGRATION case is missed. This patch fixes it.
> 
> Reported-by: Randy Dunlap 
> Signed-off-by: Joonsoo Kim 

Works for me. Thanks.

Acked-by: Randy Dunlap  # build-tested


> ---
>  include/linux/migrate.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/migrate.h b/include/linux/migrate.h
> index 5e9c866..cc56f0d 100644
> --- a/include/linux/migrate.h
> +++ b/include/linux/migrate.h
> @@ -60,8 +60,8 @@ static inline int migrate_pages(struct list_head *l, 
> new_page_t new,
>   free_page_t free, unsigned long private, enum migrate_mode mode,
>   int reason)
>   { return -ENOSYS; }
> -static inline struct page *new_page_nodemask(struct page *page,
> - int preferred_nid, nodemask_t *nodemask)
> +static inline struct page *alloc_migration_target(struct page *page,
> + unsigned long private)
>   { return NULL; }
>  static inline int isolate_movable_page(struct page *page, isolate_mode_t 
> mode)
>   { return -EBUSY; }
> 


-- 
~Randy


Re: linux-next: Tree for Jul 6 (mm/memory_failure.c)

2020-07-06 Thread Stephen Rothwell
Hi all,

On Tue, 7 Jul 2020 09:35:15 +0900 Joonsoo Kim  wrote:
>
> On Mon, Jul 06, 2020 at 09:59:06AM -0700, Randy Dunlap wrote:
> > 
> > on i386:
> > 
> > when CONFIG_MIGRATION is not set/enabled:
> > 
> > ../mm/memory-failure.c: In function ‘new_page’:
> > ../mm/memory-failure.c:1688:9: error: implicit declaration of function 
> > ‘alloc_migration_target’; did you mean ‘alloc_migrate_target’? 
> > [-Werror=implicit-function-declaration]
> >   return alloc_migration_target(p, (unsigned long));
> >  ^~
> 
> Thanks for reporting.
> 
> Below is the fix for this error.
> Andrew, Could you squash this fix into the patch,
> "mm-migrate-make-a-standard-target-allocation-function.patch"?
> 
> Thanks.
> 
> 
> --->8---  
> From 5fac269125dfb2d03e38a75319305e0e70b23a4b Mon Sep 17 00:00:00 2001
> From: Joonsoo Kim 
> Date: Tue, 7 Jul 2020 09:16:58 +0900
> Subject: [PATCH] mm/migrate: fix for
>  mm-migrate-make-a-standard-target-allocation-function.patch in mm tree
> 
> new_page_nodemask() is renamed to alloc_migration_target in
> mm-migrate-make-a-standard-target-allocation-function.patch, but,
> one declaration for !CONFIG_MIGRATION case is missed. This patch fixes it.
> 
> Reported-by: Randy Dunlap 
> Signed-off-by: Joonsoo Kim 
> ---
>  include/linux/migrate.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/migrate.h b/include/linux/migrate.h
> index 5e9c866..cc56f0d 100644
> --- a/include/linux/migrate.h
> +++ b/include/linux/migrate.h
> @@ -60,8 +60,8 @@ static inline int migrate_pages(struct list_head *l, 
> new_page_t new,
>   free_page_t free, unsigned long private, enum migrate_mode mode,
>   int reason)
>   { return -ENOSYS; }
> -static inline struct page *new_page_nodemask(struct page *page,
> - int preferred_nid, nodemask_t *nodemask)
> +static inline struct page *alloc_migration_target(struct page *page,
> + unsigned long private)
>   { return NULL; }
>  static inline int isolate_movable_page(struct page *page, isolate_mode_t 
> mode)
>   { return -EBUSY; }
> -- 
> 2.7.4
> 

I have added that to linux-next today.

-- 
Cheers,
Stephen Rothwell


pgpSSc4V1yLEa.pgp
Description: OpenPGP digital signature


Re: linux-next: Tree for Jul 6 (mm/memory_failure.c)

2020-07-06 Thread Joonsoo Kim
On Mon, Jul 06, 2020 at 09:59:06AM -0700, Randy Dunlap wrote:
> On 7/6/20 12:40 AM, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Changes since 20200703:
> > 
> 
> on i386:
> 
> when CONFIG_MIGRATION is not set/enabled:
> 
> ../mm/memory-failure.c: In function ‘new_page’:
> ../mm/memory-failure.c:1688:9: error: implicit declaration of function 
> ‘alloc_migration_target’; did you mean ‘alloc_migrate_target’? 
> [-Werror=implicit-function-declaration]
>   return alloc_migration_target(p, (unsigned long));
>  ^~
> 
> 
> -- 
> ~Randy
> Reported-by: Randy Dunlap 

Hello,

Thanks for reporting.

Below is the fix for this error.
Andrew, Could you squash this fix into the patch,
"mm-migrate-make-a-standard-target-allocation-function.patch"?

Thanks.


--->8---
>From 5fac269125dfb2d03e38a75319305e0e70b23a4b Mon Sep 17 00:00:00 2001
From: Joonsoo Kim 
Date: Tue, 7 Jul 2020 09:16:58 +0900
Subject: [PATCH] mm/migrate: fix for
 mm-migrate-make-a-standard-target-allocation-function.patch in mm tree

new_page_nodemask() is renamed to alloc_migration_target in
mm-migrate-make-a-standard-target-allocation-function.patch, but,
one declaration for !CONFIG_MIGRATION case is missed. This patch fixes it.

Reported-by: Randy Dunlap 
Signed-off-by: Joonsoo Kim 
---
 include/linux/migrate.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 5e9c866..cc56f0d 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -60,8 +60,8 @@ static inline int migrate_pages(struct list_head *l, 
new_page_t new,
free_page_t free, unsigned long private, enum migrate_mode mode,
int reason)
{ return -ENOSYS; }
-static inline struct page *new_page_nodemask(struct page *page,
-   int preferred_nid, nodemask_t *nodemask)
+static inline struct page *alloc_migration_target(struct page *page,
+   unsigned long private)
{ return NULL; }
 static inline int isolate_movable_page(struct page *page, isolate_mode_t mode)
{ return -EBUSY; }
-- 
2.7.4



Re: linux-next: Tree for Jul 6 (mm/memory_failure.c)

2020-07-06 Thread Randy Dunlap
On 7/6/20 12:40 AM, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20200703:
> 

on i386:

when CONFIG_MIGRATION is not set/enabled:

../mm/memory-failure.c: In function ‘new_page’:
../mm/memory-failure.c:1688:9: error: implicit declaration of function 
‘alloc_migration_target’; did you mean ‘alloc_migrate_target’? 
[-Werror=implicit-function-declaration]
  return alloc_migration_target(p, (unsigned long));
 ^~


-- 
~Randy
Reported-by: Randy Dunlap