mm/swap.c: workaround for_each_cpu() bug on UP kernel.
PATCH 1/1 mm/swap.c: workaround for_each_cpu() bug on UP kernel.
Since for_each_cpu(cpu, mask) added by commit 2d3854a37e8b767a ("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument if NR_CPUS == 1 due to CONFIG_SMP=n, lru_add_drain_all() is hitting WARN_ON() at __flush_work() added by commit 4d43d395fed12463 ("workqueue: Try to catch flush_work() without INIT_WORK().") by unconditionally calling flush_work() [1].
We should fix for_each_cpu() etc. but we need enough grace period for allowing people to test and fix unexpected behaviors including build failures. Therefore, this patch temporarily duplicates flush_work() for NR_CPUS == 1 case. This patch will be reverted after for_each_cpu() etc. are fixed.
[1] https://lkml.kernel.org/r/[email protected]
--- mm/swap.c | 5 +++++ 1 file changed, 5 insertions(+)
mm/swap.c +5 -0
@@ -694,11 +694,16 @@ void lru_add_drain_all(void)INIT_WORK (work, lru_add_drain_per_cpu);queue_work_on (cpu, mm_percpu_wq, work);cpumask_set_cpu (cpu, &has_work); +#if NR_CPUS ==1 +flush_work (work); +#endif } } +#if NR_CPUS !=1 for_each_cpu (cpu, &has_work)flush_work (&per_cpu (lru_add_drain_work, cpu)); +#endif mutex_unlock (&lock); }
Signature · 1 line
1.8.3.1
Quoted 13 lines · Tetsuo Handa
Since
for_each_cpu(cpu, mask)added by commit2d3854a37e8b767a("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument ifNR_CPUS== 1 due toCONFIG_SMP=n,lru_add_drain_all()is hittingWARN_ON()at__flush_work()added by commit4d43d395fed12463("workqueue: Try to catchflush_work()withoutINIT_WORK().") by unconditionally callingflush_work()[1].We should fix
for_each_cpu()etc. but we need enough grace period for allowing people to test and fix unexpected behaviors including build failures. Therefore, this patch temporarily duplicatesflush_work()forNR_CPUS== 1 case. This patch will be reverted afterfor_each_cpu()etc. are fixed.
Quoted 4 lines
[1] https://lkml.kernel.org/r/[email protected]
Reported-by Guenter Roeck <[email protected]>Signed-off-by Tetsuo Handa <[email protected]>
I agree with the fix/workaround. I tried a complete build with fixed macros, but that doesn't work because (at least) x86 assumes that the "mask" parameter is _not_ evaluated for non-SMP builds - arch/x86/kernel/cpu/cacheinfo.c passes cpu_llc_shared_mask(cpu) as parameter, and that is only defined for SMP builds.
On the plus side, I did not find any other issues, but that doesn't mean much since various build and boot tests in -next fail for other reasons.
Guenter
Quoted 26 lines
--- mm/swap.c | 5 +++++ 1 file changed, 5 insertions(+)mm/swap.c +5
-0@@ -694,11 +694,16 @@ void lru_add_drain_all(void)INIT_WORK (work, lru_add_drain_per_cpu);queue_work_on (cpu, mm_percpu_wq, work);cpumask_set_cpu (cpu, &has_work); +#if NR_CPUS ==1 +flush_work (work); +#endif } } +#if NR_CPUS !=1 for_each_cpu (cpu, &has_work)flush_work (&per_cpu (lru_add_drain_work, cpu)); +#endif mutex_unlock (&lock); }
Would you mind adding a comment explaining this?
That way if, for some reason, the patch isn't reverted in a timely manner, anyone stumbling upon the code knows why it's done the way it is without having to track down this mail thread.
Reviewed by: William Kucharski <[email protected]>
Quoted 47 lines · Tetsuo Handa
Since
for_each_cpu(cpu, mask)added by commit2d3854a37e8b767a("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument ifNR_CPUS== 1 due toCONFIG_SMP=n,lru_add_drain_all()is hittingWARN_ON()at__flush_work()added by commit4d43d395fed12463("workqueue: Try to catchflush_work()withoutINIT_WORK().") by unconditionally callingflush_work()[1].We should fix
for_each_cpu()etc. but we need enough grace period for allowing people to test and fix unexpected behaviors including build failures. Therefore, this patch temporarily duplicatesflush_work()forNR_CPUS== 1 case. This patch will be reverted afterfor_each_cpu()etc. are fixed.[1] https://lkml.kernel.org/r/[email protected]
Reported-by Guenter Roeck <[email protected]>Signed-off-by Tetsuo Handa <[email protected]>---
mm/swap.c| 5 +++++1 file changed, 5 insertions(+)mm/swap.c +5
-0@@ -694,11 +694,16 @@ void lru_add_drain_all(void)INIT_WORK (work, lru_add_drain_per_cpu);queue_work_on (cpu, mm_percpu_wq, work);cpumask_set_cpu (cpu, &has_work); +#if NR_CPUS ==1 +flush_work (work); +#endif } } +#if NR_CPUS !=1 for_each_cpu (cpu, &has_work)flush_work (&per_cpu (lru_add_drain_work, cpu)); +#endif mutex_unlock (&lock); }Signature · 1 line
1.8.3.1
Quoted 13 lines · Tetsuo Handa
Since
for_each_cpu(cpu, mask)added by commit2d3854a37e8b767a("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument ifNR_CPUS== 1 due toCONFIG_SMP=n,lru_add_drain_all()is hittingWARN_ON()at__flush_work()added by commit4d43d395fed12463("workqueue: Try to catchflush_work()withoutINIT_WORK().") by unconditionally callingflush_work()[1].We should fix
for_each_cpu()etc. but we need enough grace period for allowing people to test and fix unexpected behaviors including build failures. Therefore, this patch temporarily duplicatesflush_work()forNR_CPUS== 1 case. This patch will be reverted afterfor_each_cpu()etc. are fixed.
Quoted 4 lines
[1] https://lkml.kernel.org/r/[email protected]
Reported-by Guenter Roeck <[email protected]>Signed-off-by Tetsuo Handa <[email protected]>
This patch is ugly as hell! I do agree that for_each_cpu not working on CONFIG_SMP=n sucks but why do we even care about lru_add_drain_all when there is a single cpu? Why don't we simply do
mm/swap.c +5 -0
@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is
@@ -702,6 +703,10 @@ void lru_add_drain_all(void) mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif /** * release_pages - batched put_page()
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 17 lines · Michal Hocko
This patch is ugly as hell! I do agree that
for_each_cpunot working onCONFIG_SMP=nsucks but why do we even care aboutlru_add_drain_allwhen there is a single cpu? Why don't we simply domm/swap.c +1
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is
mm/swap.c void lru_add_drain_all(void) · line 709
Quoted 7 lines
mm/swap.c +4
-0@@ -702,6 +703,10 @@ void lru_add_drain_all(void) mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif
If there is no need to evaluate the "if" conditions, I'm fine with this shortcut.
Quoted 19 lines · Tetsuo Handa
Quoted 18 lines · Michal Hocko
This patch is ugly as hell! I do agree that
for_each_cpunot working onCONFIG_SMP=nsucks but why do we even care aboutlru_add_drain_allwhen there is a single cpu? Why don't we simply domm/swap.c +1
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is @@ -702,6 +703,10 @@ void lru_add_drain_all(void)
Quoted 8 lines
mm/swap.c void lru_add_drain_all(void) · line 709
Quoted 6 lines
mm/swap.c +4
-0mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif If there is no need to evaluate the "if" conditions, I'm fine with this shortcut.
lru_add_drain does drain only pagevecs which have pages and so we do not really have to duplicate the check. There is also no need to defer the execution to the workqueue for a local cpu. So we are left with only the lock to prevent parallel execution but the preemption disabling acts the same purpose on UP so the approach should be equivalent from the correctness point of view.
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 29 lines · Michal Hocko
Quoted 19 lines · Tetsuo Handa
Quoted 18 lines · Michal Hocko
This patch is ugly as hell! I do agree that
for_each_cpunot working onCONFIG_SMP=nsucks but why do we even care aboutlru_add_drain_allwhen there is a single cpu? Why don't we simply domm/swap.c +1
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is @@ -702,6 +703,10 @@ void lru_add_drain_all(void)Quoted 8 lines
mm/swap.c void lru_add_drain_all(void) · line 709
Quoted 6 lines
mm/swap.c +4
-0mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif If there is no need to evaluate the "if" conditions, I'm fine with this shortcut.
Quoted 6 lines
lru_add_draindoes drain only pagevecs which have pages and so we do not really have to duplicate the check. There is also no need to defer the execution to the workqueue for a local cpu. So we are left with only the lock to prevent parallel execution but the preemption disabling acts the same purpose on UP so the approach should be equivalent from the correctness point of view.
The patch with the full changelog follows:
From db104f132bd6e1c02ecbe65e62c12caa7e4e2e2a Mon Sep 17 00:00:00 2001
From: Michal Hocko <[email protected]>
Date: Tue, 12 Feb 2019 12:25:28 +0100
Subject: [PATCH] mm: handle lru_add_drain_all for UP properly
Since for_each_cpu(cpu, mask) added by commit 2d3854a37e8b767a ("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument if NR_CPUS == 1 due to CONFIG_SMP=n, lru_add_drain_all() is hitting WARN_ON() at __flush_work() added by commit 4d43d395fed12463 ("workqueue: Try to catch flush_work() without INIT_WORK().") by unconditionally calling flush_work() [1].
Workaround this issue by using CONFIG_SMP=n specific lru_add_drain_all implementation. There is no real need to defer the implementation to the workqueue as the draining is going to happen on the local cpu. So alias lru_add_drain_all to lru_add_drain which does all the necessary work.
[1] https://lkml.kernel.org/r/[email protected]
--- mm/swap.c | 5 +++++ 1 file changed, 5 insertions(+)
mm/swap.c +5 -0
@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is
@@ -702,6 +703,10 @@ void lru_add_drain_all(void) mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif /** * release_pages - batched put_page()
Signature · 4 lines
2.20.1 -- Michal Hocko SUSE Labs
Andrew, please replace
mm-swapc-workaround-for_each_cpu-bug-on-up-kernel.patch
with Michal's patch.
(I didn't debug this. Guenter already debugged this before reporting.)
Quoted 49 lines · Michal Hocko
Quoted 1 line
From
db104f132bd6e1c02ecbe65e62c12caa7e4e2e2aMon Sep 17 00:00:00 2001From: Michal Hocko <[email protected]>
Date: Tue, 12 Feb 2019 12:25:28 +0100
Subject: [PATCH] mm: handlelru_add_drain_allfor UP properlySince
for_each_cpu(cpu, mask)added by commit2d3854a37e8b767a("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument ifNR_CPUS== 1 due toCONFIG_SMP=n,lru_add_drain_all()is hittingWARN_ON()at__flush_work()added by commit4d43d395fed12463("workqueue: Try to catchflush_work()withoutINIT_WORK().") by unconditionally callingflush_work()[1].Workaround this issue by using
CONFIG_SMP=nspecificlru_add_drain_allimplementation. There is no real need to defer the implementation to the workqueue as the draining is going to happen on the local cpu. So aliaslru_add_drain_alltolru_add_drainwhich does all the necessary work.[1] https://lkml.kernel.org/r/[email protected]
Reported-by Guenter Roeck <[email protected]>Debugged-by Tetsuo Handa <[email protected]>Signed-off-by Michal Hocko <[email protected]>--- mm/swap.c | 5 +++++ 1 file changed, 5 insertions(+)mm/swap.c +5
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is @@ -702,6 +703,10 @@ void lru_add_drain_all(void) mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif /** * release_pages - batched put_page()
Andrew Morton
maintainerQuoted 72 lines · On Tue, 12 Feb 2019 12:29:54 +0100 Michal Hocko <[email protected]> wrote:
Quoted 29 lines · Michal Hocko
Quoted 19 lines · Tetsuo Handa
Quoted 18 lines · Michal Hocko
This patch is ugly as hell! I do agree that
for_each_cpunot working onCONFIG_SMP=nsucks but why do we even care aboutlru_add_drain_allwhen there is a single cpu? Why don't we simply domm/swap.c +1
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is @@ -702,6 +703,10 @@ void lru_add_drain_all(void)Quoted 8 lines
mm/swap.c void lru_add_drain_all(void) · line 709
Quoted 6 lines
mm/swap.c +4
-0mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif If there is no need to evaluate the "if" conditions, I'm fine with this shortcut.
Quoted 6 lines
lru_add_draindoes drain only pagevecs which have pages and so we do not really have to duplicate the check. There is also no need to defer the execution to the workqueue for a local cpu. So we are left with only the lock to prevent parallel execution but the preemption disabling acts the same purpose on UP so the approach should be equivalent from the correctness point of view.The patch with the full changelog follows:
Quoted 1 line
From
db104f132bd6e1c02ecbe65e62c12caa7e4e2e2aMon Sep 17 00:00:00 2001From: Michal Hocko <[email protected]>
Date: Tue, 12 Feb 2019 12:25:28 +0100
Subject: [PATCH] mm: handlelru_add_drain_allfor UP properlySince
for_each_cpu(cpu, mask)added by commit2d3854a37e8b767a("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument ifNR_CPUS== 1 due toCONFIG_SMP=n,lru_add_drain_all()is hittingWARN_ON()at__flush_work()added by commit4d43d395fed12463("workqueue: Try to catchflush_work()withoutINIT_WORK().") by unconditionally callingflush_work()[1].Workaround this issue by using
CONFIG_SMP=nspecificlru_add_drain_allimplementation. There is no real need to defer the implementation to the workqueue as the draining is going to happen on the local cpu. So aliaslru_add_drain_alltolru_add_drainwhich does all the necessary work.[1] https://lkml.kernel.org/r/[email protected]
...
mm/swap.c +1
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is
mm/swap.c void lru_add_drain_all(void) · line 712
Quoted 10 lines
mm/swap.c +4
-0@@ -702,6 +703,10 @@ void lru_add_drain_all(void) mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif /** * release_pages - batched put_page()
How can this even link? Lots of compilation units call lru_add_drain_all() but the implementation just got removed.
Quoted 82 lines · Andrew Morton
Quoted 80 lines · On Tue, 12 Feb 2019 12:29:54 +0100 Michal Hocko <[email protected]> wrote:
Quoted 29 lines · Michal Hocko
Quoted 19 lines · Tetsuo Handa
Quoted 18 lines · Michal Hocko
This patch is ugly as hell! I do agree that
for_each_cpunot working onCONFIG_SMP=nsucks but why do we even care aboutlru_add_drain_allwhen there is a single cpu? Why don't we simply domm/swap.c +1
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is @@ -702,6 +703,10 @@ void lru_add_drain_all(void)Quoted 8 lines
mm/swap.c void lru_add_drain_all(void) · line 709
Quoted 6 lines
mm/swap.c +4
-0mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif If there is no need to evaluate the "if" conditions, I'm fine with this shortcut.
Quoted 6 lines
lru_add_draindoes drain only pagevecs which have pages and so we do not really have to duplicate the check. There is also no need to defer the execution to the workqueue for a local cpu. So we are left with only the lock to prevent parallel execution but the preemption disabling acts the same purpose on UP so the approach should be equivalent from the correctness point of view.The patch with the full changelog follows:
Quoted 1 line
From
db104f132bd6e1c02ecbe65e62c12caa7e4e2e2aMon Sep 17 00:00:00 2001From: Michal Hocko <[email protected]>
Date: Tue, 12 Feb 2019 12:25:28 +0100
Subject: [PATCH] mm: handlelru_add_drain_allfor UP properlySince
for_each_cpu(cpu, mask)added by commit2d3854a37e8b767a("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument ifNR_CPUS== 1 due toCONFIG_SMP=n,lru_add_drain_all()is hittingWARN_ON()at__flush_work()added by commit4d43d395fed12463("workqueue: Try to catchflush_work()withoutINIT_WORK().") by unconditionally callingflush_work()[1].Workaround this issue by using
CONFIG_SMP=nspecificlru_add_drain_allimplementation. There is no real need to defer the implementation to the workqueue as the draining is going to happen on the local cpu. So aliaslru_add_drain_alltolru_add_drainwhich does all the necessary work.[1] https://lkml.kernel.org/r/[email protected]
...
mm/swap.c +5
-0@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is @@ -702,6 +703,10 @@ void lru_add_drain_all(void) mutex_unlock(&lock); } +#else +#define lru_add_drain_all () lru_add_drain() + +#endif
Quoted 5 lines
mm/swap.c void lru_add_drain_all(void) · line 712
Quoted 2 lines
mm/swap.c +0
-0/** * release_pages - batched put_page() How can this even link? Lots of compilation units call
lru_add_drain_all()but the implementation just got removed.
Yeah, my bad. Should have compile tested...
From a13b4420f064abc9fe86dbb33f2fe3b508c9fac7 Mon Sep 17 00:00:00 2001
From: Michal Hocko <[email protected]>
Date: Tue, 12 Feb 2019 12:25:28 +0100
Subject: [PATCH] mm: handle lru_add_drain_all for UP properly
Since for_each_cpu(cpu, mask) added by commit 2d3854a37e8b767a ("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument if NR_CPUS == 1 due to CONFIG_SMP=n, lru_add_drain_all() is hitting WARN_ON() at __flush_work() added by commit 4d43d395fed12463 ("workqueue: Try to catch flush_work() without INIT_WORK().") by unconditionally calling flush_work() [1].
Workaround this issue by using CONFIG_SMP=n specific lru_add_drain_all implementation. There is no real need to defer the implementation to the workqueue as the draining is going to happen on the local cpu. So alias lru_add_drain_all to lru_add_drain which does all the necessary work.
[1] https://lkml.kernel.org/r/[email protected]
--- mm/swap.c | 7 +++++++ 1 file changed, 7 insertions(+)
mm/swap.c +7 -0
@@ -660,6 +660,7 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy) static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); +#ifdef CONFIG_SMP /* * Doesn't need any cpu hotplug locking because we do rely on per-cpu * kworkers being shut down before our page_alloc_cpu_dead callback is
@@ -702,6 +703,12 @@ void lru_add_drain_all(void) mutex_unlock(&lock); } +#else +void lru_add_drain_all (void ) +{ +lru_add_drain (); +} +#endif /** * release_pages - batched put_page()
Signature · 5 lines
2.20.1 -- Michal Hocko SUSE Labs
Andrew Morton
maintainerQuoted 7 lines · On Wed, 13 Feb 2019 13:43:34 +0100 Michal Hocko <[email protected]> wrote:
Since
for_each_cpu(cpu, mask)added by commit2d3854a37e8b767a("cpumask:
introduce new API, without changing anything") did not evaluate the mask argument ifNR_CPUS== 1 due toCONFIG_SMP=n,lru_add_drain_all()is hittingWARN_ON()at__flush_work()added by commit4d43d395fed12463("workqueue: Try to catchflush_work()withoutINIT_WORK().") by unconditionally callingflush_work()[1].
Quoted 5 lines
Workaround this issue by using
CONFIG_SMP=nspecificlru_add_drain_allimplementation. There is no real need to defer the implementation to the workqueue as the draining is going to happen on the local cpu. So aliaslru_add_drain_alltolru_add_drainwhich does all the necessary work.
I assume that warning comes out a LOT of times under the correct circumstances.
Tejun, I think a WARN_ON_ONCE() would be better.
kbuild test robot
build botRe: [PATCH] mm: handle lru_add_drain_all for UP properly
In reply to Michal HockoI love your patch! Yet something to improve:
Hi Michal,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Michal-Hocko/mm-handle-lru_add_drain_all-for-UP-properly/20190213-063735
config: riscv-tinyconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=riscv
All errors (new ones prefixed by >>):
mm/fadvise.o: In function `.L18':
>> fadvise.c:(.text+0x1e8): undefined reference to `lru_add_drain_all'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botRe: [PATCH] mm: handle lru_add_drain_all for UP properly
In reply to Michal HockoI love your patch! Yet something to improve:
Hi Michal,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Michal-Hocko/mm-handle-lru_add_drain_all-for-UP-properly/20190213-063735
config: sh-titan_defconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=sh
All errors (new ones prefixed by >>):
sh4-linux-gnu-ld: mm/fadvise.o: in function `vfs_fadvise':
fadvise.c:(.text+0x270): undefined reference to `lru_add_drain_all'
sh4-linux-gnu-ld: mm/compaction.o: in function `sysctl_compaction_handler':
>> compaction.c:(.text+0x1d8c): undefined reference to `lru_add_drain_all' sh4-linux-gnu-ld: mm/migrate.o: in function `migrate_prep': >> migrate.c:(.text+0xee4): undefined reference to `lru_add_drain_all' sh4-linux-gnu-ld: mm/memfd.o: in function `memfd_fcntl': >> memfd.c:(.text+0x2fc): undefined reference to `lru_add_drain_all' sh4-linux-gnu-ld: fs/block_dev.o: in function `invalidate_bdev': >> block_dev.c:(.text+0x274): undefined reference to `lru_add_drain_all'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation