From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752781AbdJPMzf (ORCPT ); Mon, 16 Oct 2017 08:55:35 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:51357 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbdJPMze (ORCPT ); Mon, 16 Oct 2017 08:55:34 -0400 Date: Mon, 16 Oct 2017 14:54:16 +0200 (CEST) From: Thomas Gleixner To: Petri Latvala cc: Yu Chen , Juergen Gross , Boris Ostrovsky , Tony Luck , Marc Zyngier , Alok Kataria , Joerg Roedel , "Rafael J. Wysocki" , Steven Rostedt , Christoph Hellwig , Peter Zijlstra , Borislav Petkov , Paolo Bonzini , Rui Zhang , "K. Y. Srinivasan" , Arjan van de Ven , Dan Williams , Len Brown , LKML Subject: Re: Regression in linux-next In-Reply-To: Message-ID: References: <20171013110850.GA5303@yu-chen.sh.intel.com> <149ec6e8-4189-040c-a53c-12b0a51a855e@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-264629428-1508158458=:1973" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-264629428-1508158458=:1973 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8BIT On Mon, 16 Oct 2017, Thomas Gleixner wrote: > On Mon, 16 Oct 2017, Petri Latvala wrote: > > > That should dump the trace buffer when the bug hits. I try to reproduce > > > myself. > > > > With those: > > > > # rtcwake -s 15 -m mem > > > > [   67.069522] kernel BUG at arch/x86/kernel/apic/vector.c:154! > > [   67.075509] invalid opcode: 0000 [#1] PREEMPT SMP > > [   67.080481] Dumping ftrace buffer: > > Hrm. I completely forgot that this does not dump the buffers of offline > CPUs. So half of the information is missing. So forget the tracer for now. > > Can you please apply the debug patch below and provide the full dmesg > output? > > Its going to be too big for LKML so either upload it somewhere or send it > to me in private mail. > > Note, I removed the BUG_ON, so box might survive suspend/resume but it > should trigger that printout. Forgot to add the counterpart to the clear side. Updated patch below. Thanks, tglx 8<---------------- --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -140,6 +140,10 @@ static void apic_update_vector(struct ir trace_vector_update(irqd->irq, newvec, newcpu, apicd->vector, apicd->cpu); + pr_err("VU: CPU %u irq %u newvec %u newcpu %u curvec %u curcpu %u desc %p\n", + smp_processor_id(),irqd->irq, newvec, newcpu, apicd->vector, + apicd->cpu, desc); + /* Setup the vector move, if required */ if (apicd->vector && cpu_online(apicd->cpu)) { apicd->move_in_progress = true; @@ -151,7 +155,9 @@ static void apic_update_vector(struct ir apicd->vector = newvec; apicd->cpu = newcpu; - BUG_ON(!IS_ERR_OR_NULL(per_cpu(vector_irq, newcpu)[newvec])); + if (!IS_ERR_OR_NULL(per_cpu(vector_irq, newcpu)[newvec])) + pr_err("VU not empty %p\n", per_cpu(vector_irq, newcpu)[newvec]); + per_cpu(vector_irq, newcpu)[newvec] = desc; } @@ -316,6 +322,10 @@ static void clear_irq_vector(struct irq_ lockdep_assert_held(&vector_lock); + pr_err("VC: CPU %u irq %u curvec %u curcpu %u oldvec %u oldcpu %u\n", + smp_processor_id(),irqd->irq, apicd->vector, apicd->cpu, + apicd->prev_vector, apicd->prev_cpu); + if (!vector) return; --8323329-264629428-1508158458=:1973--