[PATCH] cpu/hotplug: print warning message in proper places for online or offline cpu

2016-05-04 Thread Chen Yucong
When we online or offline a CPU, unexpected errors may occur for a number of reasons. So if a function called within _cpu_down() or _cpu_up() returns a error code indicating a failed operation, the warning message should be printed rather than fallow the failed __cpu_notify(). Signed-off-by: Chen

[PATCH] mm/memory_failure: unify the output-prefix for printk()

2016-04-27 Thread Chen Yucong
This patch aims to replace 'MCE' that was introduced by 'commit c2200538d89d ("mm/memory-failure: fix race with compound page split/merge")' with 'Memory failure'.[1] [1] https://lkml.org/lkml/2016/4/18/894 Signed-off-by: Chen Yucong --- mm/mem

[PATCH] memory failure: replace 'MCE' with 'Memory failure'

2016-04-08 Thread Chen Yucong
r any machine check exception. This patch aims to replace 'MCE' with a more appropriate prefix. [1] commit 75eb3d9b60c2 ("powerpc/powernv: Get FSP memory errors and plumb into memory poison infrastructure.") Signed-off-by: Chen Yucong --- mm/memory-failure.c | 69 +

Re: [PATCH] arch/x86: convert all printk(KERN_INFO ) to pr_info()

