Re: [RFC PATCH v2 1/8] cpuidle: menu: extract prediction functionality

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:26, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:27 AM CEST Aubrey Li wrote: >> There are several factors in the menu governor to predict the next >> idle interval: >> - the next timer >> - the recent idle interval history >> - the corrected idle interval pattern

Re: [RFC PATCH v2 2/8] cpuidle: record the overhead of idle entry

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:35, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:28 AM CEST Aubrey Li wrote: >> Record the overhead of idle entry in micro-second >> > > What is this needed for? We need to figure out how long of a idle is a short idle and recording the overhead is for this purp

Re: [RFC PATCH v2 4/8] tick/nohz: keep tick on for a fast idle

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:51, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:30 AM CEST Aubrey Li wrote: >> If the next idle is expected to be a fast idle, we should keep tick >> on before going into idle >> >> Signed-off-by: Aubrey Li > > This also can be merged with the previous patch (a

Re: [RFC PATCH v2 4/8] tick/nohz: keep tick on for a fast idle

2017-10-15 Thread Li, Aubrey
On 2017/10/16 12:45, Mike Galbraith wrote: > On Mon, 2017-10-16 at 11:26 +0800, Li, Aubrey wrote: >> >> I'll try to move quiet_vmstat() into the normal idle branch if this patch >> series >> are reasonable. Is fast_idle a good indication for it? > > see

Re: [RFC PATCH v2 6/8] cpuidle: make fast idle threshold tunable

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:59, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:32 AM CEST Aubrey Li wrote: >> Add a knob to make fast idle threshold tunable >> >> Signed-off-by: Aubrey Li > > I first of all am not sure about the need to add a tunable for this at all > in the first place. Ac

Re: [RFC PATCH v2 7/8] cpuidle: introduce irq timing to make idle prediction

2017-10-15 Thread Li, Aubrey
On 2017/10/14 9:01, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:33 AM CEST Aubrey Li wrote: >> Introduce irq timings output as a factor to predict the duration >> of the coming idle >> >> @@ -342,13 +343,27 @@ void cpuidle_entry_end(void) >> void cpuidle_predict(void) >> { >>

Re: [RFC PATCH v2 4/8] tick/nohz: keep tick on for a fast idle

2017-10-15 Thread Li, Aubrey
On 2017/10/16 14:25, Mike Galbraith wrote: > On Mon, 2017-10-16 at 13:34 +0800, Li, Aubrey wrote: >> On 2017/10/16 12:45, Mike Galbraith wrote: >>> On Mon, 2017-10-16 at 11:26 +0800, Li, Aubrey wrote: >>>> >>>> I'll try to move quiet_vmstat() into th

Re: [RFC PATCH v2 5/8] timers: keep sleep length updated as needed

2017-10-15 Thread Li, Aubrey
On 2017/10/14 8:56, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:31 AM CEST Aubrey Li wrote: >> sleep length indicates how long we'll be idle. Currently, it's updated >> only when tick nohz enters. These patch series make a new requirement >> with tick, so we should keep sleep le

Re: [RFC PATCH v2 0/8] Introduct cpu idle prediction functionality

2017-10-16 Thread Li, Aubrey
On 2017/10/14 9:14, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:26 AM CEST Aubrey Li wrote: >> We found under some latency intensive workloads, short idle periods occurs >> very common, then idle entry and exit path starts to dominate, so it's >> important to optimize them. To d

Re: [RFC PATCH v2 3/8] cpuidle: add a new predict interface

2017-10-16 Thread Li, Aubrey
On 2017/10/14 8:45, Rafael J. Wysocki wrote: > On Saturday, September 30, 2017 9:20:29 AM CEST Aubrey Li wrote: >> For the governor has predict functionality, add a new predict >> interface in cpuidle framework to call and use it. > > Care to describe how it is intended to work? > > Also this pat

Re: [RFC PATCH v2 3/8] cpuidle: add a new predict interface

2017-10-16 Thread Li, Aubrey
On 2017/10/14 9:27, Rafael J. Wysocki wrote: >> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c >> index 0951dac..8704f3c 100644 >> --- a/kernel/sched/idle.c >> +++ b/kernel/sched/idle.c >> @@ -225,6 +225,7 @@ static void do_idle(void) >> */ >> __current_set_polling(); >> qui

Re: [RFC PATCH v2 5/8] timers: keep sleep length updated as needed

2017-10-16 Thread Li, Aubrey
On 2017/10/17 7:58, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 8:46:41 AM CEST Li, Aubrey wrote: >> On 2017/10/14 8:56, Rafael J. Wysocki wrote: >>> On Saturday, September 30, 2017 9:20:31 AM CEST Aubrey Li wrote: >>>> sleep length indicates how long

Re: [RFC PATCH v2 6/8] cpuidle: make fast idle threshold tunable

2017-10-16 Thread Li, Aubrey
On 2017/10/17 8:01, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 8:00:45 AM CEST Li, Aubrey wrote: >> On 2017/10/14 8:59, Rafael J. Wysocki wrote: >>> On Saturday, September 30, 2017 9:20:32 AM CEST Aubrey Li wrote: >>>> Add a knob to make fast idle threshol

Re: [RFC PATCH v2 2/8] cpuidle: record the overhead of idle entry

2017-10-17 Thread Li, Aubrey
On 2017/10/17 8:05, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 5:11:57 AM CEST Li, Aubrey wrote: >> On 2017/10/14 8:35, Rafael J. Wysocki wrote: >>> On Saturday, September 30, 2017 9:20:28 AM CEST Aubrey Li wrote: >>>> Record the overhead of idle entry in

Re: [RFC PATCH v2 0/8] Introduct cpu idle prediction functionality

2017-10-17 Thread Li, Aubrey
On 2017/10/17 8:07, Rafael J. Wysocki wrote: > On Monday, October 16, 2017 9:44:41 AM CEST Li, Aubrey wrote: >> >> Or you concern why the threshold can't simply be tick interval? > > That I guess. > >> For the latter, if the threshold is close/equal to the t

Re: [RFC/RFT][PATCH 4/7] cpuidle: menu: Split idle duration prediction from state selection

2018-03-05 Thread Li, Aubrey
On 2018/3/5 21:53, Peter Zijlstra wrote: > On Mon, Mar 05, 2018 at 02:05:10PM +0100, Rafael J. Wysocki wrote: >> On Mon, Mar 5, 2018 at 1:50 PM, Peter Zijlstra wrote: >>> On Mon, Mar 05, 2018 at 12:47:23PM +0100, Rafael J. Wysocki wrote: > IOW, the target residency of the selected state does

Re: [RFC/RFT][PATCH 4/7] cpuidle: menu: Split idle duration prediction from state selection

2018-03-06 Thread Li, Aubrey
On 2018/3/6 16:45, Peter Zijlstra wrote: > On Tue, Mar 06, 2018 at 10:15:10AM +0800, Li, Aubrey wrote: >> On 2018/3/5 21:53, Peter Zijlstra wrote: >>> On Mon, Mar 05, 2018 at 02:05:10PM +0100, Rafael J. Wysocki wrote: >>>> On Mon, Mar 5, 2018 at 1:50 PM, Peter Zijls

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-25 Thread Li, Aubrey
On 2018/11/18 22:03, Samuel Neves wrote: > On 11/17/18 12:36 AM, Li, Aubrey wrote: >> On 2018/11/17 7:10, Dave Hansen wrote: >>> Just to be clear: there are 3 AVX-512 XSAVE states: >>> >>> XFEATURE_OPMASK, >>> XFEATURE_ZMM_Hi256, >&

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-20 Thread Li, Aubrey
On 2018/11/18 22:03, Samuel Neves wrote: > On 11/17/18 12:36 AM, Li, Aubrey wrote: >> On 2018/11/17 7:10, Dave Hansen wrote: >>> Just to be clear: there are 3 AVX-512 XSAVE states: >>> >>> XFEATURE_OPMASK, >>> XFEATURE_ZMM_Hi256, >&

Re: [PATCH v3 2/2] proc: add /proc//arch_state

2018-11-20 Thread Li, Aubrey
On 2018/11/20 1:39, Peter Zijlstra wrote: > On Thu, Nov 15, 2018 at 07:00:07AM +0800, Aubrey Li wrote: >> Add a /proc//arch_state interface to expose per-task cpu specific >> state values. >> >> Exposing AVX-512 Hi16_ZMM registers usage is for the user space job >> scheduler to cluster AVX-512 usin

Re: [PATCH v3 2/2] proc: add /proc//arch_state

2018-11-21 Thread Li, Aubrey
On 2018/11/21 17:53, Peter Zijlstra wrote: > On Wed, Nov 21, 2018 at 09:19:36AM +0100, Peter Zijlstra wrote: >> On Wed, Nov 21, 2018 at 09:39:00AM +0800, Li, Aubrey wrote: >>>> Also; you were going to shop around with the other architectures to see >>>> what the

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-15 Thread Li, Aubrey
On 2018/11/15 23:40, Dave Hansen wrote: > On 11/14/18 3:00 PM, Aubrey Li wrote: >> AVX-512 component has 3 states, only Hi16_ZMM state causes notable >> frequency drop. Add per task Hi16_ZMM state tracking to context switch. > > Just curious, but is there any public documentation of this? It seem

Re: [PATCH v3 2/2] proc: add /proc//arch_state

2018-11-15 Thread Li, Aubrey
On 2018/11/15 23:18, Dave Hansen wrote: > On 11/14/18 3:00 PM, Aubrey Li wrote: >> +void arch_thread_state(struct seq_file *m, struct task_struct *task) >> +{ >> +/* >> + * Report AVX-512 Hi16_ZMM registers usage >> + */ >> +if (task->thread.fpu.hi16zmm_usage) >> +seq_pu

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-16 Thread Li, Aubrey
On 2018/11/17 7:10, Dave Hansen wrote: > On 11/15/18 4:21 PM, Li, Aubrey wrote: >> "Core cycles where the core was running with power delivery for license >> level 2 (introduced in Skylake Server microarchitecture). This includes >> high current AVX 512-bit instruc

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-11 Thread Li, Aubrey
On 2018/11/9 19:21, Thomas Gleixner wrote: > Aubrey, > > On Thu, 8 Nov 2018, Aubrey Li wrote: > >> Subject: x86/fpu: detect AVX task > > What is an AVX task? I know what you mean, but for the casual reader this > is not very informative. So something like: > > x86/fpu: Track AVX usage of

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-11 Thread Li, Aubrey
Hi Dave, Thanks for your comments! On 2018/11/12 10:32, Dave Hansen wrote: > On 11/7/18 9:16 AM, Aubrey Li wrote: >> XSAVES and its variants use init optimization to reduce the amount of >> data that they save to memory during context switch. Init optimization >> uses the state component bitmap t

Re: [RFC PATCH v1 2/2] proc: add /proc//thread_state

2018-11-11 Thread Li, Aubrey
On 2018/11/12 13:31, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > >> On Thu, Nov 08, 2018 at 07:32:46AM +0100, Ingo Molnar wrote: >>> >>> * Aubrey Li wrote: >>> Expose the per-task cpu specific thread state value, it's helpful for userland to classify and schedule the tasks by dif

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-12 Thread Li, Aubrey
On 2018/11/12 23:46, Dave Hansen wrote: > On 11/11/18 9:38 PM, Li, Aubrey wrote: > >>> Do we want this, or do we want something more time-based? >>> >> This counter is introduced here to solve the race of context switch and >> VZEROUPPER. 3 context switches

Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

2018-11-13 Thread Li, Aubrey
On 2018/11/13 18:25, David Laight wrote: > From: Li, Aubrey >> Sent: 12 November 2018 01:41 > ... >> VZEROUPPER instruction resets the init state. If context switch happens >> to occur exactly after VZEROUPPER instruction, XINUSE bitmap is empty(all >> zeros), which i

Re: [PATCH v4 1/2] x86/fpu: track AVX-512 usage of tasks

2018-12-11 Thread Li, Aubrey
On 2018/12/12 8:14, Arjan van de Ven wrote: > On 12/11/2018 3:46 PM, Li, Aubrey wrote: >> On 2018/12/12 1:18, Dave Hansen wrote: >>> On 12/10/18 4:24 PM, Aubrey Li wrote: >>>> The tracking turns on the usage flag at the next context switch of >>>> th

Re: [RESEND PATCH v5 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/18 16:33, Thomas Gleixner wrote: > Aubrey, > > On Tue, 18 Dec 2018, Aubrey Li wrote: > > RESEND > > Please don't do that. This is not a resend because you changed something, > so it's new version. Usually I ignore resends when I have the original > submission already lined up for

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/18 22:14, Thomas Gleixner wrote: > On Tue, 18 Dec 2018, Aubrey Li wrote: >> diff --git a/arch/x86/include/asm/fpu/internal.h >> b/arch/x86/include/asm/fpu/internal.h >> index a38bf5a1e37a..8778ac172255 100644 >> --- a/arch/x86/include/asm/fpu/internal.h >> +++ b/arch/x86/include/asm/fpu

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/18 23:32, Thomas Gleixner wrote: > On Tue, 18 Dec 2018, Li, Aubrey wrote: > >> On 2018/12/18 22:14, Thomas Gleixner wrote: >>> On Tue, 18 Dec 2018, Aubrey Li wrote: >>>> diff --git a/arch/x86/include/asm/fpu/internal.h >>>> b/arch/x86/inclu

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/19 1:14, Dave Hansen wrote: > On 12/18/18 7:32 AM, Thomas Gleixner wrote: >> What exactly prevents a 32bit kernel from having the AVX512 feature bit >> set? And if it cannot be set on 32bit, then why are you compiling that code >> in at all? > > There are three different AVX-512 states

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/19 5:38, Andi Kleen wrote: >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically >> 32bit >> kernel can use AVX512, but not sure if anyone use it like this. >> get_jiffies_64() >> includes jiffies_lock ops so not good in context switch. So I want to use raw >> jif

Re: [PATCH v4 1/2] x86/fpu: track AVX-512 usage of tasks

2018-12-11 Thread Li, Aubrey
On 2018/12/12 1:18, Dave Hansen wrote: > On 12/10/18 4:24 PM, Aubrey Li wrote: >> The tracking turns on the usage flag at the next context switch of >> the task, but requires 3 consecutive context switches with no usage >> to clear it. This decay is required because well-written AVX-512 >> applicat

Re: [PATCH v4 1/2] x86/fpu: track AVX-512 usage of tasks

2018-12-11 Thread Li, Aubrey
On 2018/12/12 1:20, Dave Hansen wrote: > to update AVX512 state >> + */ >> +static inline void update_avx512_state(struct fpu *fpu) >> +{ >> +/* >> + * AVX512 state is tracked here because its use is known to slow >> + * the max clock speed of the core. >> + * >> + * However, A

Re: [RFC PATCH v1 1/2] x86/fpu: detect AVX task

2018-11-07 Thread Li, Aubrey
On 2018/11/8 1:41, Tim Chen wrote: > On 11/06/2018 10:23 AM, Aubrey Li wrote: > >> +static inline void update_avx_state(struct avx_state *avx) >> +{ >> +/* >> + * Check if XGETBV with ECX = 1 supported. XGETBV with ECX = 1 >> + * returns the logical-AND of XCR0 and XINUSE. XINUSE is a

Re: [RFC PATCH v1 2/2] proc: add /proc//thread_state

2018-11-08 Thread Li, Aubrey
On 2018/11/8 18:17, Peter Zijlstra wrote: > On Thu, Nov 08, 2018 at 07:32:46AM +0100, Ingo Molnar wrote: >> >> * Aubrey Li wrote: >> >>> Expose the per-task cpu specific thread state value, it's helpful >>> for userland to classify and schedule the tasks by different policies >> >> That's pretty v

[PATCH v3]PM/Sleep: Timer quiesce in freeze state

2014-12-08 Thread Li, Aubrey
The patch is based on v3.18. Freeze is a general power saving state that processes are frozen, devices are suspended and CPUs are in idle state. However, when the system enters freeze state, there are a few timers keep ticking and hence consumes more power unnecessarily. The observed timer events

Re: [PATCH v2 4/4] PMC driver: Add Cherrytrail PMC interface

2015-01-25 Thread Li, Aubrey
On 2015/1/22 17:26, Andy Shevchenko wrote: > On Thu, 2015-01-22 at 12:02 +0800, Li, Aubrey wrote: >> On 2015/1/21 5:50, Andy Shevchenko wrote: >>> The patch adds CHT PMC interface. This exposes all the South IP device power >>> states and S0ix states for CHT. The bit m

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Li, Aubrey
Hi Thomas, Thanks for the comments, my feedback below: On 2015/1/22 18:15, Thomas Gleixner wrote: > On Tue, 9 Dec 2014, Li, Aubrey wrote: >> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h >> index 2e4cb67..d118e0b 100644 >> --- a/include/linux/clockchi

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-13 Thread Li, Aubrey
Happy New Year, can you please take a look at this patch now? Thanks, -Aubrey On 2014/12/9 11:01, Li, Aubrey wrote: > The patch is based on v3.18. > > Freeze is a general power saving state that processes are frozen, devices > are suspended and CPUs are in idle state. However, whe

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Li, Aubrey
On 2015/1/26 22:45, Rafael J. Wysocki wrote: > On Monday, January 26, 2015 03:15:43 PM Thomas Gleixner wrote: >> On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: >> >>> On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: >>>> On Mon, 26 Jan 2015, Li, Au

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-27 Thread Li, Aubrey
On 2015/1/26 22:41, Rafael J. Wysocki wrote: > On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: >> On Mon, 26 Jan 2015, Li, Aubrey wrote: >>> On 2015/1/22 18:15, Thomas Gleixner wrote: > > [...] > >>>>> + /* >>>>&

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-27 Thread Li, Aubrey
On 2015/1/27 23:10, Rafael J. Wysocki wrote: > On Tuesday, January 27, 2015 04:03:29 PM Li, Aubrey wrote: >> On 2015/1/26 22:41, Rafael J. Wysocki wrote: >>> On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: >>>> On Mon, 26 Jan 2015, Li, Aubrey wrote: &g

Re: [LKP] [x86/platform, acpi] 7486341a98f: genirq: Flags mismatch irq 8. 00000080 (mmc0) vs. 00000000 (rtc0)

2015-03-22 Thread Li, Aubrey
On 2015/3/20 16:38, Huang Ying wrote: > FYI, we noticed the below changes on > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > commit 7486341a98f26857f383aec88ffa10950087c3a1 ("x86/platform, acpi: Bypass > legacy PIC and PIT in ACPI hardware reduced mode") > > > +---

Re: [LKP] [x86/platform, acpi] 7486341a98f: genirq: Flags mismatch irq 8. 00000080 (mmc0) vs. 00000000 (rtc0)

2015-03-30 Thread Li, Aubrey
On 2015/3/30 16:37, Jiang Liu wrote: > On 2015/3/30 16:28, Li, Aubrey wrote: >> Ying, >> >> can you please try this patch to see if the problem is gone on your side? > Hi Aubrey, > I would be better if we could change RTC driver instead. Hey Gerry, IRQ8 for RTC i

[PATCH] x86/platform, acpi: Statically assign IRQ numbers in ACPI, hardware reduced mode

2015-03-31 Thread Li, Aubrey
mismatch irq 8. 0080 (mmc0) vs. (rtc0) So we want to statically assign IRQ numbers in ACPI hardware reduced mode to fix this error, this also matches with the original IRQ assignment policy. Signed-off-by: Li Aubrey Cc: Alan Cox Cc: Len Brown Cc: Rafael J. Wysocki Cc: Arjan van de

Re: [PATCH v15 1/3] /proc/pid/status: Add support for architecture specific output

2019-04-17 Thread Li, Aubrey
On 2019/4/17 7:01, Andrew Morton wrote: > On Tue, 16 Apr 2019 14:32:48 +0800 Aubrey Li > wrote: > >> The architecture specific information of the running processes could >> be useful to the userland. Add support to examine process architecture >> specific information externally. > > The impleme

Re: [PATCH v17 1/3] proc: add /proc//arch_status

2019-04-24 Thread Li, Aubrey
On 2019/4/25 5:18, Thomas Gleixner wrote: > On Mon, 22 Apr 2019, Aubrey Li wrote: >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >> index 5ad92419be19..d5a9c5ddd453 100644 >> --- a/arch/x86/Kconfig >> +++ b/arch/x86/Kconfig >> @@ -208,6 +208,7 @@ config X86 >> select USER_STACKTRACE_SUPPO

Re: [PATCH v17 1/3] proc: add /proc//arch_status

2019-04-25 Thread Li, Aubrey
On 2019/4/25 15:20, Thomas Gleixner wrote: > On Thu, 25 Apr 2019, Li, Aubrey wrote: > >> On 2019/4/25 5:18, Thomas Gleixner wrote: >>> On Mon, 22 Apr 2019, Aubrey Li wrote: >>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >>>> index 5ad92419

Re: [PATCH v17 1/3] proc: add /proc//arch_status

2019-04-25 Thread Li, Aubrey
On 2019/4/25 16:20, Thomas Gleixner wrote: > On Thu, 25 Apr 2019, Li, Aubrey wrote: >> On 2019/4/25 15:20, Thomas Gleixner wrote: >>> Let the arch select CONFIG_PROC_PID_ARCH_STATUS >> >> Sorry, I didn't get the point here, above you mentioned not mixing arch an

Re: [PATCH v17 1/3] proc: add /proc//arch_status

2019-04-25 Thread Li, Aubrey
On 2019/4/25 18:11, Enrico Weigelt, metux IT consult wrote: > On 25.04.19 03:50, Li, Aubrey wrote: > >>>> +>>> +config PROC_PID_ARCH_STATUS>>> + bool "Enable > /proc//arch_status file">>>> Why is this switchable? x86 selects

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

2019-03-13 Thread Li, Aubrey
The original patch seems missing the following change for 32bit. Thanks, -Aubrey diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 9fbb10383434..78de28ebc45d 100644 --- a/kernel/sched/cpuacct.c +++ b/kernel/sched/cpuacct.c @@ -111,7 +111,7 @@ static u64 cpuacct_cpuusage_read(stru

Re: [PATCH v14 1/3] /proc/pid/status: Add support for architecture specific output

2019-04-09 Thread Li, Aubrey
On 2019/4/10 9:58, Andy Lutomirski wrote: > On Tue, Apr 9, 2019 at 6:55 PM Aubrey Li wrote: >> >> The architecture specific information of the running processes could >> be useful to the userland. Add support to examine process architecture >> specific information externally. >> >> Signed-off-by:

Re: [PATCH v14 1/3] /proc/pid/status: Add support for architecture specific output

2019-04-09 Thread Li, Aubrey
On 2019/4/10 10:25, Andy Lutomirski wrote: > On Tue, Apr 9, 2019 at 7:20 PM Li, Aubrey wrote: >> >> On 2019/4/10 9:58, Andy Lutomirski wrote: >>> On Tue, Apr 9, 2019 at 6:55 PM Aubrey Li wrote: >>>> >>>> The architecture specific information of t

Re: [PATCH v14 1/3] /proc/pid/status: Add support for architecture specific output

2019-04-09 Thread Li, Aubrey
On 2019/4/10 10:36, Li, Aubrey wrote: > On 2019/4/10 10:25, Andy Lutomirski wrote: >> On Tue, Apr 9, 2019 at 7:20 PM Li, Aubrey wrote: >>> >>> On 2019/4/10 9:58, Andy Lutomirski wrote: >>>> On Tue, Apr 9, 2019 at 6:55 PM Aubrey Li wrote: >>>>&

Re: [PATCH v14 1/3] /proc/pid/status: Add support for architecture specific output

2019-04-10 Thread Li, Aubrey
On 2019/4/10 22:54, Andy Lutomirski wrote: > On Tue, Apr 9, 2019 at 8:40 PM Li, Aubrey wrote: >> >> On 2019/4/10 10:36, Li, Aubrey wrote: >>> On 2019/4/10 10:25, Andy Lutomirski wrote: >>>> On Tue, Apr 9, 2019 at 7:20 PM Li, Aubrey >>>> 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: [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: [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 wh

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: >> + * - COR

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-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 side-chan

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 idl

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 sche

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 remove

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: [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 remember

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: [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 cle

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] 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 machines

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 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 kn

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 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 o

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 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 t

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 of

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 c

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 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/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-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 cle

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 >>> perform

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: [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: [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] 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 t

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 d

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: [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 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 candidate.

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 11:56

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: [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: [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 mat

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

  1   2   3   4   >