Re: [PATCH] s390/kexec: Consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres()

2016-04-06 Thread Xunlei Pang
On 2016/03/31 at 11:52, Xunlei Pang wrote: > Hi Bao, > > On 2016/03/31 at 10:52, Baoquan He wrote: >> On 03/31/16 at 10:43am, Minfei Huang wrote: >>> On 03/30/16 at 08:30pm, Baoquan He wrote: >>>> Hi Xunlei, >>>> >>>> I have two

[PATCH v2 2/2] rtmutex: Kill pi_waiters_leftmost from task_struct

2016-04-06 Thread Xunlei Pang
. We don't remove rt_mutex:pi_waiters_leftmost, as it is quite possible for many tasks sharing one rtmutex. Thus, hereby remove pi_waiters_leftmost from task_struct. Signed-off-by: Xunlei Pang --- include/linux/init_task.h | 1 - include/linux/sched.h | 1 - kernel/fork.c

[PATCH v2 1/2] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-06 Thread Xunlei Pang
with several tweaks and improvements by me. Tested-by: Xunlei Pang Originally-From: Peter Zijlstra (Intel) Signed-off-by: Xunlei Pang --- Without the patch, kernel crashes in seconds, after the patch it can survive overnight. include/linux/init_task.h | 3 +- include/linux/sched.h | 1 +

[PATCH] rtmutex: Consider deadline tasks in try_to_take_rt_mutex()

2016-04-06 Thread Xunlei Pang
rio, so above logic will always return 0, this is wrong. To solve this, we added extra deadline comparing, and let the task with smaller deadline win, or the top waiter win if equal. Signed-off-by: Xunlei Pang --- kernel/locking/rtmutex.c | 19 --- 1 file changed, 16 insertions(+), 3

Re: [PATCH] sched/deadline: No need to check NULL later_mask

2016-04-06 Thread Xunlei Pang
On 2016/04/06 at 17:30, Peter Zijlstra wrote: > On Sat, Apr 02, 2016 at 06:14:28PM +0800, Xunlei Pang wrote: >> Your proposal is very nice! >> >> At the sched_init() stage we only have one (to be "idle") task and with irq >> disabled, >> no schedu

Re: [PATCH v2 1/2] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-08 Thread Xunlei Pang
On 2016/04/07 at 02:14, Peter Zijlstra wrote: > On Wed, Apr 06, 2016 at 08:59:15PM +0800, Xunlei Pang wrote: >> A crash happened while I'm playing with deadline PI rtmutex. >> >> BUG: unable to handle kernel NULL pointer dereference at 0018 >> IP: []

[PATCH] s390/kexec: Consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres()

2016-03-30 Thread Xunlei Pang
/0xd0) ([<0063067c>] system_call+0x244/0x264) Cc: Michael Holzheu Signed-off-by: Xunlei Pang --- Tested kexec/kdump on S390x arch/s390/kernel/machine_kexec.c | 86 ++-- arch/s390/kernel/setup.c | 7 ++-- include/linux/kexec.h

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-21 Thread Xunlei Pang
On 2016/07/21 at 22:46, Juri Lelli wrote: > On 21/07/16 15:36, Juri Lelli wrote: >> On 21/07/16 15:21, Juri Lelli wrote: >>> Hi, >>> >>> On 18/07/16 21:37, Xunlei Pang wrote: >>>> On 2016/07/18 at 21:04, Juri Lelli wrote: >>>>> On 1

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-15 Thread Xunlei Pang
hile we are at it we also optimize things further calling setup_new_dl_ > entity only for already queued tasks, since (as pointed out by Xunlei) > we already do the very same update at tasks wakeup time anyway. > > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Steven Rostedt &g

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-18 Thread Xunlei Pang
On 2016/07/18 at 21:04, Juri Lelli wrote: > On 15/07/16 18:39, Xunlei Pang wrote: >> On 2016/07/13 at 18:58, Juri Lelli wrote: > [...] > >> Since this is only called for queued cases now, there is no need to >> check boosted stuff here. As enqueue_task(ENQUEUE_REP

Re: [PATCH 3/3] x86/apic: Improved the setting of interrupt mode for bsp

2016-07-25 Thread Xunlei Pang
On 2016/07/25 at 11:04, Wei, Jiangang wrote: > Hi He, > > Thanks for your response firstly. > > On Fri, 2016-07-22 at 18:40 +0800, Baoquan He wrote: >> Hi Jiangang, >> >> This is very nice, should be the stuff Eric and Ingo would like to see. >> But I have several questions: >> >> 1) Are you not

Re: [PATCH v5] sched/deadline: remove useless param from setup_new_dl_entity

2016-08-05 Thread Xunlei Pang
sks wakeup time anyway. By doing > so, we don't need to worry about a potential PI donor anymore, as rt_ > mutex_setprio() takes care of that already for us. > > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Steven Rostedt > Cc: Luca Abeni > Cc: Xunlei Pang > Signed-off