2016-02-25 Thread Chen Yucong
On Thu, 2016-02-25 at 09:22 +0100, Ingo Molnar wrote: > * Chen Yucong wrote: > > > arch/x86/* use a mixture of printk(KERN_INFO ) and pr_info(). > > This patch converts all of printk(KERN_INFO ) to pr_info() for > > arch/x86 directory. > > > > Signed-o

[PATCH] mm, memory hotplug: print debug message in the proper way for online_pages

2016-02-24 Thread Chen Yucong
) to pr_(), and moves __offline_pages() to not print failure information with KERN_INFO according to David Rientjes's suggestion[1]. [1] https://lkml.org/lkml/2016/2/24/1094 Signed-off-by: Chen Yucong --- mm/memory_hotplug.c | 32 1 file changed, 16 insertio

Re: [PATCH] mm, memory hotplug: print more failure information for online_pages

2016-02-24 Thread Chen Yucong
On Wed, 2016-02-24 at 13:33 -0800, David Rientjes wrote: > On Wed, 24 Feb 2016, Chen Yucong wrote: > > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > > index c832ef3..e4b6dec3 100644 > > --- a/mm/memory_hotplug.c > > +++ b/mm/memory_hotplug.c > &

[PATCH] mm, memory hotplug: print more failure information for online_pages

2016-02-24 Thread Chen Yucong
ERN_) to pr_(). Signed-off-by: Chen Yucong --- mm/memory_hotplug.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index c832ef3..e4b6dec3 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotpl

[PATCH] arch/x86: convert all printk(KERN_INFO ) to pr_info()

2016-02-22 Thread Chen Yucong
arch/x86/* use a mixture of printk(KERN_INFO ) and pr_info(). This patch converts all of printk(KERN_INFO ) to pr_info() for arch/x86 directory. Signed-off-by: Chen Yucong --- arch/x86/crypto/blowfish_glue.c | 5 +--- arch/x86/crypto/camellia_glue.c | 5 +--- arch/x86/crypto

[PATCH v2] x86/kernel: use pr_() and dev_

2016-02-13 Thread Chen Yucong
() without a log level. Signed-off-by: Chen Yucong --- arch/x86/kernel/acpi/boot.c | 110 arch/x86/kernel/acpi/cstate.c | 5 +- arch/x86/kernel/acpi/sleep.c| 2 +- arch/x86/kernel/alternative.c | 8 +-- arch/x86/kernel

[PATCH 2/2] x86: use pr_default() macro

2016-02-05 Thread Chen Yucong
- convert printk(KERN_DEFAULT ...) to pr_default(...) Signed-off-by: Chen Yucong --- arch/x86/kernel/dumpstack.c| 3 +-- arch/x86/kernel/dumpstack_64.c | 4 ++-- arch/x86/kernel/process_32.c | 29 ++--- arch/x86/kernel/process_64.c | 41

[PATCH 1/2] printk: introduce pr_default() macro

2016-02-05 Thread Chen Yucong
Until now, we cover all log-levels by pr_ macros except KERN_DEFAULT one. Add it for convenience. Signed-off-by: Chen Yucong --- include/linux/printk.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/printk.h b/include/linux/printk.h index 51dd6b8..9808130 100644 --- a

[PATCH] x86/kernel: use pr_() and dev_

2016-02-05 Thread Chen Yucong
() without a log level. Signed-off-by: Chen Yucong --- arch/x86/kernel/acpi/boot.c | 106 arch/x86/kernel/acpi/cstate.c | 5 +- arch/x86/kernel/acpi/sleep.c| 2 +- arch/x86/kernel/alternative.c | 8 +-- arch/x86/kernel

[tip:x86/cpu] x86/cpu: Convert printk(KERN_ ...) to pr_< level>(...)

2016-02-03 Thread tip-bot for Chen Yucong
Commit-ID: 1b74dde7c47c19a73ea3e9fac95ac27b5d3d50c5 Gitweb: http://git.kernel.org/tip/1b74dde7c47c19a73ea3e9fac95ac27b5d3d50c5 Author: Chen Yucong AuthorDate: Tue, 2 Feb 2016 11:45:02 +0800 Committer: Ingo Molnar CommitDate: Wed, 3 Feb 2016 10:30:03 +0100 x86/cpu: Convert printk(KERN_

[PATCH] arch/x86/kernel/cpu: Convert printk(KERN_ ...) to pr_(...)

2016-02-01 Thread Chen Yucong
- Use the more current logging style pr_(...) instead of the old printk(KERN_ ...). - Convert pr_warning() to pr_warn(). Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/amd.c | 23 +++ arch/x86/kernel/cpu/bugs_64.c | 2 +- arch/x86/kernel/cpu

[PATCH] mcheck/threshold: use pr_err rather than printk(KERN_ERR ...)

2016-01-31 Thread Chen Yucong
Use the current logging styles. And convert printk(KERN_ERR ...) to pr_err(...) for threshold.c. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/threshold.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/threshold.c b/arch/x86

[PATCH] mce-inject: use pr_err() instead of printk(KERN_ERR, ...)

2016-01-30 Thread Chen Yucong
Signed-off-by: Chen Yucong Converted printk(KERN_ERR to pr_err. pr_ format is more compact and enable utilizing of pr_fmt macro. --- arch/x86/kernel/cpu/mcheck/mce-inject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86

[PATCH] x86/hw-breakpoints: eliminate a compiler warning for hw_breakpoint.c

2014-12-28 Thread Chen Yucong
above compiler warning. Signed-off-by: Chen Yucong --- arch/x86/kernel/hw_breakpoint.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c index 7114ba2..302eab3 100644 --- a/arch/x86/kernel/hw_breakpoint.c +++ b

[PATCH] x86, mce: use mce_usable_address() for UCNA memory error recovery

2014-12-28 Thread Chen Yucong
fine, but it doesn't even matter for AMD platform. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 48 -- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/m

[PATCH v4 2/2] x86, mce: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-11-17 Thread Chen Yucong
that have been used for handling SRAO errors to handle UCNA and Deferred errors. Acked-by: Borislav Petkov Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/arch/x86/kernel/cpu/mcheck/mc

[PATCH v4 0/2]RAS: add the support for handling UCNA/DEFERRED error

2014-11-17 Thread Chen Yucong
Hi all, At the suggestion of Boris, the first patch extends the mce_severity mechanism for handling UCNA/DEFERRED error. Link: https://lkml.org/lkml/2014/10/23/190 v2: The first patch have also eliminated a big hack to make mce_severity() work when called from non-exception context on the advi

[PATCH v4 1/2] x86, mce, severity: extend the the mce_severity mechanism to handle UCNA/DEFERRED error

2014-11-17 Thread Chen Yucong
. `is_excp' is used to explicitly specify the calling context of mce_severity. Reviewed-by: Aravind Gopalakrishnan Signed-off-by: Chen Yucong --- arch/x86/include/asm/mce.h|4 arch/x86/kernel/cpu/mcheck/mce-internal.h |4 +++- arch/x86/kernel/cpu/mcheck/mce-sever

Re: [PATCH v3 1/2] x86, mce, severity: extend the the mce_severity mechanism to handle UCNA/DEFERRED error

2014-11-11 Thread Chen Yucong
On Tue, 2014-11-11 at 18:44 +, Luck, Tony wrote: > >> The bank 7 error reported as severity 0 because EN=0 ... so we took no > >> action for it. > > > > How come EN is 0? Bank7 error reporting is not enabled? Why? Or the > > error injection thing doesn't do it? > > The "EN" bit is poorly name

[PATCH v3 2/2] x86, mce: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-11-07 Thread Chen Yucong
that have been used for handling SRAO errors to handle UCNA and Deferred errors. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/m

[PATCH v3 1/2] x86, mce, severity: extend the the mce_severity mechanism to handle UCNA/DEFERRED error

2014-11-07 Thread Chen Yucong
. `is_excp' is used to explicitly specify the calling context of mce_severity. Signed-off-by: Chen Yucong --- arch/x86/include/asm/mce.h|4 arch/x86/kernel/cpu/mcheck/mce-internal.h |4 +++- arch/x86/kernel/cpu/mcheck/mce-severity.c | 21 -

[PATCH v3 0/2]RAS: add the support for handling UCNA/DEFERRED error

2014-11-07 Thread Chen Yucong
Hi all, At the suggestion of Boris, the first patch extends the mce_severity mechanism for handling UCNA/DEFERRED error. Link: https://lkml.org/lkml/2014/10/23/190 v2: The first patch have also eliminated a big hack to make mce_severity() work when called from non-exception context on the advi

Re: [PATCH 1/2 v2] x86, mce, severity: extend the the mce_severity

2014-11-05 Thread Chen Yucong
On Wed, 2014-11-05 at 10:27 -0800, Tony Luck wrote: > > +#define ONEXCP.excp = NO_EXCP > I'm sorry, this is a typing error. Thanks! > Shouldn't this be named "NOEXCP" and used in the initializations > for the deferred and UCNA table entries? > In fact, "NOEXCP" can be used in the initia

[PATCH 1/2 v2] x86, mce, severity: extend the the mce_severity

2014-11-04 Thread Chen Yucong
. `is_excp' is used to explicitly specify the calling context of mce_severity. Signed-off-by: Chen Yucong --- arch/x86/include/asm/mce.h|4 arch/x86/kernel/cpu/mcheck/mce-internal.h |4 +++- arch/x86/kernel/cpu/mcheck/mce-severity.c | 21 -

[PATCH 2/2 v2] x86, mce: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-11-04 Thread Chen Yucong
SRAO errors to handle UCNA and Deferred errors. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 453e9bf..37f7649 1

[PATCH 0/2 v2] RAS: add the support for handling UCNA/DEFERRED error

2014-11-04 Thread Chen Yucong
Hi all, At the suggestion of Boris, the first patch extends the mce_severity mechanism for handling UCNA/DEFERRED error. Link: https://lkml.org/lkml/2014/10/23/190 The first patch have also eliminated a big hack to make mce_severity() work when called from non-exception context on the advice of

Re: [PATCH 2/2] x86, mce: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-11-03 Thread Chen Yucong
On Wed, 2014-10-29 at 10:16 +0800, Chen Yucong wrote: > On Mon, 2014-10-27 at 23:10 +, Luck, Tony wrote: > > + m->mcgstatus |= (MCG_STATUS_MCIP|MCG_STATUS_RIPV); > > + severity = mce_severity(m, mca_cfg.tolerant, NULL); > > > > This seems a big hack to make m

Re: [PATCH 2/2] x86, mce, amd: extend mce-inject for support threshold interrupt event injection on AMD platform

2014-11-03 Thread Chen Yucong
shold_interrupt() is used for handling > > >Threshold Interrupt event. And machine_check_poll() has been used for > > >polling other events. > > > > > >This patch introduces a new flag MCJ_INTERRUPT that will be used to > > >separate CMCI/Thres

Re: [PATCH 2/2] x86, mce, amd: extend mce-inject for support threshold interrupt event injection on AMD platform

2014-11-03 Thread Chen Yucong
() has been used for > > polling other events. > > > > This patch introduces a new flag MCJ_INTERRUPT that will be used to > > separate CMCI/Threshold Interrupt and POLL handler in mce-inject. > > > > Signed-off-by: Chen Yucong mailto:sla...@gmail.com>> > >

[PATCH] separate CMCI/Threshold Interrupt and POLL in mce-inject

2014-10-30 Thread Chen Yucong
This patch introduces a new flag MCJ_INTERRUPT that will be used to separate CMCI/Threshold Interrupt and POLL in mce-inject. Signed-off-by: Chen Yucong --- mce.h |5 +++-- mce.lex |1 + mce.y |6 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mce.h b

[PATCH 2/2] x86, mce, amd: extend mce-inject for support threshold interrupt event injection on AMD platform

2014-10-30 Thread Chen Yucong
handler. amd_threshold_interrupt() is used for handling Threshold Interrupt event. And machine_check_poll() has been used for polling other events. This patch introduces a new flag MCJ_INTERRUPT that will be used to separate CMCI/Threshold Interrupt and POLL handler in mce-inject. Signed-off-by: Chen

[PATCH 0/2] mce-inject: extend mce-inject for support threshold interrupt event injection on ADM platform

2014-10-30 Thread Chen Yucong
The work based on Boris's ras-for-3.19 branch. https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git -b ras-for-3.19 Until now, `mce-inject' is unable to inject threshold interrupt event on AMD platform. That's because both Threshold Interrupt and POLL have a separate event handler. amd_thr

[PATCH 1/2] x86, mce: apply MCE MSR wrappers to AMD platform for testing threshold interrupt handler

2014-10-30 Thread Chen Yucong
Until now, the `mce-inject' mechanism does not support error injection for threshold interrupt event in AMD platform. This patch aims to apply MCE MSR wrappers to AMD-specific threshold interrupt handler for supporting mce-inject. Signed-off-by: Chen Yucong --- arch/x86/include/asm/

Re: [PATCH 2/2] x86, mce: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-10-28 Thread Chen Yucong
status to avoid making logs > that have incorrect data. > Hi all, At the suggestion of Tony, this patch add a comment, and restore m->mcgstatus to avoid making logs that have incorrect data. thx! cyc From: Chen Yucong Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c

Re: [PATCH 2/2] x86, mce: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-10-27 Thread Chen Yucong
On Mon, 2014-10-27 at 23:10 +, Luck, Tony wrote: > + m->mcgstatus |= (MCG_STATUS_MCIP|MCG_STATUS_RIPV); > + severity = mce_severity(m, mca_cfg.tolerant, NULL); > > This seems a big hack to make mce_severity() work when called from > CMCI context (when MCG_STATUS register is not set).

Re: [PATCH 0/2] RAS: add the support for handling UCNA/DEFERRED error

2014-10-27 Thread Chen Yucong
On Mon, 2014-10-27 at 08:56 +0800, Chen Yucong wrote: Hi all, At the suggestion of Boris, the first patch extends the mce_severity mechanism for handling UCNA/DEFERRED error. Link: https://lkml.org/lkml/2014/10/23/190 And on the basis of the first patch, the second patch adds the support for

[PATCH 2/2] x86, mce: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-10-26 Thread Chen Yucong
rs to handle UCNA and Deferred errors. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 55 -- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index fd

[PATCH 1/2] x86, mce, severity: extend the the mce_severity mechanism to handle UCNA/DEFERRED error

2014-10-26 Thread Chen Yucong
introduces a new severity level - MCE_UCNA/DEFERRED_SEVERITY. Signed-off-by: Chen Yucong --- arch/x86/include/asm/mce.h|4 arch/x86/kernel/cpu/mcheck/mce-internal.h |2 ++ arch/x86/kernel/cpu/mcheck/mce-severity.c |6 +- arch/x86/kernel/cpu/mcheck/mce.c

[PATCH 0/2] RAS: add the support for handling UCNA/DEFERRED error

2014-10-26 Thread Chen Yucong
And on the basis of the first patch, the second patch adds the support for identifying and handling UCNA/DEFERRED error in machine_check_poll. [PATCH 1/2] x86, mce, severity: extend the the mce_severity [PATCH 2/2] x86, mce: support memory error recovery for both UCNA -- To unsubscribe from this l

Re: Fwd: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-10-22 Thread Chen Yucong
On Wed, 2014-10-22 at 10:16 +0200, Borislav Petkov wrote: > On Wed, Oct 22, 2014 at 09:51:18AM +0800, Chen Yucong wrote: > > Can you check the following link? The link contains my reply about > > "x86, MCE, AMD: Move invariant code out from loop body". The reply was >

Re: [PATCH] x86, MCE: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-10-21 Thread Chen Yucong
On Fri, 2014-10-10 at 14:03 +0800, Chen Yucong wrote: > From: Chen Yucong > > dram_ce_error() stems from Boris's patch set. Thanks! > Link: http://lkml.org/lkml/2014/7/1/545 > > Uncorrected no action required (UCNA) - is a UCR error that is not > signaled via a m

Re: Fwd: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-10-21 Thread Chen Yucong
On Tue, 2014-10-21 at 22:28 +0200, Borislav Petkov wrote: > On Thu, Oct 09, 2014 at 02:01:06PM -0500, Aravind Gopalakrishnan wrote: > > I actually agree with this approach. So no argument:) > > Ok, thanks, here's a patch. > > Btw, I'm pushing the whole queue to a ras-for-3.19 branch at > https://

[PATCH] x86, MCE: support memory error recovery for both UCNA and Deferred error in machine_check_poll

2014-10-09 Thread Chen Yucong
From: Chen Yucong dram_ce_error() stems from Boris's patch set. Thanks! Link: http://lkml.org/lkml/2014/7/1/545 Uncorrected no action required (UCNA) - is a UCR error that is not signaled via a machine check exception and, instead, is reported to system software as a corrected machine

Re: [PATCH] x86, MCE, AMD: move invariant code out from loop body

2014-10-06 Thread Chen Yucong
On Mon, 2014-10-06 at 23:27 +0200, Borislav Petkov wrote: > On Thu, Oct 02, 2014 at 11:20:12PM +0800, Chen Yucong wrote: > > From: Chen Yucong > > Subject: [PATCH] x86, MCE, AMD: move invariant code out from loop body > > > > "mce_threshold_vector = amd_thresho

[PATCH] x86, MCE, AMD: move invariant code out from loop body

2014-10-02 Thread Chen Yucong
On Thu, 2014-10-02 at 16:38 +0200, Borislav Petkov wrote: > > On Mon, Sep 22, 2014 at 09:11:00PM +0200, Borislav Petkov wrote: > > On Mon, Sep 22, 2014 at 05:23:32PM +0800, Chen Yucong wrote: > > > Hi Boris, > > > > > > I have found the following code sni

Re: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-10-02 Thread Chen Yucong
On Thu, 2014-10-02 at 15:12 +0200, Borislav Petkov wrote: > > Ok, this return is still bugging me - we're logging the error which > caused the counter overflow but we go and explicitly clear _STATUS so > that machine_check_poll doesn't pick up the same error again. > > Even though, machine_check_

Re: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-09-30 Thread Chen Yucong
16.3/arch/x86/kernel/cpu/mcheck/threshold.c 2014-09-18 01:22:16.0 +0800 +++ linux-3.16.3/arch/x86/kernel/cpu/mcheck/threshold.c 2014-10-01 08:49:06.140738192 +0800 @@ -17,6 +17,7 @@ } void (*mce_threshold_vector)(void) = default_threshold_interrupt; +EXPORT_SYMBOL_GPL(mce_threshold_vecto

Re: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-09-30 Thread Chen Yucong
On Tue, 2014-09-30 at 12:09 +0200, Borislav Petkov wrote: > On Tue, Sep 30, 2014 at 05:56:31PM +0800, Chen Yucong wrote: > > I just clear it to avoid that the mce_log() call logs the above > > threshold event again in machine_check_poll(). > > Ok, that's a good point, p

Re: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-09-30 Thread Chen Yucong
On Tue, 2014-09-30 at 09:25 +0200, Borislav Petkov wrote: > > if (high & MASK_OVERFLOW_HI) { > > rdmsrl(address, m.misc); > > rdmsrl(MSR_IA32_MCx_STATUS(bank), > m.status); > > + if (m.stat

Re: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-09-29 Thread Chen Yucong
> > mce_setup() does not gather the content of IA32_MCG_STATUS, so it > > should be read explicitly. > > > > Signed-off-by: Chen Yucong > > --- > > arch/x86/kernel/cpu/mcheck/mce_amd.c | 13 - > > 1 file changed, 12 insertions(+), 1 deletion

Re: [PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-09-28 Thread Chen Yucong
On Tue, 2014-09-23 at 16:19 +0800, Chen Yucong wrote: > machine_check_poll() will reset IA32_MCi_STATUS register to zero. > So we need to save the content of IA32_MCi_STATUS MSRs before > calling machine_check_poll() for logging threshold interrupt event. > > mce_setup() does

Re: [PATCH] x86, MCE, AMD: use macros to compute bank MSRs

2014-09-28 Thread Chen Yucong
On Tue, 2014-09-23 at 10:16 +0800, Chen Yucong wrote: > Avoid open coded calculations for bank MSRs by hiding the index > of higher bank MSRs in well-defined macros. > > No semantic changes. > > Signed-off-by: Chen Yucong > --- > arch/x86/kernel/cpu/mcheck/mce_amd.c |

Re: [PATCH] x86, MCE: support raising machine check poll for software MCE injection in IRQ context

2014-09-27 Thread Chen Yucong
On Tue, 2014-08-12 at 20:45 +0800, Chen Yucong wrote: > At present MCJ_NMI_BROADCAST(same for raise_local) supports both > raise_exception() > and raise_poll(), but MCJ_IRQ_BROADCAST only supports raise_exception(). The > goal > of this patch is that MCJ_IRQ_BROADCAST can support

[PATCH] x86, MCE, AMD: detect the threshold at the initialization period

2014-09-24 Thread Chen Yucong
period rather than a constant. On the other hand, Error Counter (ERRCT) is bits 47:32, and accordingly MASK_ERR_COUNT_HI should be 0x instead of 0x0FFF. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce_amd.c | 60 -- 1 file changed, 58

[PATCH] x86, MCE, AMD: save IA32_MCi_STATUS before machine_check_poll() resets it

2014-09-23 Thread Chen Yucong
-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce_amd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index f8c56bd..9148b4d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c

[PATCH] x86, kvm: use macros to compute bank MSRs

2014-09-22 Thread Chen Yucong
Avoid open coded calculations for bank MSRs by using well-defined macros that hide the index of higher bank MSRs. No semantic changes. Signed-off-by: Chen Yucong --- arch/x86/kvm/x86.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86

[PATCH] x86, MCE, AMD: use macros to compute bank MSRs

2014-09-22 Thread Chen Yucong
Avoid open coded calculations for bank MSRs by hiding the index of higher bank MSRs in well-defined macros. No semantic changes. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce_amd.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel

[PATCH] x86, MCE: clean up trivial coding style problem

2014-08-17 Thread Chen Yucong
ode)' This may be an insignificant patch. However, if we allow them continue to survive, then this may make someone uncomfortable. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-

[PATCH] x86, MCE: eliminate the strange combination of return and break

2014-08-16 Thread Chen Yucong
many ways I'm not feeling well. I think a small change is needed here. This patch aims to eliminate the strange combination of *return* and *break* in the above switch-statement. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c |6 +++--- 1 file changed, 3 insertions(

[PATCH] x86, MCE: support raising machine check poll for software MCE injection in IRQ context

2014-08-12 Thread Chen Yucong
At present MCJ_NMI_BROADCAST(same for raise_local) supports both raise_exception() and raise_poll(), but MCJ_IRQ_BROADCAST only supports raise_exception(). The goal of this patch is that MCJ_IRQ_BROADCAST can support raising machine check poll. Signed-off-by: Chen Yucong --- arch/x86/kernel

[PATCH] x86, MCE: panic the system after a timeout occurs

2014-08-11 Thread Chen Yucong
ystem. Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index bd9ccda..a8a1c07 100644 --- a/arch/x86/kernel/cpu/mcheck/

kill the current thread if MCG_STATUS_RIPV is not set

2014-08-10 Thread Chen Yucong
Signed-off-by: Chen Yucong --- arch/x86/kernel/cpu/mcheck/mce.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index bd9ccda..3394494 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x

[PATCH] mm: vmscan: report the number of file/anon pages respectively

2014-07-03 Thread Chen Yucong
: 1015.50 seconds Signed-off-by: Chen Yucong --- .../trace/postprocess/trace-vmscan-postprocess.pl | 53 1 file changed, 53 insertions(+) diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace

[PATCH] mm: vmscan: proportional scanning cleanup

2014-06-30 Thread Chen Yucong
): 1318.28 1486.85 Signed-off-by: Chen Yucong --- mm/vmscan.c | 84 --- 1 file changed, 57 insertions(+), 27 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a8ffe4e..ad46a7b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c

[PATCH] mm:vmscan: update the trace-vmscan-postprocess.pl for event vmscan/mm_vmscan_lru_isolate

2014-06-27 Thread Chen Yucong
mit c53919adc045b(mm: vmscan: remove lumpy reclaim), lumpy reclaim had already been removed by Mel, but the update for trace-vmscan-postprocess.pl was missed. Signed-off-by: Chen Yucong --- .../trace/postprocess/trace-vmscan-postprocess.pl| 14 ++ 1 file changed, 2 inserti

[RESEND PATCH] mm: kswapd: clean up the kswapd

2014-06-25 Thread Chen Yucong
ify. The output of `size' command: textdata bss dec hex filename 5773502 1277496 929792 7980790 79c6f6 vmlinux-3.16-rc1 5773502 1277496 929792 7980790 79c6f6 vmlinux-3.16-rc1-fix The output of checkstack.pl: 3.16-rc13.16-rc1-fix kswapd104

Re: [RESEND PATCH v2] mm/vmscan.c: wrap five parameters into writeback_stats for reducing the stack consumption

2014-06-25 Thread Chen Yucong
On Fri, 2014-06-13 at 13:58 +0800, Chen Yucong wrote: > shrink_page_list() has too many arguments that have already reached ten. > Some of those arguments and temporary variables introduces extra 80 bytes > on the stack. This patch wraps five parameters into writeback_stats and > re

Re: [PATCH] mm:kswapd: clean up the kswapd

2014-06-23 Thread Chen Yucong
On Mon, 2014-06-23 at 12:19 +0100, Mel Gorman wrote: > On Mon, Jun 23, 2014 at 01:14:54PM +0800, Chen Yucong wrote: > > According to the commit 215ddd66 (mm: vmscan: only read new_classzone_idx > > from > > pgdat when reclaiming successfully) and the commit d2e

[PATCH] mm:kswapd: clean up the kswapd

2014-06-22 Thread Chen Yucong
more clarify. Signed-off-by: Chen Yucong --- mm/vmscan.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a8ffe4e..b0a75d1 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3332,10 +3332,9 @@ static void

[PATCH] mm:vmscan:replace zone_watermark_ok with zone_balanced for determining if kswapd will call compaction

2014-06-22 Thread Chen Yucong
low_wmark_pages(zone), *classzone_idx, 0)) pgdat_needs_compaction = false; zone_watermark_ok() should be replaced by zone_balanced() in the above snippet. That's because zone_balanced() is more suitable for the context. Signed-off-by: Chen Yucong --- mm/vmscan.

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Chen Yucong
On Wed, 2014-06-18 at 15:27 -0700, Andrew Morton wrote: > On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong wrote: > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index a8ffe4e..2c35e34 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -2087,8 +2086,8

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Chen Yucong
On Wed, 2014-06-18 at 11:00 +0200, Jerome Marchand wrote: > > if (!nr_file || !nr_anon) > > break; > > > > - if (nr_file > nr_anon) { > > - unsigned long scan_target = > targets[LRU_INACTIVE_ANON] + > > > -

[PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-16 Thread Chen Yucong
s rebelled against our design idea. Signed-off-by: Chen Yucong --- mm/vmscan.c | 39 ++- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a8ffe4e..2c35e34 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2057,8

Re: [PATCH] mm/vmscan.c: avoid recording the original scan targets in shrink_lruvec()

2014-06-16 Thread Chen Yucong
On Mon, 2014-06-16 at 16:42 -0700, Andrew Morton wrote: > On Mon, 16 Jun 2014 20:57:54 +0800 Chen Yucong wrote: > > > On Mon, 2014-06-09 at 21:27 +0800, Chen Yucong wrote: > > > Via https://lkml.org/lkml/2013/4/10/334 , we can find that recording the > > > original

Re: [PATCH] mm/vmscan.c: avoid recording the original scan targets in shrink_lruvec()

2014-06-16 Thread Chen Yucong
On Mon, 2014-06-09 at 21:27 +0800, Chen Yucong wrote: > Via https://lkml.org/lkml/2013/4/10/334 , we can find that recording the > original scan targets introduces extra 40 bytes on the stack. This patch > is able to avoid this situation and the call to memcpy(). At the same time, >

Re: [PATCH] mm/vmscan.c: avoid recording the original scan targets in shrink_lruvec()

2014-06-15 Thread Chen Yucong
On Sun, 2014-06-15 at 17:47 -0700, Hugh Dickins wrote: > On Wed, 11 Jun 2014, Chen Yucong wrote: > > On Tue, 2014-06-10 at 16:33 -0700, Andrew Morton wrote: > > > > break; > > > > > > > > if (nr_file > nr_ano

Re: [PATCH v2] mm/vmscan.c: wrap five parameters into shrink_result for reducing the stack consumption

2014-06-13 Thread Chen Yucong
On Fri, 2014-06-13 at 12:28 -0400, Johannes Weiner wrote: > On Fri, Jun 13, 2014 at 01:21:15PM +0800, Chen Yucong wrote: > > On Thu, 2014-06-12 at 21:40 -0700, Andrew Morton wrote: > > > On Fri, 13 Jun 2014 12:36:31 +0800 Chen Yucong wrote: > > > > > > &

[RESEND PATCH v2] mm/vmscan.c: wrap five parameters into shrink_result for reducing the stack consumption

2014-06-13 Thread Chen Yucong
12/159 * Rename arg_container to shrink_result * Change the the way of initializing shrink_result object. Signed-off-by: Chen Yucong --- mm/vmscan.c | 62 ++- 1 file changed, 27 insertions(+), 35 deletions(-) diff --git a/mm/vm

Re: [RESEND PATCH v2] mm/vmscan.c: wrap five parameters into writeback_stats for reducing the stack consumption

2014-06-13 Thread Chen Yucong
Hi all, On Fri, 2014-06-13 at 13:58 +0800, Chen Yucong wrote: > shrink_page_list() has too many arguments that have already reached ten. > Some of those arguments and temporary variables introduces extra 80 bytes > on the stack. This patch wraps five parameters into writeback_stats and

[RESEND PATCH v2] mm/vmscan.c: wrap five parameters into writeback_stats for reducing the stack consumption

2014-06-12 Thread Chen Yucong
2014/6/12/159 * Rename arg_container to writeback_stats * Change the the way of initializing writeback_stats object. Signed-off-by: Chen Yucong --- mm/vmscan.c | 62 ++- 1 file changed, 27 insertions(+), 35 deletions(-) diff --gi

Re: [PATCH v2] mm/vmscan.c: wrap five parameters into shrink_result for reducing the stack consumption

2014-06-12 Thread Chen Yucong
On Thu, 2014-06-12 at 21:40 -0700, Andrew Morton wrote: > On Fri, 13 Jun 2014 12:36:31 +0800 Chen Yucong wrote: > > > @@ -1148,7 +1146,8 @@ unsigned long reclaim_clean_pages_from_list(struct > > zone *zone, > > .priority = DEF_PRIORITY, > &

[PATCH v2] mm/vmscan.c: wrap five parameters into shrink_result for reducing the stack consumption

2014-06-12 Thread Chen Yucong
nce v1: https://lkml.org/lkml/2014/6/12/159 * Rename arg_container to shrink_result * Change the the way of initializing shrink_result object. Signed-off-by: Chen Yucong --- mm/vmscan.c | 62 ++- 1 file changed, 27 insertions(

Re: [PATCH] mm/vmscan.c: wrap five parameters into arg_container in shrink_page_list()

2014-06-12 Thread Chen Yucong
On Thu, 2014-06-12 at 08:45 -0400, Rik van Riel wrote: > > shrink_page_list() has too many arguments that have already reached > ten. > > Some of those arguments and temporary variables introduces extra 80 > bytes > > on the stack. > > > > This patch wraps five parameters into arg_container and re

[PATCH] mm/vmscan.c: wrap five parameters into arg_container in shrink_page_list()

2014-06-12 Thread Chen Yucong
: Chen Yucong --- mm/vmscan.c | 64 +++ 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a8ffe4e..538cdcf 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -790,6 +790,14 @@ static void

Re: [PATCH] mm/vmscan.c: avoid recording the original scan targets in shrink_lruvec()

2014-06-10 Thread Chen Yucong
On Tue, 2014-06-10 at 16:33 -0700, Andrew Morton wrote: > > break; > > > > if (nr_file > nr_anon) { > > - unsigned long scan_target = > targets[LRU_INACTIVE_ANON] + > > > - targets[LRU_ACTIVE_ANON]

Re: [PATCH] mm/vmscan.c: avoid recording the original scan targets in shrink_lruvec()

2014-06-10 Thread Chen Yucong
On Tue, 2014-06-10 at 16:33 -0700, Andrew Morton wrote: > On Mon, 9 Jun 2014 21:27:16 +0800 Chen Yucong wrote: > > > Via https://lkml.org/lkml/2013/4/10/334 , we can find that recording the > > original scan targets introduces extra 40 bytes on the stack. This patch > &g

Re: [PATCH] mm/vmscan.c: avoid recording the original scan targets in shrink_lruvec()

2014-06-09 Thread Chen Yucong
On Tue, 2014-06-10 at 08:24 +0900, Minchan Kim wrote: > Hello, > > On Mon, Jun 09, 2014 at 09:27:16PM +0800, Chen Yucong wrote: > > Via https://lkml.org/lkml/2013/4/10/334 , we can find that recording the > > original scan targets introduces extra 40 bytes on the stack. This

[PATCH] mm/vmscan.c: avoid recording the original scan targets in shrink_lruvec()

2014-06-09 Thread Chen Yucong
/ original_nr_anon; If (nr_file > nr_anon), then ratio = (nr_file - x) / nr_anon. x = nr_file - ratio * nr_anon; if (nr_file <= nr_anon), then ratio = nr_file / (nr_anon - x). x = nr_anon - nr_file / ratio; Signed-off-by: Chen Yucong --- mm/vmscan.c | 28 +---

[PATCH] swap: Delete the "last_in_cluster < scan_base" loop in the body of scan_swap_map()

2014-06-02 Thread Chen Yucong
ome a dead code snippet, and it should have been deleted. This patch is to delete the redundant loop as Hugh and Shaohua suggested. Signed-off-by: Chen Yucong --- mm/swapfile.c | 20 1 file changed, 20 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index

Re: [RFC PATCH 0/3] RAS: Correctable Errors Collector thing

2014-05-27 Thread Chen Yucong
> From: Borislav Petkov > > Hi all, > > this is something Tony and I have been working on behind the curtains > recently. Here it is in a RFC form, it passes quick testing in kvm. Let > me send it out before I start hammering on it on a real machine. > > More indepth info about what it is and

[PATCH] swap: Avoid scanning invalidated region for cheap seek

2014-05-25 Thread Chen Yucong
For cheap seek, when we scan the region between si->lowset_bit and scan_base, if san_base is greater than si->highest_bit, the scan operation between si->highest_bit and scan_base is not unnecessary. This patch can be used to avoid scanning invalidated region for cheap seek. Signed-off

[PATCH] x86/mce: Fix incorrect comment in do_machine_check()

2014-05-23 Thread Chen Yucong
mce_clear_state function will not clear *final. It is just used to clear bank MSRs or the relative field of injectm used by MCE-Injection. Meanwhile, mce_reign executed by monarch CPU will clear *final, therefore we need to save it locally for use later. Signed-off-by: Chen Yucong --- arch/x86/kernel

Re: [PATCH v2] x86/mce: Distirbute the clear operation of mces_seen to Per-CPU rather than only monarch CPU

2014-05-23 Thread Chen Yucong
On Fri, 2014-05-23 at 11:10 +0200, Borislav Petkov wrote: > On Fri, May 23, 2014 at 09:32:19AM +0800, Chen Yucong wrote: > > ...if we reach a timeout, there is very little > > chance for recovering. Thought. the probability for this situation to > > happen is very slight

Re: [PATCH v2] x86/mce: Distirbute the clear operation of mces_seen to Per-CPU rather than only monarch CPU

2014-05-22 Thread Chen Yucong
On Wed, 2014-05-21 at 21:09 +, Luck, Tony wrote: > Please do give us more detail on the scenario that you see that would > make your new version behave better. > > I'm sure the current code has no races w.r.t. clearing mces_seen. The > monarch clears them all in mce_reign() before clearing mc

Re: [PATCH v2] x86/mce: Distirbute the clear operation of mces_seen to Per-CPU rather than only monarch CPU

2014-05-20 Thread Chen Yucong
On Wed, 2014-05-21 at 11:43 +0900, Hidetoshi Seto wrote: > (2014/05/21 11:03), Chen Yucong wrote: > > On Wed, 2014-05-21 at 10:40 +0900, Hidetoshi Seto wrote: > >> (2014/05/20 11:11), Chen Yucong wrote: > >>> mces_seen is a Per-CPU variable which should only be

Re: [PATCH v2] x86/mce: Distirbute the clear operation of mces_seen to Per-CPU rather than only monarch CPU

2014-05-20 Thread Chen Yucong
On Wed, 2014-05-21 at 10:40 +0900, Hidetoshi Seto wrote: > (2014/05/20 11:11), Chen Yucong wrote: > > mces_seen is a Per-CPU variable which should only be accessed by Per-CPU as > > possible. So the > > clear operation of mces_seen should also be lcoal to Per-CPU rather

Re: [PATCH v2] x86/mce: Distirbute the clear operation of mces_seen to Per-CPU rather than only monarch CPU

2014-05-20 Thread Chen Yucong
On Tue, 2014-05-20 at 19:33 +0200, Borislav Petkov wrote: > On Tue, May 20, 2014 at 10:11:25AM +0800, Chen Yucong wrote: > > mces_seen is a Per-CPU variable which should only be accessed by > > Per-CPU as possible. So the clear operation of mces_seen should also > > be lcoal t

  1   2   >