Re: [PATCH 1/6] sched: migration changes for core scheduling

2021-03-22 Thread Li, Aubrey
On 2021/3/22 20:56, Peter Zijlstra wrote: > On Mon, Mar 22, 2021 at 08:31:09PM +0800, Li, Aubrey wrote: >> Please let me know if I put cookie match check at the right position >> in task_hot(), if so, I'll obtain some performance data of it. >>

Re: [PATCH 1/6] sched: migration changes for core scheduling

2021-03-22 Thread Li, Aubrey
On 2021/3/22 20:56, Peter Zijlstra wrote: > On Mon, Mar 22, 2021 at 08:31:09PM +0800, Li, Aubrey wrote: >> Please let me know if I put cookie match check at the right position >> in task_hot(), if so, I'll obtain some performance data of it. >>

Re: [PATCH 1/6] sched: migration changes for core scheduling

2021-03-22 Thread Li, Aubrey
On 2021/3/22 16:57, Peter Zijlstra wrote: > >> Do you have any suggestions before we drop it? > > Yeah, how about you make it part of task_hot() ? Have task_hot() refuse > migration it the cookie doesn't match. > > task_hot() is a hint and will get ignored when appropriate. > Please let me

Re: [PATCH 1/6] sched: migration changes for core scheduling

2021-03-22 Thread Li, Aubrey
On 2021/3/22 15:48, Peter Zijlstra wrote: > On Sun, Mar 21, 2021 at 09:34:00PM +0800, Li, Aubrey wrote: >> Hi Peter, >> >> On 2021/3/20 23:34, Peter Zijlstra wrote: >>> On Fri, Mar 19, 2021 at 04:32:48PM -0400, Joel Fernandes (Google) wrote: >>>> @@ -753

Re: [PATCH] sched/fair: remove redundant test_idle_cores for non-smt

2021-03-21 Thread Li, Aubrey
Hi Barry, On 2021/3/21 6:14, Barry Song wrote: > update_idle_core() is only done for the case of sched_smt_present. > but test_idle_cores() is done for all machines even those without > smt. The patch looks good to me. May I know for what case we need to keep CONFIG_SCHED_SMT for non-smt

Re: [PATCH 1/6] sched: migration changes for core scheduling

2021-03-21 Thread Li, Aubrey
Hi Peter, On 2021/3/20 23:34, Peter Zijlstra wrote: > On Fri, Mar 19, 2021 at 04:32:48PM -0400, Joel Fernandes (Google) wrote: >> @@ -7530,8 +7543,9 @@ int can_migrate_task(struct task_struct *p, struct >> lb_env *env) >> * We do not migrate tasks that are: >> * 1) throttled_lb_pair,

Re: [PATCH v2] sched/fair: reduce long-tail newly idle balance cost

2021-03-15 Thread Li, Aubrey
On 2021/2/24 16:15, Aubrey Li wrote: > A long-tail load balance cost is observed on the newly idle path, > this is caused by a race window between the first nr_running check > of the busiest runqueue and its nr_running recheck in detach_tasks. > > Before the busiest runqueue is locked, the tasks

Re: [RFC PATCH v8] sched/fair: select idle cpu from idle cpumask for task wakeup

2021-03-08 Thread Li, Aubrey
On 2021/3/8 19:30, Vincent Guittot wrote: > Hi Aubrey, > > On Thu, 4 Mar 2021 at 14:51, Li, Aubrey wrote: >> >> Hi Peter, >> >> On 2020/12/11 23:07, Vincent Guittot wrote: >>> On Thu, 10 Dec 2020 at 02:44, Aubrey Li wrote: >>>> >>&

Re: [RFC PATCH v8] sched/fair: select idle cpu from idle cpumask for task wakeup

2021-03-04 Thread Li, Aubrey
Hi Peter, On 2020/12/11 23:07, Vincent Guittot wrote: > On Thu, 10 Dec 2020 at 02:44, Aubrey Li wrote: >> >> Add idle cpumask to track idle cpus in sched domain. Every time >> a CPU enters idle, the CPU is set in idle cpumask to be a wakeup >> target. And if the CPU is not in idle, the CPU is

Re: [RFC PATCH v1] sched/fair: limit load balance redo times at the same sched_domain level

2021-02-23 Thread Li, Aubrey
On 2021/2/24 1:33, Vincent Guittot wrote: > On Tue, 23 Feb 2021 at 06:41, Li, Aubrey wrote: >> >> Hi Vincent, >> >> Sorry for the delay, I just returned from Chinese New Year holiday. >> >> On 2021/1/25 22:51, Vincent Guittot wrote: >>>

Re: [RFC PATCH v1] sched/fair: limit load balance redo times at the same sched_domain level

2021-02-22 Thread Li, Aubrey
Hi Vincent, Sorry for the delay, I just returned from Chinese New Year holiday. On 2021/1/25 22:51, Vincent Guittot wrote: > On Mon, 25 Jan 2021 at 15:00, Li, Aubrey wrote: >> >> On 2021/1/25 18:56, Vincent Guittot wrote: >>> On Mon, 25 Jan 2021 at 06:50, Aubrey Li wrot

Re: [PATCH v5 0/4] Scan for an idle sibling in a single pass

2021-01-31 Thread Li, Aubrey
On 2021/1/27 21:51, Mel Gorman wrote: > Changelog since v4 > o Avoid use of intermediate variable during select_idle_cpu > > Changelog since v3 > o Drop scanning based on cores, SMT4 results showed problems > > Changelog since v2 > o Remove unnecessary parameters > o Update nr during scan only

Re: [RFC PATCH v1] sched/fair: limit load balance redo times at the same sched_domain level

