Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-24 Thread Valentin Schneider
On 24/09/2019 15:09, Dietmar Eggemann wrote: > On 9/23/19 6:06 PM, Valentin Schneider wrote: >> On 23/09/2019 16:43, Dietmar Eggemann wrote: >>> I'm not sure that CONFIG_DEBUG_PER_CPU_MAPS=y will help you here. >>> >>> __set_cpus_allowed_ptr(...) >>> { >>> ... >>> dest_cpu =

Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-24 Thread Dietmar Eggemann
On 9/23/19 6:06 PM, Valentin Schneider wrote: > On 23/09/2019 16:43, Dietmar Eggemann wrote: >> I'm not sure that CONFIG_DEBUG_PER_CPU_MAPS=y will help you here. >> >> __set_cpus_allowed_ptr(...) >> { >> ... >> dest_cpu = cpumask_any_and(...) >> ... >> } >> >> With: >> >> #define

Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-23 Thread Valentin Schneider
On 23/09/2019 16:43, Dietmar Eggemann wrote: > I'm not sure that CONFIG_DEBUG_PER_CPU_MAPS=y will help you here. > > __set_cpus_allowed_ptr(...) > { > ... > dest_cpu = cpumask_any_and(...) > ... > } > > With: > > #define cpumask_any_and(mask1, mask2) cpumask_first_and((mask1),

Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-23 Thread Dietmar Eggemann
On 9/15/19 4:33 PM, Valentin Schneider wrote: > On 15/09/2019 09:21, shikemeng wrote: >>> It's more thoughtful to add check in cpumask_test_cpu.It can solve this >>> problem and can prevent other potential bugs.I will test it and resend >>> a new patch. >>> >> >> Think again and again. As

Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-15 Thread Valentin Schneider
On 15/09/2019 04:07, shikemeng wrote: > From: > > reason: migration to invalid cpu in __set_cpus_allowed_ptr > archive path: patches/euleros/sched > > Oops occur when running qemu on arm64: > Unable to handle kernel paging request at virtual address 08effe40 > Internal error: Oops:

Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-15 Thread Valentin Schneider
On 15/09/2019 09:21, shikemeng wrote: >> It's more thoughtful to add check in cpumask_test_cpu.It can solve this >> problem and can prevent other potential bugs.I will test it and resend >> a new patch. >> > > Think again and again. As cpumask_check will fire a warning if cpu >= > nr_cpu_ids,

Re: Re: Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-15 Thread shikemeng
On 15/09/2019 6:13,shikemeng wrote: >>> From 089dbf0216628ac6ae98742ab90725ca9c2bf201 Mon Sep 17 00:00:00 2001 >>> From: >>> Date: Tue, 10 Sep 2019 09:44:58 -0400 >>> Subject: [PATCH] sched: fix migration to invalid cpu in >>> __set_cpus_allowed_ptr >>> >>> reason: migration to invalid cpu in

Re: Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-15 Thread shikemeng
On 13/09/2019 6:09,Valentin Schneider wrote: >> From 089dbf0216628ac6ae98742ab90725ca9c2bf201 Mon Sep 17 00:00:00 2001 >> From: >> Date: Tue, 10 Sep 2019 09:44:58 -0400 >> Subject: [PATCH] sched: fix migration to invalid cpu in >> __set_cpus_allowed_ptr >> >> reason: migration to invalid cpu

Re: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr

2019-09-12 Thread Valentin Schneider
On 12/09/2019 02:55, shikemeng wrote: > From 089dbf0216628ac6ae98742ab90725ca9c2bf201 Mon Sep 17 00:00:00 2001 > From: > Date: Tue, 10 Sep 2019 09:44:58 -0400 > Subject: [PATCH] sched: fix migration to invalid cpu in __set_cpus_allowed_ptr > > reason: migration to invalid cpu in