Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1307652ybl; Thu, 22 Aug 2019 12:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4CbSBiu/h5Z/oA5DEiFMmAx9geu8vL/dI8WyBJaewG8G+dwd5YYsQPMqJ+MtR4dc6/5DJ X-Received: by 2002:a17:902:a58c:: with SMTP id az12mr444273plb.129.1566501938817; Thu, 22 Aug 2019 12:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566501938; cv=none; d=google.com; s=arc-20160816; b=iOBNmGVWmGA5m75U3Gjtq+fOVxiBab1HyFO8To4R9zgCkcQtgMVQ4GVczSNhstEYF+ IvAxux+mv4P8nLQ5RrsTjRQHI6sYNhc3L0rmmhIvV+72AcLlppAQJrL5AVlZkyLtUM4T XjngtgMnW3r5oliLMknilxcwtEOCrCqVWb212NOKDh17vRJhqq2tS5uIAPn+KvxHxVpd 5vHA3Fehc4AENFOBu+aUsnJDAzdNBkrgWQRt/ON7DZSdyKgDWy7ZK8py5qTACCiQj78M nYvggAaU3Bw9WsD1yx0xjh2NhDABP1DVuReq7B2TVvls3ZjQVQ9Lv7NM6AZQ60G28rrd 9scA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=I6vURle/yUma+eW5rLJzWOxNL358DqVD4LvDOo35ub4=; b=ZST4GKfjElsbCPA3a9wkrwvY7kPT+nGnGZqBUmNGGp1AqZoLJ6davN2GAjCP7e6Miy D0/Adn8M5pRMpo1KRtVBU6KHVGeyMkzhpqIy2Uk7V07my7kn1q48MElslrALA1Dp+DUf HBxZ7TSLcor6m1PoBKr35247RWVRoJj1K2+3UTAsZTukLnq8fe8JdAlC/EEi5uDKdMHD R87JpkmMV6wbPCGQWhWDglGvEo3t8a3vffI+vpRUJ72B9MlkUf4Wnt9sgM7S2405diwO mUuehcMzIS/z9sEg36aSDldnNpbYNnCf6D6FrDAmF2yDitkkufjez4GWaszmu2cKiAnV ZDBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z69PyISM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3si145845pgn.467.2019.08.22.12.25.23; Thu, 22 Aug 2019 12:25:38 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b=Z69PyISM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389149AbfHVObc (ORCPT + 99 others); Thu, 22 Aug 2019 10:31:32 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42935 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733053AbfHVObb (ORCPT ); Thu, 22 Aug 2019 10:31:31 -0400 Received: by mail-lf1-f66.google.com with SMTP id s19so4693635lfb.9 for ; Thu, 22 Aug 2019 07:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I6vURle/yUma+eW5rLJzWOxNL358DqVD4LvDOo35ub4=; b=Z69PyISMAGubDibz/jDX9RD9SsPVwEzQmzrpqarBcmpM+eu/UGhwntcwqKskrvNSXg fVRZ0My+OBfqEvJxZbiUtRqoz5VR5OKw2bp2pHU/7kXNShJ6OHeONvD4F6RDImnjxdYh OUu1nz38bWX/75Ut2ii6qegPhgRKpza6T1opofsn9VxnPk+32GJEhQSiyJt1bgKLNpiL pfekHdCC587hvfbr5d9atg2kLoUdFLNitVnki5j98ESn1tAhUy5dzumLvvs+FbYD0KV0 gMBXcI8uJWp9I+Uy0Z3/SBacREbDbz7iYAhNlQuHtz1N/lpuMnPiykIcGCCySIKZYLvW 36ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I6vURle/yUma+eW5rLJzWOxNL358DqVD4LvDOo35ub4=; b=rv3+r6lOIJ5hL1WZ7spuIE7RiYV0zfXqZvcqLUPocXJBEO8w2iv9g4Zn6Io4WwezLg WlxwzO+Op0qzhHLkitSc03FKWo15Mz27dxkEhd590c+H/ZmbbFN+VeLUh7lxkU+yndbe aW9ReR+SABxXDQW6p2I80nSfDMNYf0gj2MER1odi0w4HnmvCHC+9Gj5ccc/3+kFUlilB 6qioY4GLpcuBBrqpoWAK2TYSaVWARjmuvzvV9IBY+FgyZRHa5rJ/8FRpioGtexwcHXZA cCGrnm/jLkFSCrg3GeQw9WNMLD0BvIwlHAFuTCfBhe3I9eYNgt0fYN62Y7EY90YmZzhH oogA== X-Gm-Message-State: APjAAAVWx8WBN9SbwmnGHovTC9iI5Lk26icUPpf7zy4ytHqrg6qrmhhm dUfTDm3OtT7jP30ypvrrIAd8Hdek8Xk+/wIDD+A= X-Received: by 2002:ac2:563c:: with SMTP id b28mr21575220lff.93.1566484289181; Thu, 22 Aug 2019 07:31:29 -0700 (PDT) MIME-Version: 1.0 References: <20180223121456.GZ25201@hirez.programming.kicks-ass.net> <20180226203937.GA21543@tassilo.jf.intel.com> In-Reply-To: From: Josh Hunt Date: Thu, 22 Aug 2019 07:31:17 -0700 Message-ID: Subject: Re: Long standing kernel warning: perfevents: irq loop stuck! To: Thomas Gleixner Cc: Andi Kleen , Peter Zijlstra , Cong Wang , "Liang, Kan" , jolsa@redhat.com, bigeasy@linutronix.de, "H. Peter Anvin" , Ingo Molnar , x86 , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 4:16 PM Josh Hunt wrote: > > On Mon, Aug 19, 2019 at 2:17 PM Josh Hunt wrote: > > > > On Mon, Aug 12, 2019 at 12:42 PM Josh Hunt wrote: > > > > > > On Mon, Aug 12, 2019 at 12:34 PM Thomas Gleixner wrote: > > > > > > > > On Mon, 12 Aug 2019, Josh Hunt wrote: > > > > > On Mon, Aug 12, 2019 at 10:55 AM Thomas Gleixner wrote: > > > > > > > > > > > > On Mon, 12 Aug 2019, Josh Hunt wrote: > > > > > > > Was there any progress made on debugging this issue? We are still > > > > > > > seeing it on 4.19.44: > > > > > > > > > > > > I haven't seen anyone looking at this. > > > > > > > > > > > > Can you please try the patch Ingo posted: > > > > > > > > > > > > https://lore.kernel.org/lkml/20150501070226.GB18957@gmail.com/ > > > > > > > > > > > > and if it fixes the issue decrease the value from 128 to the point where it > > > > > > comes back, i.e. 128 -> 64 -> 32 ... > > > > > > > > > > > > Thanks, > > > > > > > > > > > > tglx > > > > > > > > > > I just checked the machines where this problem occurs and they're both > > > > > Nehalem boxes. I think Ingo's patch would only help Haswell machines. > > > > > Please let me know if I misread the patch or if what I'm seeing is a > > > > > different issue than the one Cong originally reported. > > > > > > > > Find the NHM hack below. > > > > > > > > Thanks, > > > > > > > > tglx > > > > > > > > 8<---------------- > > > > > > > > diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c > > > > index 648260b5f367..93c1a4f0e73e 100644 > > > > --- a/arch/x86/events/intel/core.c > > > > +++ b/arch/x86/events/intel/core.c > > > > @@ -3572,6 +3572,11 @@ static u64 bdw_limit_period(struct perf_event *event, u64 left) > > > > return left; > > > > } > > > > > > > > +static u64 nhm_limit_period(struct perf_event *event, u64 left) > > > > +{ > > > > + return max(left, 128ULL); > > > > +} > > > > + > > > > PMU_FORMAT_ATTR(event, "config:0-7" ); > > > > PMU_FORMAT_ATTR(umask, "config:8-15" ); > > > > PMU_FORMAT_ATTR(edge, "config:18" ); > > > > @@ -4606,6 +4611,7 @@ __init int intel_pmu_init(void) > > > > x86_pmu.pebs_constraints = intel_nehalem_pebs_event_constraints; > > > > x86_pmu.enable_all = intel_pmu_nhm_enable_all; > > > > x86_pmu.extra_regs = intel_nehalem_extra_regs; > > > > + x86_pmu.limit_period = nhm_limit_period; > > > > > > > > mem_attr = nhm_mem_events_attrs; > > > > > > > Thanks Thomas. Will try this and let you know. > > > > > > -- > > > Josh > > > > Thomas > > > > I found on my setup that setting the value to 32 was the lowest value > > I could use to keep the problem from happening. Let me know if you > > want me to send a patch with the updated value, etc. > > > > I saw in the original thread from Ingo and Vince that this was seen on > > Haswell, but I checked our Haswell boxes and so far we have not > > reproduced the problem there. > > > > -- > > Josh > > I went ahead and sent this patch with the value set to 32: > https://lore.kernel.org/lkml/1566256411-18820-1-git-send-email-johunt@akamai.com/T/#u > > I wasn't sure how/who to give credit to for the change, so please > resubmit if what I did is incorrect or if you wanted to debug further. > If you decide to resubmit the patch please add my tested-by and > Bhupesh's reported-by. I'm able to reproduce the problem within about > 2 hours if there's anything else you wanted to look into before going > with this approach. > > Thanks! > -- > Josh Thomas Any thoughts on the above or the patch that I sent? Thanks! -- Josh