2021-01-26 Thread Li, Aubrey
On 2021/1/25 22:51, Vincent Guittot wrote: > On Mon, 25 Jan 2021 at 15:00, Li, Aubrey wrote: >> >> On 2021/1/25 18:56, Vincent Guittot wrote: >>> On Mon, 25 Jan 2021 at 06:50, Aubrey Li wrote: >>>> >>>> A long-tail load balance cost is obse

Re: [RFC PATCH v1] sched/fair: limit load balance redo times at the same sched_domain level

2021-01-25 Thread Li, Aubrey
On 2021/1/25 18:56, Vincent Guittot wrote: > On Mon, 25 Jan 2021 at 06:50, Aubrey Li wrote: >> >> A long-tail load balance cost is observed on the newly idle path, >> this is caused by a race window between the first nr_running check >> of the busiest runqueue and its nr_running recheck in

Re: [PATCH v3 0/5] Scan for an idle sibling in a single pass

2021-01-25 Thread Li, Aubrey
On 2021/1/25 17:04, Mel Gorman wrote: > On Mon, Jan 25, 2021 at 12:29:47PM +0800, Li, Aubrey wrote: >>>>> hackbench -l 2560 -g 1 on 8 cores arm64 >>>>> v5.11-rc4 : 1.355 (+/- 7.96) >>>>> + sis improvement : 1.923 (+/- 25%) >>>>> + the

Re: [RFC PATCH v1] sched/fair: limit load balance redo times at the same sched_domain level

2021-01-25 Thread Li, Aubrey
On 2021/1/25 17:06, Mel Gorman wrote: > On Mon, Jan 25, 2021 at 02:02:58PM +0800, Aubrey Li wrote: >> A long-tail load balance cost is observed on the newly idle path, >> this is caused by a race window between the first nr_running check >> of the busiest runqueue and its nr_running recheck in

Re: [PATCH v3 0/5] Scan for an idle sibling in a single pass

2021-01-24 Thread Li, Aubrey
On 2021/1/22 21:22, Vincent Guittot wrote: > On Fri, 22 Jan 2021 at 11:14, Mel Gorman wrote: >> >> On Fri, Jan 22, 2021 at 10:30:52AM +0100, Vincent Guittot wrote: >>> Hi Mel, >>> >>> On Tue, 19 Jan 2021 at 13:02, Mel Gorman >>> wrote: On Tue, Jan 19, 2021 at 12:33:04PM +0100, Vincent

Re: [PATCH 5/5] sched/fair: Merge select_idle_core/cpu()

2021-01-18 Thread Li, Aubrey
On 2021/1/15 18:08, Mel Gorman wrote: > From: Peter Zijlstra (Intel) > > Both select_idle_core() and select_idle_cpu() do a loop over the same > cpumask. Observe that by clearing the already visited CPUs, we can > fold the iteration and iterate a core at a time. > > All we need to do is

Re: [PATCH 3/5] sched/fair: Make select_idle_cpu() proportional to cores

2021-01-18 Thread Li, Aubrey
On 2021/1/15 18:08, Mel Gorman wrote: > From: Peter Zijlstra (Intel) > > Instead of calculating how many (logical) CPUs to scan, compute how > many cores to scan. > > This changes behaviour for anything !SMT2. > > Signed-off-by: Peter Zijlstra (Intel) > Signed-off-by: Mel Gorman > --- >

Re: [RFC][PATCH 0/5] select_idle_sibling() wreckage

2020-12-16 Thread Li, Aubrey
Hi Peter, On 2020/12/15 0:48, Peter Zijlstra wrote: > Hai, here them patches Mel asked for. They've not (yet) been through the > robots, so there might be some build fail for configs I've not used. > > Benchmark time :-) > Here is the data on my side, benchmarks were tested on a x86 4 sockets

