[PATCH] KVM: x86: init x2apic_enabled() once

2019-07-23 Thread luferry
From: luferry x2apic_eanbled() costs about 200 cycles when guest trigger halt pretty high, pi ops in hotpath Signed-off-by: luferry --- arch/x86/kvm/vmx/vmx.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index

Re:Re: [PATCH v2] smp: avoid generic_exec_single cause system lockup

2019-07-18 Thread luferry
At 2019-07-18 16:07:58, "Thomas Gleixner" wrote: >On Thu, 18 Jul 2019, lufe...@163.com wrote: > >> From: luferry >> >> The race can reproduced by sending wait enabled IPI in softirq/irq env > >Which code path is doing that? > >Thanks, &

[PATCH v2] smp: avoid generic_exec_single cause system lockup

2019-07-18 Thread luferry
From: luferry The race can reproduced by sending wait enabled IPI in softirq/irq env src cpu only send ipi when dst cpu with queue empty, if interrupts disturbed between llist_add and send_ipi. Interrupt handler may raise softirq.In irq env, if src cpu try send_ipi to same dst cpu with wait

[PATCH] smp: avoid generic_exec_single cause system lockup

2019-07-17 Thread luferry
From: luferry The race can reproduced by sending wait enabled IPI in softirq/irq env src cpu only send ipi when dst cpu with queue empty, if interrupts disturbed between llist_add and send_ipi. Interrupt handler may raise softirq.In irq env, if src cpu try send_ipi to same dst cpu with wait

[PATCH] make blk_mq_map_queues more friendly for cpu topology

2019-03-25 Thread luferry
at /sys/block/vd*/mq/*/cpu_list 0, 4, 5, 8, 9, 12, 13 1 2, 6, 7, 10, 11, 14, 15 3 After this patch: [root@blk-mq ~]# cat /sys/block/vd*/mq/*/cpu_list 0, 1, 8, 9 2, 3, 10, 11 4, 5, 12, 13 6, 7, 14, 15 Signed-off-by: luferry --- block/blk-mq-cpumap.c | 31 +++ 1 file changed,