[PATCH v2 2/2] kexec: Consider crashk_low_res in sanity_check_segment_list()

2016-08-16 Thread Xunlei Pang
fail it as a memory violation in these cases. Thus, we add the case to regard the segment as valid if it is within crashk_low_res. Signed-off-by: Xunlei Pang --- kernel/kexec_core.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/kexec_core.c b/kernel/kexec_

[PATCH v2 1/2] kexec: Introduce "/sys/kernel/kexec_crash_low_size"

2016-08-16 Thread Xunlei Pang
corresponding sysfs file "/sys/kernel/kexec_crash_low_size" for crashk_low_res. So, the exact total reserved memory is the sum of the two. crashk_low_res can also be shrunk via this new interface, and users should be aware of what they are doing. Suggested-by: Dave Young Signed-off-by:

Re: [PATCH v2 2/2] kexec: Consider crashk_low_res in sanity_check_segment_list()

2016-08-17 Thread Xunlei Pang
On 2016/08/17 at 15:24, Dave Young wrote: > Hi, Xunlei, > > On 08/17/16 at 09:50am, Xunlei Pang wrote: >> We have crashk_res only in most cases, but sometimes we have >> crashk_low_res. >> >> For example, on 64-bit x86 systems, when "crashkernel=32M,high&q

Re: [PATCH v7 2/2] Documentation: kdump: add description of enable multi-cpus support

2016-08-17 Thread Xunlei Pang
On 2016/08/18 at 09:50, Zhou Wenjian wrote: > multi-cpu support is useful to improve the performance of kdump in > some cases. So add the description of enable multi-cpu support in > dump-capture kernel. > > Signed-off-by: Zhou Wenjian > Acked-by: Baoquan He > --- >

[PATCH] fib_trie: Fix the description of pos and bits

2016-08-17 Thread Xunlei Pang
1) Fix one typo: s/tn/tp/ 2) Fix the description about the "u" bits. Signed-off-by: Xunlei Pang --- net/ipv4/fib_trie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index d07fc07..eb7c5d1 100644 --- a/net/ipv4/fib_tr

Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path

2016-03-22 Thread Xunlei Pang
On 2016/03/23 at 10:48, Baoquan He wrote: > On 03/01/16 at 05:53pm, Xunlei Pang wrote: >> This is a bug fix. >> >> After this, I will try to do a cleanup for crash_unmap/map_reserved_pages() >> (only used by S390) to consolidate it with >> arch_kexec_unprotect

Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path

2016-03-23 Thread Xunlei Pang
On 2016/03/23 at 16:23, Baoquan He wrote: > On 03/23/16 at 11:32am, Xunlei Pang wrote: >> On 2016/03/23 at 10:48, Baoquan He wrote: >>> On 03/01/16 at 05:53pm, Xunlei Pang wrote: >>>> This is a bug fix. >>>> >>>> After this, I will

Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path

2016-03-24 Thread Xunlei Pang
On 2016/03/23 at 20:32, Baoquan He wrote: > On 03/23/16 at 05:59pm, Xunlei Pang wrote: >> On 2016/03/23 at 16:23, Baoquan He wrote: >>> On 03/23/16 at 11:32am, Xunlei Pang wrote: >>>> On 2016/03/23 at 10:48, Baoquan He wrote: >>>>> On 03/01/16 at 05:

[PATCH] kexec: Account crashk_low_res to kexec_crash_size

2016-08-13 Thread Xunlei Pang
ays should stay consistent. Note that write to "/sys/kernel/kexec_crash_size" is to shrink the reserved memory, and we want to shrink crashk_res only. So we add some additional check in crash_shrink_memory() since crashk_low_res now is involved. Signed-off-by: Xunlei Pang --- kernel/

Re: [PATCH] kexec: Account crashk_low_res to kexec_crash_size

2016-08-15 Thread Xunlei Pang
On 2016/08/15 at 15:17, Dave Young wrote: > Hi Xunlei, > > On 08/13/16 at 04:26pm, Xunlei Pang wrote: >> "/sys/kernel/kexec_crash_size" only includes crashk_res, it >> is fine in most cases, but sometimes we have crashk_low_res. >> For example, when

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-12 Thread Xunlei Pang
On 2016/07/13 at 09:50, Wanpeng Li wrote: > 2016-07-13 1:25 GMT+08:00 : >> Konstantin Khlebnikov writes: >> >>> On 11.07.2016 15:12, Xunlei Pang wrote: >>>> On 2016/07/11 at 17:54, Wanpeng Li wrote: >>>>> Hi Konstantin, Xunlei, >>>>

[PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle()

2016-07-09 Thread Xunlei Pang
Should update "cfs_rq->throttled_clock_task" other than pcfs_rq's. Signed-off-by: Xunlei Pang --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4088eed..039de34 100644 --- a/kernel/sched

Re: [PATCH v3] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-10 Thread Xunlei Pang
On 2016/07/08 at 19:28, Juri Lelli wrote: > setup_new_dl_entity() takes two parameters, but it only actually uses > one of them, under a different name, to setup a new dl_entity, after: > > 2f9f3fdc928 "sched/deadline: Remove dl_new from struct sched_dl_entity" > > as we currently do > >

Re: [PATCH v3] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 16:01, luca abeni wrote: > Hello, > > On Mon, 11 Jul 2016 13:03:56 +0800 > Xunlei Pang wrote: > >> On 2016/07/08 at 19:28, Juri Lelli wrote: > [...] >>> @@ -363,6 +364,15 @@ static inline void setup_new_dl_entity(struct &

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 15:25, Wanpeng Li wrote: > 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov : >> Hierarchy could be already throttled at this point. Throttled next >> buddy could trigger null pointer dereference in pick_next_task_fair(). > There is cfs_rq->next check in pick_next_entity(), so how

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 16:22, Xunlei Pang wrote: > On 2016/07/11 at 15:25, Wanpeng Li wrote: >> 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov : >>> Hierarchy could be already throttled at this point. Throttled next >>> buddy could trigger null pointer derefer

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 17:54, Wanpeng Li wrote: > Hi Konstantin, Xunlei, > 2016-07-11 16:42 GMT+08:00 Xunlei Pang : >> On 2016/07/11 at 16:22, Xunlei Pang wrote: >>> On 2016/07/11 at 15:25, Wanpeng Li wrote: >>>> 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov >&g

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-11 Thread Xunlei Pang
On 2016/07/05 at 19:33, Hidehiro Kawai wrote: > This patch fixes one of the problems reported by Daniel Walker > (https://lkml.org/lkml/2015/6/24/44). > > If crash_kexec_post_notifiers boot option is specified, other CPUs > are stopped by smp_send_stop() instead of machine_crash_shutdown() > in

Re: [PATCH v2] kexec: Fix kdump failure with notsc

2016-07-12 Thread Xunlei Pang
On 2016/07/07 at 18:17, Wei Jiangang wrote: > If we specify the 'notsc' boot parameter for the dump-capture kernel, > and then trigger a crash(panic) by using "ALT-SysRq-c" or "echo c > > /proc/sysrq-trigger", > the dump-capture kernel will hang in calibrate_delay_converge(): > > /* wait for

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-12 Thread Xunlei Pang
On 2016/07/12 at 11:56, 河合英宏 / KAWAI,HIDEHIRO wrote: > Hi Xunlei, > > Thanks for the review. > >> From: Xunlei Pang [mailto:xp...@redhat.com] >> Sent: Tuesday, July 12, 2016 12:12 PM >> On 2016/07/05 at 19:33, Hidehiro Kawai wrote: >>> This patch fixes one of

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-12 Thread Xunlei Pang
On 2016/07/12 at 15:12, 河合英宏 / KAWAI,HIDEHIRO wrote: >> From: linux-kernel-ow...@vger.kernel.org >> [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Xunlei Pang >> Sent: Tuesday, July 12, 2016 3:57 PM >> On 2016/07/12 at 11:56, 河合英宏 / KAWAI,HIDEHIRO wrote: >&

Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path

2016-03-01 Thread Xunlei Pang
This is a bug fix. After this, I will try to do a cleanup for crash_unmap/map_reserved_pages() (only used by S390) to consolidate it with arch_kexec_unprotect/protect_crashkres(). Regards, Xunlei On 03/01/2016 at 04:02 PM, Minfei Huang wrote: > v1: > - Bisect the patch according to Andrew

Re: [PATCH V2] proc-vmcore: wrong data type casting fix

2016-03-12 Thread Xunlei Pang
On 2016/03/12 at 12:49, Dave Young wrote: > Hi, Andrew > > On 03/11/16 at 12:27pm, Andrew Morton wrote: >> On Fri, 11 Mar 2016 16:42:48 +0800 Dave Young wrote: >> >>> On i686 PAE enabled machine the contiguous physical area could be large >>> and it can cause trimming down variables in below

Re: [PATCH V2] proc-vmcore: wrong data type casting fix

2016-03-12 Thread Xunlei Pang
On 2016/03/12 at 21:59, Baoquan He wrote: > On 03/12/16 at 08:43pm, Xunlei Pang wrote: >> On 2016/03/12 at 12:49, Dave Young wrote: >>> Hi, Andrew >>> >>> On 03/11/16 at 12:27pm, Andrew Morton wrote: >>>> On Fri, 11 Mar 2016 16:42:48 +0800 Dave Youn

Re: [PATCH] kexec: unmap reserved pages for each error-return way

2016-01-27 Thread Xunlei Pang
On 2016/01/27 at 19:48, Dmitry Safonov wrote: > For allocation of kimage failure or kexec_prepare or load segments > errors there is no need to keep crashkernel memory mapped. > It will affect only s390 as map/unmap hook defined only for it. > As on unmap s390 also changes os_info structure let's

Re: [PATCH] kexec: unmap reserved pages for each error-return way

2016-01-28 Thread Xunlei Pang
On 2016/01/28 at 18:32, Michael Holzheu wrote: > On Wed, 27 Jan 2016 11:15:46 -0800 > Andrew Morton wrote: > >> On Wed, 27 Jan 2016 14:48:31 +0300 Dmitry Safonov >> wrote: >> >>> For allocation of kimage failure or kexec_prepare or load segments >>> errors there is no need to keep crashkernel

Re: [PATCH] kexec: unmap reserved pages for each error-return way

2016-01-28 Thread Xunlei Pang
On 2016/01/28 at 20:44, Michael Holzheu wrote: > On Thu, 28 Jan 2016 19:56:56 +0800 > Xunlei Pang wrote: > >> On 2016/01/28 at 18:32, Michael Holzheu wrote: >>> On Wed, 27 Jan 2016 11:15:46 -0800 >>> Andrew Morton wrote: >>> >>>> On Wed,

Re: [PATCH] kexec: unmap reserved pages for each error-return way

2016-01-28 Thread Xunlei Pang
On 2016/01/28 at 17:02, Dmitry Safonov wrote: > On 01/28/2016 05:58 AM, Xunlei Pang wrote: >> Hi Dmitry, >> >> On 2016/01/28 at 03:15, Andrew Morton wrote: >>> On Wed, 27 Jan 2016 14:48:31 +0300 Dmitry Safonov >>> wrote: >>> >>>&g

[PATCH] iommu/vt-d: Assign old irt entries a common valid vector in kdump kernel

2016-03-02 Thread Xunlei Pang
he old irt entries to use a special allocated vector and related irq handler. Signed-off-by: Xunlei Pang --- drivers/iommu/intel_irq_remapping.c | 78 - 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/dri

Re: [PATCH] iommu/vt-d: Assign old irt entries a common valid vector in kdump kernel

2016-03-02 Thread Xunlei Pang
On 03/02/2016 at 10:58 PM, Joerg Roedel wrote: > On Wed, Mar 02, 2016 at 06:02:28PM +0800, Xunlei Pang wrote: >> Currently, the kernel copies the old irt entries during iommu >> initialization for kdump, so old vectors in the first kernel are >> used but having no related ke

Re: [PATCH] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-05-30 Thread Xunlei Pang
Ping On 2016/05/12 at 11:36, Xunlei Pang wrote: > On 2016/05/11 at 14:49, Peter Zijlstra wrote: >> On Tue, May 10, 2016 at 11:19:44AM -0700, bseg...@google.com wrote: >>> Xunlei Pang writes: >>> >>>> Two minor fixes for cfs_rq_clock_task(). >>>>

Re: [PATCH v4 2/2] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-05-30 Thread Xunlei Pang
Ping Could someone have some comments on this bug? On 2016/04/26 at 16:30, Xunlei Pang wrote: > A crash happened while I was playing with deadline PI rtmutex. > > BUG: unable to handle kernel NULL pointer dereference at 0018 > IP: [] rt_mutex_get_top_task+0x1f/0x

Re: [RFC][PATCH 2/8] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-06-14 Thread Xunlei Pang
On 2016/06/14 at 18:21, Juri Lelli wrote: > Hi, > > On 07/06/16 21:56, Peter Zijlstra wrote: >> From: Xunlei Pang >> >> A crash happened while I was playing with deadline PI rtmutex. >> >> BUG: unable to handle kernel NULL pointer de

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-12 Thread Xunlei Pang
On 2016/04/12 at 23:51, Peter Zijlstra wrote: > On Tue, Apr 12, 2016 at 11:08:04AM +0800, Xunlei Pang wrote: >> I spotted another issue, we access pi_task without any lock in >> enqueue_task_dl(), > OK, so I'm on the road and entirely jetlagged, but how can > enqueue_task_d

[PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h"

2016-04-14 Thread Xunlei Pang
Rtmutex code will need dl_policy(), so make it visible to rtmutex. Signed-off-by: Xunlei Pang --- include/linux/sched.h | 5 + kernel/sched/sched.h | 4 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 332a6b5..8ad3522

[PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-14 Thread Xunlei Pang
ve the old rt_mutex_adjust_prio() outside the lock. Since we moved the deboost point, in order to avoid current process to be preempted(due to deboost earlier) before finishing wake_up_q(), we also move preempt_disable() before unlocking rtmutex. Originally-From: Peter Zijlstra Signed-off-by: X

[PATCH v3 6/6] sched/deadline/rtmutex: Don't miss the dl_runtime/dl_period update

2016-04-14 Thread Xunlei Pang
ntime, dl_period) or boosted waiter changes to !deadline class. Thus, force deadline task not out by adding the !dl_prio() condition. Signed-off-by: Xunlei Pang --- kernel/locking/rtmutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/rtmutex.c b/kernel/locking

[PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter

2016-04-14 Thread Xunlei Pang
We should deboost before waking the high-prio task such that we don't run two tasks with the 'same' priority. The patch fixed the logic, and introduced rt_mutex_postunlock() to do some code refactor. Suggested-by: Peter Zijlstra Signed-off-by: Xunlei Pang --- kernel/futex.c

[PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-14 Thread Xunlei Pang
l() which held rq lock. Note that, now we return a rt_mutex_waiter to enqueue_task_dl(), we add a new "struct sched_dl_entity_fake" to fake as a real sched_dl_entity, this is ok as long as we keep the "dl_runtime" and "dl_period" in it the same order as that in sch

[PATCH v3 3/6] rtmutex: Move "rt_mutex_waiter" definition to "include/linux/rtmutex.h"

2016-04-14 Thread Xunlei Pang
Deadline code will need it, so make it visible to deadline. Signed-off-by: Xunlei Pang --- include/linux/rtmutex.h | 22 +- kernel/locking/rtmutex_common.h | 21 - 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/include/linux

[PATCH v3 0/6] sched/deadline/rtmutex: Fix two deadline PI issues

2016-04-14 Thread Xunlei Pang
ata (dl.dl_runtime and dl.dl_period), because the access is not holding any lock(pi lock or rq lock) of pi_task's. PATCH 3~4 are separated out to make PATCH 5 smaller and easier to reviewers. The two issues can be fixed using the same logic, so bind them together as one series. Xunlei Pang (6): rtmu

[PATCH] sched/deadline: Fix a bug in dl_overflow()

2016-04-14 Thread Xunlei Pang
not a deadline task. dl_overflow() simply returns success without updating the right data, and got the wrong dl_bw->total_bw. The solution is simple, if @p is not deadline, don't return. Signed-off-by: Xunlei Pang --- kernel/sched/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

Re: [PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-21 Thread Xunlei Pang
Hi Peter, On 2016/04/20 at 21:49, Xunlei Pang wrote: > On 2016/04/20 at 21:19, Peter Zijlstra wrote: >> On Thu, Apr 14, 2016 at 07:37:03PM +0800, Xunlei Pang wrote: >>> + /* Updated under pi_lock and rtmutex lock */ >>> struct rb_node *pi_waiters_leftm

[PATCH] workqueue: Free useless memory when disabling NUMA in wq_numa_init()

2015-09-16 Thread Xunlei Pang
From: Xunlei Pang wq_update_unbound_numa_attrs_buf and tbl will never be used in case of invalid NUMA node mapping, so just free them. Signed-off-by: Xunlei Pang --- kernel/workqueue.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index

[PATCH] kexec: Move some memembers and definitions within the scope of CONFIG_KEXEC_FILE

2015-12-20 Thread Xunlei Pang
Move the stuff currently only used by the kexec file code within CONFIG_KEXEC_FILE (and CONFIG_KEXEC_VERIFY_SIG). Also move internal "struct kexec_sha_region" and "struct kexec_buf" into "kexec_internal.h". Signed-off-by: Xunlei Pang --- arch/x86/kernel/machi

Re: [PATCH 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2015-12-27 Thread Xunlei Pang
On 12/24/2015 at 02:44 PM, Xunlei Pang wrote: > On 12/24/2015 at 02:16 PM, Dave Young wrote: >> Hi, Xunlei >> >> On 12/24/15 at 02:05pm, Xunlei Pang wrote: >>> On 12/24/2015 at 01:54 PM, Dave Young wrote: >>>> Ccing Vivek >>>> >>&

Re: [PATCH 2/2] kexec: Provide arch_kexec_protect(unprotect)_crashkres()

2015-12-29 Thread Xunlei Pang
On 12/28/2015 at 08:14 PM, Minfei Huang wrote: > On 12/28/15 at 02:32pm, Xunlei Pang wrote: >> On 12/24/2015 at 02:44 PM, Xunlei Pang wrote: >>>>>>> +static void kexec_mark_crashkres(bool protect) >>>>>>> +{ >>>>>>> +

Re: [PATCH 0/4] mm/page_reporting: Some knobs and fixes

2021-04-01 Thread Xunlei Pang
On 3/26/21 5:44 PM, Xunlei Pang wrote: > Add the following knobs in PATCH 1~3: > /sys/kernel/mm/page_reporting/reported_kbytes > /sys/kernel/mm/page_reporting/refault_kbytes > /sys/kernel/mm/page_reporting/reporting_factor > > Fix unexpected user OOM in PATCH 4. > >

Re: [PATCH 2/4] mm/page_reporting: Introduce free page reporting factor

2021-04-06 Thread Xunlei Pang
On 4/3/21 2:56 AM, Alexander Duyck wrote: > On Fri, Mar 26, 2021 at 2:45 AM Xunlei Pang wrote: >> >> Add new "/sys/kernel/mm/page_reporting/reporting_factor" >> within [0, 100], and stop page reporting when it reaches >> the configured threshold. Defaul

[PATCH 0/4] mm/page_reporting: Some knobs and fixes

2021-03-26 Thread Xunlei Pang
Add the following knobs in PATCH 1~3: /sys/kernel/mm/page_reporting/reported_kbytes /sys/kernel/mm/page_reporting/refault_kbytes /sys/kernel/mm/page_reporting/reporting_factor Fix unexpected user OOM in PATCH 4. Xunlei Pang (4): mm/page_reporting: Introduce free page reported counters mm

[PATCH 2/4] mm/page_reporting: Introduce free page reporting factor

2021-03-26 Thread Xunlei Pang
it is also useful for testing, gray-release, etc. Signed-off-by: Xunlei Pang --- mm/page_reporting.c | 60 - 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/mm/page_reporting.c b/mm/page_reporting.c index ba195ea..86c6479 10064

[PATCH 1/4] mm/page_reporting: Introduce free page reported counters

2021-03-26 Thread Xunlei Pang
memory has refaulted in after been reported out. Signed-off-by: Xunlei Pang --- include/linux/mmzone.h | 3 ++ mm/page_alloc.c| 4 +- mm/page_reporting.c| 112 +++-- mm/page_reporting.h| 5 +++ 4 files changed, 119 insertions(+),

[PATCH 3/4] mm/page_reporting: Introduce "page_reporting_factor=" boot parameter

2021-03-26 Thread Xunlei Pang
Thus it's reasonable to turn the page reporting off by default and enable it at runtime as needed. Signed-off-by: Xunlei Pang --- Documentation/admin-guide/kernel-parameters.txt | 3 +++ mm/page_reporting.c | 13 + 2 files changed, 16 insertions(+) diff -

[PATCH 4/4] mm/page_reporting: Fix possible user allocation failure

2021-03-26 Thread Xunlei Pang
: 32 order-10: 16 Reported-by: Helin Guo Tested-by: Helin Guo Signed-off-by: Xunlei Pang --- mm/page_reporting.c | 89 +++-- 1 file changed, 72 insertions(+), 17 deletions(-) diff --git a/mm/page_reporting.c b/mm/page_reporting.c index

Re: [PATCH 4/4] mm/page_reporting: Fix possible user allocation failure

2021-04-06 Thread Xunlei Pang
On 4/3/21 3:55 AM, Alexander Duyck wrote: > On Fri, Mar 26, 2021 at 2:45 AM Xunlei Pang wrote: >> >> We encountered user memory allocation failure(OOM) on our >> 512MiB tiny instances, it didn't happen after turning off >> the page reporting. >> >> After so

Re: [PATCH v3 0/4] mm/slub: Fix count_partial() problem

2021-03-16 Thread Xunlei Pang
On 3/16/21 2:49 AM, Vlastimil Babka wrote: > On 3/9/21 4:25 PM, Xunlei Pang wrote: >> count_partial() can hold n->list_lock spinlock for quite long, which >> makes much trouble to the system. This series eliminate this problem. > > Before I check the details, I have

Re: [PATCH v3 0/4] mm/slub: Fix count_partial() problem

2021-03-16 Thread Xunlei Pang
On 3/16/21 7:02 PM, Vlastimil Babka wrote: > On 3/16/21 11:42 AM, Xunlei Pang wrote: >> On 3/16/21 2:49 AM, Vlastimil Babka wrote: >>> On 3/9/21 4:25 PM, Xunlei Pang wrote: >>>> count_partial() can hold n->list_lock spinlock for quite long, which >>>>

Re: [PATCH v4 1/3] mm/slub: Introduce two counters for partial objects

2021-03-18 Thread Xunlei Pang
On 3/18/21 8:18 PM, Vlastimil Babka wrote: > On 3/17/21 8:54 AM, Xunlei Pang wrote: >> The node list_lock in count_partial() spends long time iterating >> in case of large amount of partial page lists, which can cause >> thunder herd effect to the list_lock contention. >

[PATCH v4 3/3] mm/slub: Get rid of count_partial()

2021-03-17 Thread Xunlei Pang
Now the partial counters are ready, let's use them to get rid of count_partial(). The partial counters will involve in to calculate the accurate partial usage when CONFIG_SLUB_DEBUG_PARTIAL is on, otherwise simply assume their zero usage statistics. Tested-by: James Wang Signed-off-by: Xunlei

[PATCH v4 1/3] mm/slub: Introduce two counters for partial objects

2021-03-17 Thread Xunlei Pang
and "num_objs" fields of "/proc/slabinfo" equal. "cat /sys/kernel/slab//partial" displays "0". Tested-by: James Wang Signed-off-by: Xunlei Pang --- init/Kconfig | 13 + mm/slab.h| 6 ++ mm/slub.c| 63 ++

[PATCH v4 2/3] percpu: Export per_cpu_sum()

2021-03-17 Thread Xunlei Pang
per_cpu_sum() is useful, and deserves to be exported. Tested-by: James Wang Signed-off-by: Xunlei Pang --- include/linux/percpu-defs.h | 10 ++ kernel/locking/percpu-rwsem.c | 10 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/percpu-defs.h

[PATCH v4 0/3] mm/slub: Fix count_partial() problem

2021-03-17 Thread Xunlei Pang
r stats for 'hackbench 32 thread 2' (10 runs): 39.681273015 seconds time elapsed ( +- 0.21% ) Performance counter stats for 'hackbench 32 thread 2' (10 runs): 39.681238459 seconds time elapsed

[PATCH v3 0/4] mm/slub: Fix count_partial() problem

2021-03-09 Thread Xunlei Pang
( +- 0.21% ) Performance counter stats for 'hackbench 32 thread 2' (10 runs): 39.681238459 seconds time elapsed ( +- 0.09% ) Xunlei Pang (4): mm/slub: Introduce two counters for partial objects mm/slub: Get rid of count_partial() percpu:

[PATCH v3 4/4] mm/slub: Use percpu partial free counter

2021-03-09 Thread Xunlei Pang
Wang Reviewed-by: Pekka Enberg Signed-off-by: Xunlei Pang --- mm/slab.h | 6 -- mm/slub.c | 30 +++--- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/mm/slab.h b/mm/slab.h index 817bfa0..c819597 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -546,16

[PATCH v3 2/4] mm/slub: Get rid of count_partial()

2021-03-09 Thread Xunlei Pang
Now the partial counters are ready, let's use them directly and get rid of count_partial(). Tested-by: James Wang Reviewed-by: Pekka Enberg Signed-off-by: Xunlei Pang --- mm/slub.c | 54 ++ 1 file changed, 22 insertions(+), 32 deletions

[PATCH v3 1/4] mm/slub: Introduce two counters for partial objects

2021-03-09 Thread Xunlei Pang
later. Tested-by: James Wang Reviewed-by: Pekka Enberg Signed-off-by: Xunlei Pang --- mm/slab.h | 4 mm/slub.c | 46 +- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/mm/slab.h b/mm/slab.h index 076582f..817bfa0 100644 -

[PATCH v3 3/4] percpu: Export per_cpu_sum()

2021-03-09 Thread Xunlei Pang
per_cpu_sum() is useful, and deserves to be exported. Tested-by: James Wang Signed-off-by: Xunlei Pang --- include/linux/percpu-defs.h | 10 ++ kernel/locking/percpu-rwsem.c | 10 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/percpu-defs.h

Re: [PATCH v4 1/3] mm/slub: Introduce two counters for partial objects

2021-03-17 Thread Xunlei Pang
On 3/18/21 2:45 AM, Vlastimil Babka wrote: > On 3/17/21 8:54 AM, Xunlei Pang wrote: >> The node list_lock in count_partial() spends long time iterating >> in case of large amount of partial page lists, which can cause >> thunder herd effect to the list_lock contention. >

Re: [PATCH v2 3/3] mm/slub: Use percpu partial free counter

2021-03-03 Thread Xunlei Pang
On 3/2/21 5:14 PM, Christoph Lameter wrote: > On Mon, 10 Aug 2020, Xunlei Pang wrote: > >> >> diff --git a/mm/slab.h b/mm/slab.h >> index c85e2fa..a709a70 100644 >> --- a/mm/slab.h >> +++ b/mm/slab.h >> @@ -616,7 +616,7 @@ struct kmem_cache_node { &g

Re: [PATCH v2 0/3] mm/slub: Fix count_partial() problem

2021-03-03 Thread Xunlei Pang
2020 at 6:05 PM xunlei wrote: >> >> On 2020/8/20 下午10:02, Pekka Enberg wrote: >>> On Mon, Aug 10, 2020 at 3:18 PM Xunlei Pang >>> wrote: >>>> >>>> v1->v2: >>>> - Improved changelog and variable naming for PATCH 1~2. >&g

[tip:sched/core] sched/deadline: Remove cpu_active_mask from cpudl_find()

2015-02-04 Thread tip-bot for Xunlei Pang
Commit-ID: 9659e128f7025b6545934d644d19e9c6e603 Gitweb: http://git.kernel.org/tip/9659e128f7025b6545934d644d19e9c6e603 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Mon, 19 Jan 2015 04:49:37 + Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 4 Feb 2015 07:52

[tip:sched/core] sched/deadline: Modify cpudl:: free_cpus to reflect rd-online

2015-02-01 Thread tip-bot for Xunlei Pang
Commit-ID: 16b269436b7213ebc01dcfcc9dafa8535b676ccb Gitweb: http://git.kernel.org/tip/16b269436b7213ebc01dcfcc9dafa8535b676ccb Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Mon, 19 Jan 2015 04:49:36 + Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 30 Jan 2015 19:39

[tip:sched/core] sched/fair: Fix the dealing with decay_count in __synchronize_entity_decay()

2015-01-14 Thread tip-bot for Xunlei Pang
Commit-ID: 638476007d13534b2ed4134bf0279ef44071140b Gitweb: http://git.kernel.org/tip/638476007d13534b2ed4134bf0279ef44071140b Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Tue, 16 Dec 2014 23:58:29 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 14 Jan 2015 13:34

[tip:timers/core] time: Add y2038 safe read_boot_clock64()

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 9a806ddbb9a18c510e4acdcc828b9a87f5fd3aef Gitweb: http://git.kernel.org/tip/9a806ddbb9a18c510e4acdcc828b9a87f5fd3aef Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:21 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] time, drivers/rtc: Don't bother with rtc_resume () for the nonstop clocksource

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 0fa88cb4b82b5cf7429bc1cef9db006ca035754e Gitweb: http://git.kernel.org/tip/0fa88cb4b82b5cf7429bc1cef9db006ca035754e Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:38 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc/mxc: Update driver to address y2038 /y2106 issues

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 933623c38f014b10db564f0ec44f9db64a5ced84 Gitweb: http://git.kernel.org/tip/933623c38f014b10db564f0ec44f9db64a5ced84 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:33 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] time: Don' t build timekeeping_inject_sleeptime64() if no one uses it

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 7f2981393af31a854879f2496cab4c978e886902 Gitweb: http://git.kernel.org/tip/7f2981393af31a854879f2496cab4c978e886902 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:35 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc: Remove redundant rtc_valid_tm() from rtc_resume()

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 814dcf8ead04f5ebcec74af06c705b207887f0fa Gitweb: http://git.kernel.org/tip/814dcf8ead04f5ebcec74af06c705b207887f0fa Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:36 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] time: Fix a bug in timekeeping_suspend() with no persistent clock

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 264bb3f79f2a465477cdcd2f0554e21aedc443a3 Gitweb: http://git.kernel.org/tip/264bb3f79f2a465477cdcd2f0554e21aedc443a3 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:37 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] ARM, clocksource/drivers: Provide read_boot_clock64() and read_persistent_clock64() and use them

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: cb850717b076d979058d52529e15f1736359d811 Gitweb: http://git.kernel.org/tip/cb850717b076d979058d52529e15f1736359d811 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:26 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] alpha, rtc: Change to use rtc_class_ops' s set_mmss64()

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: a5312f56e0a67deed5c7d1191140e00b6d367e01 Gitweb: http://git.kernel.org/tip/a5312f56e0a67deed5c7d1191140e00b6d367e01 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:34 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc/mxc: Convert get_alarm_or_time()/ set_alarm_or_time() to use time64_t

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: a015b8aabfd2fb58875dea001f1eac8100eacc2e Gitweb: http://git.kernel.org/tip/a015b8aabfd2fb58875dea001f1eac8100eacc2e Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:32 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc/ab3100: Update driver to address y2038/y2106 issues

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 5c7e11bc66647f2e4bc95de9b4302fff6d612f3a Gitweb: http://git.kernel.org/tip/5c7e11bc66647f2e4bc95de9b4302fff6d612f3a Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:29 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc: Provide y2038 safe rtc_class_ops.set_mmss() replacement

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 8e4ff1a81aa91d12856287c7103d0301ac91351a Gitweb: http://git.kernel.org/tip/8e4ff1a81aa91d12856287c7103d0301ac91351a Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:27 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc/test: Update driver to address y2038/y2106 issues

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 4d644ab84c6ed66f7a628c74d83c34d85bec13bf Gitweb: http://git.kernel.org/tip/4d644ab84c6ed66f7a628c74d83c34d85bec13bf Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:28 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] time: Add y2038 safe update_persistent_clock64( )

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 3c00a1fe8496ff29ab62764bb3f4ce4b48089004 Gitweb: http://git.kernel.org/tip/3c00a1fe8496ff29ab62764bb3f4ce4b48089004 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:23 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc/mc13xxx: Update driver to address y2038/y2106 issues

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 0307b0d77a0830b0fd4a22b5db4a9fa723a5fa5f Gitweb: http://git.kernel.org/tip/0307b0d77a0830b0fd4a22b5db4a9fa723a5fa5f Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:30 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

[tip:timers/core] drivers/rtc/mxc: Modify rtc_update_alarm() not to touch the alarm time

2015-04-03 Thread tip-bot for Xunlei Pang
Commit-ID: 482494a8d395877c4776a3d76f89342d7ad7c4c6 Gitweb: http://git.kernel.org/tip/482494a8d395877c4776a3d76f89342d7ad7c4c6 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Wed, 1 Apr 2015 20:34:31 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 3 Apr 2015 08:18

<    5   6   7   8   9   10   11   >