Re: [RFC PATCH v8] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-15 Thread Li, Aubrey
Hi Bao Hua, Sorry I almost missed this message, :( On 2020/12/14 7:29, Song Bao Hua (Barry Song) wrote: > > Hi Aubrey, > > The patch looks great. But I didn't find any hackbench improvement > on kunpeng 920 which has 24 cores for each llc span. Llc span is also > one numa node. The topology is

Re: [RFC][PATCH 1/5] sched/fair: Fix select_idle_cpu()s cost accounting

2020-12-15 Thread Li, Aubrey
On 2020/12/15 15:59, Peter Zijlstra wrote: > On Tue, Dec 15, 2020 at 11:36:35AM +0800, Li, Aubrey wrote: >> On 2020/12/15 0:48, Peter Zijlstra wrote: >>> We compute the average cost of the total scan, but then use it as a >>> per-cpu scan cost when computi

Re: [RFC][PATCH 1/5] sched/fair: Fix select_idle_cpu()s cost accounting

2020-12-14 Thread Li, Aubrey
On 2020/12/15 0:48, Peter Zijlstra wrote: > We compute the average cost of the total scan, but then use it as a > per-cpu scan cost when computing the scan proportion. Fix this by > properly computing a per-cpu scan cost. > > This also fixes a bug where we would terminate early (!--nr, case) and

Re: [RFC PATCH v7] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-13 Thread Li, Aubrey
On 2020/12/10 19:34, Mel Gorman wrote: > On Thu, Dec 10, 2020 at 04:23:47PM +0800, Li, Aubrey wrote: >>> I ran this patch with tbench on top of of the schedstat patches that >>> track SIS efficiency. The tracking adds overhead so it's not a perfect >>> performance

Re: [RFC PATCH v8] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-11 Thread Li, Aubrey
On 2020/12/11 23:22, Vincent Guittot wrote: > On Fri, 11 Dec 2020 at 16:19, Li, Aubrey wrote: >> >> On 2020/12/11 23:07, Vincent Guittot wrote: >>> On Thu, 10 Dec 2020 at 02:44, Aubrey Li wrote: >>>> >>>> Add idle cpumask to track idle cpus in

Re: [RFC PATCH v8] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-11 Thread Li, Aubrey
On 2020/12/11 23:07, Vincent Guittot wrote: > On Thu, 10 Dec 2020 at 02:44, Aubrey Li wrote: >> >> Add idle cpumask to track idle cpus in sched domain. Every time >> a CPU enters idle, the CPU is set in idle cpumask to be a wakeup >> target. And if the CPU is not in idle, the CPU is cleared in

Re: [RFC PATCH v7] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-10 Thread Li, Aubrey
On 2020/12/10 19:34, Mel Gorman wrote: > On Thu, Dec 10, 2020 at 04:23:47PM +0800, Li, Aubrey wrote: >>> I ran this patch with tbench on top of of the schedstat patches that >>> track SIS efficiency. The tracking adds overhead so it's not a perfect >>> performance

Re: [RFC PATCH v7] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-10 Thread Li, Aubrey
Hi Mel, On 2020/12/9 22:36, Mel Gorman wrote: > On Wed, Dec 09, 2020 at 02:24:04PM +0800, Aubrey Li wrote: >> Add idle cpumask to track idle cpus in sched domain. Every time >> a CPU enters idle, the CPU is set in idle cpumask to be a wakeup >> target. And if the CPU is not in idle, the CPU is

Re: [PATCH 2/4] sched/fair: Move avg_scan_cost calculations under SIS_PROP

2020-12-09 Thread Li, Aubrey
On 2020/12/8 23:34, Mel Gorman wrote: > As noted by Vincent Guittot, avg_scan_costs are calculated for SIS_PROP > even if SIS_PROP is disabled. Move the time calculations under a SIS_PROP > check and while we are at it, exclude the cost of initialising the CPU > mask from the average scan cost. >

Re: [RFC PATCH v7] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-09 Thread Li, Aubrey
On 2020/12/9 21:09, Vincent Guittot wrote: > On Wed, 9 Dec 2020 at 11:58, Li, Aubrey wrote: >> >> On 2020/12/9 16:15, Vincent Guittot wrote: >>> Le mercredi 09 déc. 2020 à 14:24:04 (+0800), Aubrey Li a écrit : >>>> Add idle cpumask to track idle cpus in sched

Re: [PATCH 2/4] sched/fair: Move avg_scan_cost calculations under SIS_PROP

2020-12-09 Thread Li, Aubrey
On 2020/12/9 17:05, Mel Gorman wrote: > On Wed, Dec 09, 2020 at 01:28:11PM +0800, Li, Aubrey wrote: >>>> nr = div_u64(span_avg, avg_cost); >>>> else >>>> nr = 4; >>>

Re: [RFC PATCH v7] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-09 Thread Li, Aubrey
On 2020/12/9 16:15, Vincent Guittot wrote: > Le mercredi 09 déc. 2020 à 14:24:04 (+0800), Aubrey Li a écrit : >> Add idle cpumask to track idle cpus in sched domain. Every time >> a CPU enters idle, the CPU is set in idle cpumask to be a wakeup >> target. And if the CPU is not in idle, the CPU is

Re: [PATCH 2/4] sched/fair: Move avg_scan_cost calculations under SIS_PROP

2020-12-08 Thread Li, Aubrey
On 2020/12/9 0:03, Vincent Guittot wrote: > On Tue, 8 Dec 2020 at 16:35, Mel Gorman wrote: >> >> As noted by Vincent Guittot, avg_scan_costs are calculated for SIS_PROP >> even if SIS_PROP is disabled. Move the time calculations under a SIS_PROP >> check and while we are at it, exclude the cost

Re: [RFC PATCH v6] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-12-08 Thread Li, Aubrey
Hi Peter, Thanks for the comments. On 2020/12/8 22:16, Peter Zijlstra wrote: > On Tue, Dec 08, 2020 at 09:49:57AM +0800, Aubrey Li wrote: >> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >> index c4da7e17b906..b8af602dea79 100644 >> --- a/kernel/sched/core.c >> +++ b/kernel/sched/core.c

Re: [RFC PATCH 0/4] Reduce worst-case scanning of runqueues in select_idle_sibling

2020-12-07 Thread Li, Aubrey
On 2020/12/7 23:42, Mel Gorman wrote: > On Mon, Dec 07, 2020 at 04:04:41PM +0100, Vincent Guittot wrote: >> On Mon, 7 Dec 2020 at 10:15, Mel Gorman wrote: >>> >>> This is a minimal series to reduce the amount of runqueue scanning in >>> select_idle_sibling in the worst case. >>> >>> Patch 1

Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched

2020-12-04 Thread Li, Aubrey
On 2020/12/4 21:47, Vincent Guittot wrote: > On Fri, 4 Dec 2020 at 14:40, Li, Aubrey wrote: >> >> On 2020/12/4 21:17, Vincent Guittot wrote: >>> On Fri, 4 Dec 2020 at 14:13, Vincent Guittot >>> wrote: >>>> >>>> On Fri, 4 Dec 2020 at 1

Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched

2020-12-04 Thread Li, Aubrey
On 2020/12/4 21:40, Li, Aubrey wrote: > On 2020/12/4 21:17, Vincent Guittot wrote: >> On Fri, 4 Dec 2020 at 14:13, Vincent Guittot >> wrote: >>> >>> On Fri, 4 Dec 2020 at 12:30, Mel Gorman wrote: >>>> >>>> On Fri, Dec 04, 2020 at 1

Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched

2020-12-04 Thread Li, Aubrey
On 2020/12/4 21:17, Vincent Guittot wrote: > On Fri, 4 Dec 2020 at 14:13, Vincent Guittot > wrote: >> >> On Fri, 4 Dec 2020 at 12:30, Mel Gorman wrote: >>> >>> On Fri, Dec 04, 2020 at 11:56:36AM +0100, Vincent Guittot wrote: > The intent was that the sibling might still be an idle

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-12-02 Thread Li, Aubrey
On 2020/12/2 22:09, Li, Aubrey wrote: > Hi Balbir, > > I still placed the patch embedded in this thread, welcome any comments. Sorry, this version needs more work, refined as below, and I realized I should place a version number to the patch, start from v2 now. Thanks

Re: [sched/fair] 8d86968ac3: netperf.Throughput_tps -29.5% regression

2020-12-02 Thread Li, Aubrey
Hi Mel, On 2020/11/26 20:13, Mel Gorman wrote: > On Thu, Nov 26, 2020 at 02:57:07PM +0800, Li, Aubrey wrote: >> Hi Robot, >> >> On 2020/11/25 17:09, kernel test robot wrote: >>> Greeting, >>> >>> FYI, we noticed a -29.5% regression of netperf.

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-12-02 Thread Li, Aubrey
Hi Balbir, I still placed the patch embedded in this thread, welcome any comments. Thanks, -Aubrey == >From d64455dcaf47329673903a68a9df1151400cdd7a Mon Sep 17 00:00:00 2001 From: Aubrey Li Date: Wed, 2 Dec 2020 13:53:30 +

Re: [PATCH] sched/fair: Clear SMT siblings after determining the core is not idle

2020-11-30 Thread Li, Aubrey
On 2020/11/30 22:47, Vincent Guittot wrote: > On Mon, 30 Nov 2020 at 15:40, Mel Gorman wrote: >> >> The clearing of SMT siblings from the SIS mask before checking for an idle >> core is a small but unnecessary cost. Defer the clearing of the siblings >> until the scan moves to the next potential

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-30 Thread Li, Aubrey
On 2020/11/30 18:35, Vincent Guittot wrote: > On Wed, 18 Nov 2020 at 00:20, Joel Fernandes (Google) > wrote: >> >> From: Aubrey Li >> >> - Don't migrate if there is a cookie mismatch >> Load balance tries to move task from busiest CPU to the >> destination CPU. When core scheduling is

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-30 Thread Li, Aubrey
On 2020/11/30 17:33, Balbir Singh wrote: > On Thu, Nov 26, 2020 at 05:26:31PM +0800, Li, Aubrey wrote: >> On 2020/11/26 16:32, Balbir Singh wrote: >>> On Thu, Nov 26, 2020 at 11:20:41AM +0800, Li, Aubrey wrote: >>>> On 2020/11/26 6:57, Balbir Singh wrote: >>&g

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-26 Thread Li, Aubrey
On 2020/11/26 16:14, Vincent Guittot wrote: > On Wed, 25 Nov 2020 at 14:37, Li, Aubrey wrote: >> >> On 2020/11/25 16:31, Vincent Guittot wrote: >>> On Wed, 25 Nov 2020 at 03:03, Li, Aubrey wrote: >>>> >>>> On 2020/11/25 1:01, Vincent Guittot wro

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-26 Thread Li, Aubrey
On 2020/11/26 16:32, Balbir Singh wrote: > On Thu, Nov 26, 2020 at 11:20:41AM +0800, Li, Aubrey wrote: >> On 2020/11/26 6:57, Balbir Singh wrote: >>> On Wed, Nov 25, 2020 at 11:12:53AM +0800, Li, Aubrey wrote: >>>> On 2020/11/24 23:42, Peter Zijlstra wrote: >>&g

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-25 Thread Li, Aubrey
On 2020/11/26 6:57, Balbir Singh wrote: > On Wed, Nov 25, 2020 at 11:12:53AM +0800, Li, Aubrey wrote: >> On 2020/11/24 23:42, Peter Zijlstra wrote: >>> On Mon, Nov 23, 2020 at 12:36:10PM +0800, Li, Aubrey wrote: >>>&g

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-25 Thread Li, Aubrey
On 2020/11/25 16:31, Vincent Guittot wrote: > On Wed, 25 Nov 2020 at 03:03, Li, Aubrey wrote: >> >> On 2020/11/25 1:01, Vincent Guittot wrote: >>> Hi Aubrey, >>> >>> Le mardi 24 nov. 2020 à 15:01:38 (+0800), Li, Aubrey a écrit : >>>> Hi V

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-24 Thread Li, Aubrey
On 2020/11/24 23:42, Peter Zijlstra wrote: > On Mon, Nov 23, 2020 at 12:36:10PM +0800, Li, Aubrey wrote: >>>> +#ifdef CONFIG_SCHED_CORE >>>> + /* >>>> + * Skip this cpu if source task's cookie does not match &g

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-24 Thread Li, Aubrey
On 2020/11/25 1:01, Vincent Guittot wrote: > Hi Aubrey, > > Le mardi 24 nov. 2020 à 15:01:38 (+0800), Li, Aubrey a écrit : >> Hi Vincent, >> >> On 2020/11/23 17:27, Vincent Guittot wrote: >>> Hi Aubrey, >>> >>> On Thu, 19 Nov 2020 at 13:15,

Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-23 Thread Li, Aubrey
Hi Vincent, On 2020/11/23 17:27, Vincent Guittot wrote: > Hi Aubrey, > > On Thu, 19 Nov 2020 at 13:15, Aubrey Li wrote: >> >> Add idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, if the idle driver indicates to stop tick, this CPU >> is set in the idle cpumask to be a

Re: [PATCH -tip 13/32] sched: Trivial forced-newidle balancer

2020-11-23 Thread Li, Aubrey
On 2020/11/24 7:35, Balbir Singh wrote: > On Mon, Nov 23, 2020 at 11:07:27PM +0800, Li, Aubrey wrote: >> On 2020/11/23 12:38, Balbir Singh wrote: >>> On Tue, Nov 17, 2020 at 06:19:43PM -0500, Joel Fernandes (Google) wrote: >>>> From: Peter Zijlstra >>>> &

Re: [PATCH -tip 13/32] sched: Trivial forced-newidle balancer

2020-11-23 Thread Li, Aubrey
On 2020/11/23 12:38, Balbir Singh wrote: > On Tue, Nov 17, 2020 at 06:19:43PM -0500, Joel Fernandes (Google) wrote: >> From: Peter Zijlstra >> >> When a sibling is forced-idle to match the core-cookie; search for >> matching tasks to fill the core. >> >> rcu_read_unlock() can incur an infrequent

Re: [PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-22 Thread Li, Aubrey
On 2020/11/23 7:54, Balbir Singh wrote: > On Tue, Nov 17, 2020 at 06:19:44PM -0500, Joel Fernandes (Google) wrote: >> From: Aubrey Li >> >> - Don't migrate if there is a cookie mismatch >> Load balance tries to move task from busiest CPU to the >> destination CPU. When core scheduling

Re: [RFC PATCH v4] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-19 Thread Li, Aubrey
On 2020/11/19 16:19, Vincent Guittot wrote: > On Thu, 19 Nov 2020 at 02:34, Li, Aubrey wrote: >> >> Hi Vincent, >> >> On 2020/11/18 21:36, Vincent Guittot wrote: >>> On Wed, 18 Nov 2020 at 04:48, Aubrey Li wrote: >>>> >>>> From: Aubre

Re: [RFC PATCH v4] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-18 Thread Li, Aubrey
Hi Vincent, On 2020/11/18 21:36, Vincent Guittot wrote: > On Wed, 18 Nov 2020 at 04:48, Aubrey Li wrote: >> >> From: Aubrey Li >> >> Add idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, if the idle driver indicates to stop tick, this CPU >> is set in the idle cpumask

Re: [RFC PATCH v4] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-18 Thread Li, Aubrey
On 2020/11/18 20:06, Valentin Schneider wrote: > > On 16/11/20 20:04, Aubrey Li wrote: >> From: Aubrey Li >> >> Add idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, if the idle driver indicates to stop tick, this CPU >> is set in the idle cpumask to be a wakeup target.

Re: [RFC PATCH v3] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-12 Thread Li, Aubrey
On 2020/11/12 18:57, Qais Yousef wrote: > On 10/21/20 23:03, Aubrey Li wrote: >> From: Aubrey Li >> >> Added idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, its corresponding bit in the idle cpumask will be set, >> and when the CPU exits idle, its bit will be cleared.

Re: [RFC PATCH v3] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-11 Thread Li, Aubrey
On 2020/11/9 23:54, Valentin Schneider wrote: > > On 09/11/20 13:40, Li, Aubrey wrote: >> On 2020/11/7 5:20, Valentin Schneider wrote: >>> >>> On 21/10/20 16:03, Aubrey Li wrote: >>>> From: Aubrey Li >>>> >>>> Added idle cpuma

Re: [RFC PATCH v3] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-09 Thread Li, Aubrey
On 2020/11/7 5:20, Valentin Schneider wrote: > > On 21/10/20 16:03, Aubrey Li wrote: >> From: Aubrey Li >> >> Added idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, its corresponding bit in the idle cpumask will be set, >> and when the CPU exits idle, its bit will be

Re: [RFC PATCH v3] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-08 Thread Li, Aubrey
On 2020/11/6 15:58, Vincent Guittot wrote: > On Wed, 21 Oct 2020 at 17:05, Aubrey Li wrote: >> >> From: Aubrey Li >> >> Added idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, its corresponding bit in the idle cpumask will be set, >> and when the CPU exits idle, its bit

Re: [PATCH v8 -tip 00/26] Core scheduling

2020-11-08 Thread Li, Aubrey
On 2020/11/7 1:54, Joel Fernandes wrote: > On Fri, Nov 06, 2020 at 10:58:58AM +0800, Li, Aubrey wrote: > >>> >>> -- workload D, new added syscall workload, p

Re: [PATCH v8 -tip 00/26] Core scheduling

2020-11-05 Thread Li, Aubrey
On 2020/10/30 21:26, Ning, Hongyu wrote: > On 2020/10/20 9:43, Joel Fernandes (Google) wrote: >> Eighth iteration of the Core-Scheduling feature. >> >> Core scheduling is a feature that allows only trusted tasks to run >> concurrently on cpus sharing compute resources (eg: hyperthreads on a >>

Re: [RFC PATCH v3] sched/fair: select idle cpu from idle cpumask for task wakeup

2020-11-04 Thread Li, Aubrey
Hi Valentin, Thanks for your reply. On 2020/11/4 3:27, Valentin Schneider wrote: > > Hi, > > On 21/10/20 16:03, Aubrey Li wrote: >> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >> index 6b3b59cc51d6..088d1995594f 100644 >> --- a/kernel/sched/fair.c >> +++ b/kernel/sched/fair.c >> @@

Re: [PATCH v8 -tip 02/26] sched: Introduce sched_class::pick_task()

2020-10-26 Thread Li, Aubrey
On 2020/10/26 17:01, Peter Zijlstra wrote: > On Sat, Oct 24, 2020 at 08:27:16AM -0400, Vineeth Pillai wrote: >> >> >> On 10/24/20 7:10 AM, Vineeth Pillai wrote: >>> >>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >>> index 93a3b874077d..4cae5ac48b60 100644 >>> --- a/kernel/sched/fair.c

Re: [PATCH v8 -tip 24/26] sched: Move core-scheduler interfacing code to a new file

2020-10-25 Thread Li, Aubrey
On 2020/10/20 9:43, Joel Fernandes (Google) wrote: > core.c is already huge. The core-tagging interface code is largely > independent of it. Move it to its own file to make both files easier to > maintain. > > Tested-by: Julien Desfossez > Signed-off-by: Joel Fernandes (Google) > --- >

Re: [PATCH v8 -tip 02/26] sched: Introduce sched_class::pick_task()

2020-10-24 Thread Li, Aubrey
On 2020/10/24 20:27, Vineeth Pillai wrote: > > > On 10/24/20 7:10 AM, Vineeth Pillai wrote: >> >> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >> index 93a3b874077d..4cae5ac48b60 100644 >> --- a/kernel/sched/fair.c >> +++ b/kernel/sched/fair.c >> @@ -4428,12 +4428,14 @@

Re: [PATCH v8 -tip 02/26] sched: Introduce sched_class::pick_task()

2020-10-23 Thread Li, Aubrey
On 2020/10/24 5:47, Joel Fernandes wrote: > On Fri, Oct 23, 2020 at 01:25:38PM +0800, Li, Aubrey wrote: >>>>> @@ -2517,6 +2528,7 @@ const struct sched_class dl_sched_class >>>>> >>>>> #ifdef CONFIG_SMP >>>>>

Re: [PATCH v8 -tip 02/26] sched: Introduce sched_class::pick_task()

2020-10-22 Thread Li, Aubrey
On 2020/10/22 23:25, Joel Fernandes wrote: > On Thu, Oct 22, 2020 at 12:59 AM Li, Aubrey wrote: >> >> On 2020/10/20 9:43, Joel Fernandes (Google) wrote: >>> From: Peter Zijlstra >>> >>> Because sched_class::pick_next_task() also implies >

Re: [PATCH v8 -tip 02/26] sched: Introduce sched_class::pick_task()

2020-10-22 Thread Li, Aubrey
On 2020/10/20 9:43, Joel Fernandes (Google) wrote: > From: Peter Zijlstra > > Because sched_class::pick_next_task() also implies > sched_class::set_next_task() (and possibly put_prev_task() and > newidle_balance) it is not state invariant. This makes it unsuitable > for remote task selection. >

Re: [PATCH v8 -tip 13/26] kernel/entry: Add support for core-wide protection of kernel-mode

2020-10-21 Thread Li, Aubrey
On 2020/10/20 9:43, Joel Fernandes (Google) wrote: > Core-scheduling prevents hyperthreads in usermode from attacking each > other, but it does not do anything about one of the hyperthreads > entering the kernel for any reason. This leaves the door open for MDS > and L1TF attacks with concurrent

Re: [RFC PATCH v2] sched/fair: select idle cpu from idle cpumask in sched domain

2020-09-27 Thread Li, Aubrey
On 2020/9/26 0:45, Vincent Guittot wrote: > Le vendredi 25 sept. 2020 à 17:21:46 (+0800), Li, Aubrey a écrit : >> Hi Vicent, >> >> On 2020/9/24 21:09, Vincent Guittot wrote: >>>>>> >>>>>> Would you mind share uperf(netperf load) result on y

Re: [RFC PATCH v2] sched/fair: select idle cpu from idle cpumask in sched domain

2020-09-25 Thread Li, Aubrey
Hi Vicent, On 2020/9/24 21:09, Vincent Guittot wrote: Would you mind share uperf(netperf load) result on your side? That's the workload I have seen the most benefit this patch contributed under heavy load level. >>> >>> with uperf, i've got the same kind of result as sched

Re: [RFC PATCH v2] sched/fair: select idle cpu from idle cpumask in sched domain

2020-09-17 Thread Li, Aubrey
On 2020/9/16 19:00, Mel Gorman wrote: > On Wed, Sep 16, 2020 at 12:31:03PM +0800, Aubrey Li wrote: >> Added idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, its corresponding bit in the idle cpumask will be set, >> and when the CPU exits idle, its bit will be cleared. >>

Re: [RFC PATCH v7 11/23] sched/fair: core wide cfs task priority comparison

2020-09-16 Thread Li, Aubrey
On 2020/9/17 4:53, chris hyser wrote: > On 9/16/20 10:24 AM, chris hyser wrote: >> On 9/16/20 8:57 AM, Li, Aubrey wrote: >>>> Here are the uperf results of the various patchsets. Note, that disabling >>>> smt is better for these tests and that that presumably re

Re: [RFC PATCH v1 1/1] sched/fair: select idle cpu from idle cpumask in sched domain

2020-09-15 Thread Li, Aubrey
On 2020/9/15 17:23, Vincent Guittot wrote: > On Tue, 15 Sep 2020 at 10:47, Jiang Biao wrote: >> >> Hi, Vincent >> >> On Mon, 14 Sep 2020 at 20:26, Vincent Guittot >> wrote: >>> >>> On Sun, 13 Sep 2020 at 05:59, Jiang Biao wrote: Hi, Aubrey On Fri, 11 Sep 2020 at 23:48,

Re: [RFC PATCH v1 1/1] sched/fair: select idle cpu from idle cpumask in sched domain

2020-09-11 Thread Li, Aubrey
On 2020/9/12 7:04, Li, Aubrey wrote: > On 2020/9/12 0:28, Qais Yousef wrote: >> On 09/10/20 13:42, Aubrey Li wrote: >>> Added idle cpumask to track idle cpus in sched domain. When a CPU >>> enters idle, its corresponding bit in the idle cpumask will be set, >>>

Re: [RFC PATCH v1 1/1] sched/fair: select idle cpu from idle cpumask in sched domain

2020-09-11 Thread Li, Aubrey
On 2020/9/12 0:28, Qais Yousef wrote: > On 09/10/20 13:42, Aubrey Li wrote: >> Added idle cpumask to track idle cpus in sched domain. When a CPU >> enters idle, its corresponding bit in the idle cpumask will be set, >> and when the CPU exits idle, its bit will be cleared. >> >> When a task wakes

Re: [RFC PATCH 00/16] Core scheduling v6(Internet mail)

2020-08-13 Thread Li, Aubrey
On 2020/8/14 12:04, benbjiang(蒋彪) wrote: > > >> On Aug 14, 2020, at 9:36 AM, Li, Aubrey wrote: >> >> On 2020/8/14 8:26, benbjiang(蒋彪) wrote: >>> >>> >>>> On Aug 13, 2020, at 12:28 PM, Li, Aubrey wrote: >>>> >>>> On

Re: [RFC PATCH 00/16] Core scheduling v6(Internet mail)

2020-08-13 Thread Li, Aubrey
On 2020/8/14 8:26, benbjiang(蒋彪) wrote: > > >> On Aug 13, 2020, at 12:28 PM, Li, Aubrey wrote: >> >> On 2020/8/13 7:08, Joel Fernandes wrote: >>> On Wed, Aug 12, 2020 at 10:01:24AM +0800, Li, Aubrey wrote: >>>> Hi Joel, >>>> >

Re: [RFC PATCH 00/16] Core scheduling v6

2020-08-12 Thread Li, Aubrey
On 2020/8/13 7:08, Joel Fernandes wrote: > On Wed, Aug 12, 2020 at 10:01:24AM +0800, Li, Aubrey wrote: >> Hi Joel, >> >> On 2020/8/10 0:44, Joel Fernandes wrote: >>> Hi Aubrey, >>> >>> Apologies for replying late as I was still looking into the det

Re: [RFC PATCH 00/16] Core scheduling v6

2020-08-11 Thread Li, Aubrey
Hi Joel, On 2020/8/10 0:44, Joel Fernandes wrote: > Hi Aubrey, > > Apologies for replying late as I was still looking into the details. > > On Wed, Aug 05, 2020 at 11:57:20AM +0800, Li, Aubrey wrote: > [...] >> +/* >> + * Core scheduling policy: >> + * -

Re: [RFC PATCH 00/16] Core scheduling v6

2020-08-04 Thread Li, Aubrey
On 2020/8/4 0:53, Joel Fernandes wrote: > Hi Aubrey, > > On Mon, Aug 3, 2020 at 4:23 AM Li, Aubrey wrote: >> >> On 2020/7/1 5:32, Vineeth Remanan Pillai wrote: >>> Sixth iteration of the Core-Scheduling feature. >>> >>> Core scheduling is

Re: [RFC PATCH 00/16] Core scheduling v6

2020-08-03 Thread Li, Aubrey
On 2020/7/1 5:32, Vineeth Remanan Pillai wrote: > Sixth iteration of the Core-Scheduling feature. > > Core scheduling is a feature that allows only trusted tasks to run > concurrently on cpus sharing compute resources (eg: hyperthreads on a > core). The goal is to mitigate the core-level

Re: [RFC PATCH 11/16] sched: migration changes for core scheduling(Internet mail)

2020-07-23 Thread Li, Aubrey
On 2020/7/24 9:26, benbjiang(蒋彪) wrote: > Hi, > >> On Jul 24, 2020, at 7:43 AM, Aubrey Li wrote: >> >> On Thu, Jul 23, 2020 at 4:28 PM benbjiang(蒋彪) wrote: >>> >>> Hi, >>> >>>> On Jul 23, 2020, at 4:06 PM, Li, Aubrey wro

Re: [RFC PATCH 11/16] sched: migration changes for core scheduling(Internet mail)

2020-07-23 Thread Li, Aubrey
On 2020/7/23 15:47, benbjiang(蒋彪) wrote: > Hi, > >> On Jul 23, 2020, at 1:39 PM, Li, Aubrey wrote: >> >> On 2020/7/23 12:23, benbjiang(蒋彪) wrote: >>> Hi, >>>> On Jul 23, 2020, at 11:35 AM, Li, Aubrey wrote: >>>> >>>> On 2

Re: [RFC PATCH 11/16] sched: migration changes for core scheduling(Internet mail)

2020-07-22 Thread Li, Aubrey
On 2020/7/23 12:23, benbjiang(蒋彪) wrote: > Hi, >> On Jul 23, 2020, at 11:35 AM, Li, Aubrey wrote: >> >> On 2020/7/23 10:42, benbjiang(蒋彪) wrote: >>> Hi, >>> >>>> On Jul 23, 2020, at 9:57 AM, Li, Aubrey wrote: >>>> >>>>

Re: [RFC PATCH 11/16] sched: migration changes for core scheduling(Internet mail)

2020-07-22 Thread Li, Aubrey
On 2020/7/23 10:42, benbjiang(蒋彪) wrote: > Hi, > >> On Jul 23, 2020, at 9:57 AM, Li, Aubrey wrote: >> >> On 2020/7/22 22:32, benbjiang(蒋彪) wrote: >>> Hi, >>> >>>> On Jul 22, 2020, at 8:13 PM, Li, Aubrey wrote: >>>&

Re: [RFC PATCH 11/16] sched: migration changes for core scheduling(Internet mail)

2020-07-22 Thread Li, Aubrey
On 2020/7/22 22:32, benbjiang(蒋彪) wrote: > Hi, > >> On Jul 22, 2020, at 8:13 PM, Li, Aubrey wrote: >> >> On 2020/7/22 16:54, benbjiang(蒋彪) wrote: >>> Hi, Aubrey, >>> >>>> On Jul 1, 2020, at 5:32 AM, Vineeth Remanan Pillai >>>

Re: [RFC PATCH 11/16] sched: migration changes for core scheduling(Internet mail)

2020-07-22 Thread Li, Aubrey
On 2020/7/22 16:54, benbjiang(蒋彪) wrote: > Hi, Aubrey, > >> On Jul 1, 2020, at 5:32 AM, Vineeth Remanan Pillai >> wrote: >> >> From: Aubrey Li >> >> - Don't migrate if there is a cookie mismatch >> Load balance tries to move task from busiest CPU to the >> destination CPU. When core

Re: [RFC PATCH 10/16] sched: Trivial forced-newidle balancer(Internet mail)

2020-07-20 Thread Li, Aubrey
On 2020/7/20 15:23, benbjiang(蒋彪) wrote: > Hi,  > >> On Jul 20, 2020, at 2:06 PM, Li, Aubrey > <mailto:aubrey...@linux.intel.com>> wrote: >> >> On 2020/7/20 12:06, benbjiang(蒋彪) wrote: >>> Hi, >>> >>>> On Jul 1, 2020, at 5:3

Re: [RFC PATCH 10/16] sched: Trivial forced-newidle balancer(Internet mail)

2020-07-20 Thread Li, Aubrey
On 2020/7/20 12:06, benbjiang(蒋彪) wrote: > Hi, > >> On Jul 1, 2020, at 5:32 AM, Vineeth Remanan Pillai >> wrote: >> >> From: Peter Zijlstra >> >> When a sibling is forced-idle to match the core-cookie; search for >> matching tasks to fill the core. >> >> rcu_read_unlock() can incur an

Re: [RFC PATCH 14/16] irq: Add support for core-wide protection of IRQ and softirq

2020-07-10 Thread Li, Aubrey
Hi Joel/Vineeth, On 2020/7/1 5:32, Vineeth Remanan Pillai wrote: > From: "Joel Fernandes (Google)" > > With current core scheduling patchset, non-threaded IRQ and softirq > victims can leak data from its hyperthread to a sibling hyperthread > running an attacker. > > For MDS, it is possible

Re: [RFC PATCH 00/13] Core scheduling v5

2020-06-29 Thread Li, Aubrey
Hi Vineeth, On 2020/6/26 4:12, Vineeth Remanan Pillai wrote: > On Wed, Mar 4, 2020 at 12:00 PM vpillai wrote: >> >> >> Fifth iteration of the Core-Scheduling feature. >> > Its probably time for an iteration and We are planning to post v6 based > on this branch: >

Re: [RFC PATCH 11/13] sched: migration changes for core scheduling

2020-06-14 Thread Li, Aubrey
On 2020/6/14 2:59, Vineeth Remanan Pillai wrote: > On Fri, Jun 12, 2020 at 10:25 PM Joel Fernandes > wrote: >> >> Ok, so I take it that you will make it so in v6 then, unless of course >> someone else objects. >> > Yes, just wanted to hear from Aubrey, Tim and others as well to see > if we have

Re: [PATCH] proc:fix confusing macro arg name

2019-10-08 Thread Li, Aubrey
On 2019/10/8 14:44, linmiaohe wrote: > Add suitable additional cc's as Andrew Morton suggested. > Get cc list from get_maintainer script: > [root@localhost mm]# ./scripts/get_maintainer.pl > 0001-proc-fix-confusing-macro-arg-name.patch > Alexey Dobriyan (reviewer:PROC FILESYSTEM) >

Re: [PATCH] x86/apic: Handle missing global clockevent gracefully

2019-08-12 Thread Li, Aubrey
On 2019/8/9 20:54, Thomas Gleixner wrote: > Some newer machines do not advertise legacy timers. The kernel can handle > that situation if the TSC and the CPU frequency are enumerated by CPUID or > MSRs and the CPU supports TSC deadline timer. If the CPU does not support > TSC deadline timer the

Re: setup_boot_APIC_clock() NULL dereference during early boot on reduced hardware platforms

2019-08-01 Thread Li, Aubrey
On 2019/8/1 16:13, Thomas Gleixner wrote: > On Thu, 1 Aug 2019, Aubrey Li wrote: >> On Thu, Aug 1, 2019 at 3:35 PM Thomas Gleixner wrote: >>> >>> On Thu, 1 Aug 2019, Aubrey Li wrote: On Thu, Aug 1, 2019 at 2:26 PM Daniel Drake wrote: > global_clock_event is NULL here. This is a "reduced

Re: [RFC PATCH v3 00/16] Core scheduling v3

2019-07-30 Thread Li, Aubrey
On 2019/7/26 23:21, Julien Desfossez wrote: > On 25-Jul-2019 10:30:03 PM, Aaron Lu wrote: >> >> I tried a different approach based on vruntime with 3 patches following. > [...] > > We have experimented with this new patchset and indeed the fairness is > now much better. Interactive tasks with v3

Re: [RFC PATCH v3 00/16] Core scheduling v3

2019-07-25 Thread Li, Aubrey
On 2019/7/25 22:30, Aaron Lu wrote: > On Mon, Jul 22, 2019 at 06:26:46PM +0800, Aubrey Li wrote: >> The granularity period of util_avg seems too large to decide task priority >> during pick_task(), at least it is in my case, cfs_prio_less() always picked >> core max task, so pick_task() eventually

  1   2   3   4   5   6   >