Received: by 10.223.185.116 with SMTP id b49csp3707014wrg; Mon, 19 Feb 2018 04:47:22 -0800 (PST) X-Google-Smtp-Source: AH8x227+bAF+6TCZcy0+GRrZsZjktJwer2Vd/h3bfq8kEh++jg6CuhBeMC1fci7+A7Co37FCfzdD X-Received: by 10.99.129.66 with SMTP id t63mr11967249pgd.376.1519044442726; Mon, 19 Feb 2018 04:47:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519044442; cv=none; d=google.com; s=arc-20160816; b=w8symx8DNMcTl2D2X5/JzZyBRN7hcRGNYQxFDZiPnBIhmRliYzXAYTJ+i904H2pQER RrPsjhSenMt3PvKkRHBiNN0WEwgEFP+IZr6AkqESRa9c/2FeLHnuuZ9wg5rnlfFpvgh4 q0mN8XvhySA4dW7O1cu5/liZV3GeBZxdEPgYLAJHtyDQpisRTcqurWWzQp9Yia3fibDi S5+/dyZvhPJ4H7jFYAJOyDPf5+uKBQumZWTL/1yRA0nQAy/PklD2KGtLpK3NYPTcLfeK jpwY1W/vNm3q/Yls4eU9PraLineCvhpm6r06XtkVDIYBipPIMw6ImzgPHnLHFqvaGhnc 49+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=kX4ST0mP5trF3BEDMwfwFEcHBC0TB0j7x/B9e3xqF1M=; b=Iddyk+EhA3QpLG1UxVnIfU+xR1ja9iEzjiM2Ys9eSA7lJs5Oy5jLj12Hw/8fiF9s0k XZCo+CDbhpNBrsJHID18WPJ2BDNW1PcgqVEOYTm0bkf+Ce0xVsMa+LhL4pwlcloq4EOL lNgAGYwEUkvdwCzYPxmmMo23gSAvJlUk4/A1Hb6jxIFKl8TBdVQVSEVYN1yD/hNj3g9C bRDMYChz+yoB+y6ux8iHZdv3AjYBxIEZP6yqh3gfcTGybx4N5vwtj7SRlz26NLMRP6aI GnY/PJWFlx1Kch6VUL439cWcKs+FngZqJVlNYCqiBlg9o8qBGI4jafQ9B5/+W+SkNdhn NQ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Mbw+Z4ZN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f19-v6si5395229plr.641.2018.02.19.04.47.07; Mon, 19 Feb 2018 04:47:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Mbw+Z4ZN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbeBSMpL (ORCPT + 99 others); Mon, 19 Feb 2018 07:45:11 -0500 Received: from merlin.infradead.org ([205.233.59.134]:44338 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbeBSMpK (ORCPT ); Mon, 19 Feb 2018 07:45:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kX4ST0mP5trF3BEDMwfwFEcHBC0TB0j7x/B9e3xqF1M=; b=Mbw+Z4ZNtLZ6SXpTjQtz797Ej 16swLakilxBct9aRuhF8Dw8s91WZuwaaOcvAWFKa5k+EvNJh9xSsUQ8CLlCPcBxVm/XW/qQ3+B9hB gyj7E1idhVA+INSASsfZL7f+vl1oovy+moNPkKYwjYhY6ZxuWxJr2SZvwrGQLU2nc2W2HspxEPTF5 ENY9eFrOEAkZnERJ9d7SuNZguqzy28tgPo/324d4Kz80WPIwyxMVAnK44eShi90xkUNhX8KJCL1AC Bmz30iaE/jqTdVudXrVA14110ue98Wz7sbLwWh/zwEjN4RkhtGCYYjL6W9b6N2Zv55LedVDoIk7Dt +D2aZ8wIQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1enkoK-0001Be-Tf; Mon, 19 Feb 2018 12:44:49 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E08E8201FB4F9; Mon, 19 Feb 2018 13:44:46 +0100 (CET) Date: Mon, 19 Feb 2018 13:44:46 +0100 From: Peter Zijlstra To: kernel test robot Cc: kan.liang@linux.intel.com, mingo@redhat.com, linux-kernel@vger.kernel.org, acme@kernel.org, tglx@linutronix.de, jolsa@redhat.com, eranian@google.com, ak@linux.intel.com, lkp@01.org Subject: Re: [perf/x86/intel] 41e062cd2e: WARNING:at_arch/x86/events/intel/ds.c:#intel_pmu_save_and_restart_reload Message-ID: <20180219124446.GR25201@hirez.programming.kicks-ass.net> References: <1518474035-21006-2-git-send-email-kan.liang@linux.intel.com> <20180217062119.cemwsj6dsf4ezfn6@inn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180217062119.cemwsj6dsf4ezfn6@inn> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 17, 2018 at 02:21:19PM +0800, kernel test robot wrote: > [ 242.731381] WARNING: CPU: 3 PID: 1107 at arch/x86/events/intel/ds.c:1326 intel_pmu_save_and_restart_reload+0x87/0x90 That's the one asserting the PMU is in fact disabled. > [ 242.731417] CPU: 3 PID: 1107 Comm: netserver Not tainted 4.15.0-00001-g41e062c #1 > [ 242.731418] Hardware name: LENOVO IdeaPad U410 /Lenovo , BIOS 65CN15WW 06/05/2012 > [ 242.731422] RIP: 0010:intel_pmu_save_and_restart_reload+0x87/0x90 > [ 242.731423] RSP: 0018:fffffe000008c8d0 EFLAGS: 00010002 > [ 242.731425] RAX: 0000000000000001 RBX: ffff88007d069800 RCX: 0000000000000000 > [ 242.731426] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff88007d069800 > [ 242.731427] RBP: 0000000000000010 R08: 0000000000000001 R09: 0000000000000001 > [ 242.731428] R10: 00000000000000b0 R11: 0000000000003000 R12: 00000000000f4243 > [ 242.731429] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 > [ 242.731431] FS: 00007f1501639700(0000) GS:ffff880112ac0000(0000) knlGS:0000000000000000 > [ 242.731432] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 242.731433] CR2: 00007f65a1394d68 CR3: 000000007f62a006 CR4: 00000000001606e0 > [ 242.731434] Call Trace: > [ 242.731438] > [ 242.731443] __intel_pmu_pebs_event+0xc8/0x260 > [ 242.731452] ? intel_pmu_drain_pebs_nhm+0x211/0x2f0 > [ 242.731454] intel_pmu_drain_pebs_nhm+0x211/0x2f0 > [ 242.731457] intel_pmu_handle_irq+0x12d/0x4b0 > [ 242.731464] ? perf_event_nmi_handler+0x2d/0x50 > [ 242.731466] perf_event_nmi_handler+0x2d/0x50 > [ 242.731470] nmi_handle+0x6a/0x130 > [ 242.731473] default_do_nmi+0x4e/0x110 > [ 242.731475] do_nmi+0xe5/0x140 > [ 242.731479] end_repeat_nmi+0x1a/0x54 And this should have shown with any testing I think. The problem appears to be that intel_pmu_handle_irq() uses __intel_pmu_disable_all() which 'forgets' to clear cpuc->enabled as per x86_pmu_disable().