Message ID | 20230519101840.v5.5.I654063e53782b11d53e736a8ad4897ffd207406a@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4E5FCC7EE2D for <linux-arm-kernel@archiver.kernel.org>; Fri, 19 May 2023 18:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7i4y5SZULh3JrbmXcmbjcm5pLTeqj4y84n4C7+Nz/QI=; b=rqkXAvxG2WCdZR NJJXMSBQ1Fc9VBPcks6qOOS9WdPEzbkGZh0T+eZyyc1Y0peRmM5dNCvFTb4+a0z0+NZveaxrheSeV GFG2eaNdhpMSfhSKjbfUGln0o9J7JKJKp0dxTK+OE5XymVQBWJuaUfr4KcLl+hOXX5b0y6pqFYyLq FkWwDl8LIaEsU6nFte8iKdUIvQA+oyh1ZCiVXA5sXl9wGveXrv7y8v/fUwTUAuJir3tZee3N3Z8RX wDWux/09TFOF+a5LnENbvqRdSOvV2EHAD/+FXn2S40BFri8PR0HueT1F6QBS0lzauzTBjhPzkYHc5 TH9GahcYxLYgLyNMqhaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q04sU-00Gz4L-08; Fri, 19 May 2023 18:30:58 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q03mj-00GqHN-2P for linux-arm-kernel@bombadil.infradead.org; Fri, 19 May 2023 17:20:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=FtWewuf5QmwEoMrp2heDkMSCLJmOGom4IGUit5Qgo0E=; b=dulMo6KJ2sYE8CTJtmeeoH2lyw UKj3uVM92/c0t7o9H1HaUEpnlFMDqn8t+kPK1aexoMvJS/FCmtc9sabgGni9RuH9xLw0mXm0GOc8g m8DpZlH+GEBUljNJODbyQRa/iR6k4MAo+Oob8MsaLlmsB2YkZcepBrow6+hes0d6/DAKWckYU5ZMb h1IqLAkoSUtlgmXth3TYlPeSbSrgZ+CAMVaRPXvCW/kgAdwvamL6uL7iN7GE8OLELQnuRUlav/cnD 8OinK4za3jpPUnvOxP5EvSrOGEDkL+rK6lCbDMp0Jt9GmnXypAp1OpwdfddY144FZQT8wFwzpEc/g 9odnHEUw==; Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q03mf-00Fxqo-2R for linux-arm-kernel@lists.infradead.org; Fri, 19 May 2023 17:20:55 +0000 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-2533ed4f1dcso2484143a91.1 for <linux-arm-kernel@lists.infradead.org>; Fri, 19 May 2023 10:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684516852; x=1687108852; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FtWewuf5QmwEoMrp2heDkMSCLJmOGom4IGUit5Qgo0E=; b=j+odxpthVu1r88NdkoBBLHCCZHxAILIoHvQRbo0BYOGU+caYf7G5t8oS+/sutWAb06 0/3y15G9V4rAsqVAUplESKZYanhl/sYpq1QJSiIK9RoB3l+LfJCDMdhxu4jHA6BiwsiY AK/xV8IKz/okxdjnmVpntud8VcNkXW2UnoYD8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684516852; x=1687108852; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FtWewuf5QmwEoMrp2heDkMSCLJmOGom4IGUit5Qgo0E=; b=Ict4V8256RfH1U16pVzKc5dRnPLDI0DlfOyF1e8HlHP0IM/g4kA7qCQfTrRGxudRnk f9DDLEQHjFgBzXUPo+5idyAxdTEAobZQYAedgmW1fVbXUpTJEwqoi1JPQ23BxLcLuefa ZxfX7kn+HT0szOfrVgoWWFFearvStdupTibHA85YyzW0N47haxEyRNuVLhH6U2M2cKEq Y6qUvKtdDkNhwOyj0etF+4AQ/gfssXr11B/NfIsBgP2uKDkf9JgxIOLlsMBNSc3tLXj+ LSZ7KDPpvC7TO3R/D3U+XQxpSLH4CWv6U+x3RCnL3p87qLAprcLma3HqCxmNdZmV40ov /WFw== X-Gm-Message-State: AC+VfDx+w0jWJqgYxJhEUVv4ftIrlWut3QkZyhboXiPNCvhY2fdbCZI1 iOG0p0WEV+C15d1QFFlcnS3tSg== X-Google-Smtp-Source: ACHHUZ7LqONQqbo1f32uROMOmBD1YwxsC0hUaPEyZAYzC5eD1qH0xMLrKy1PKFruL4ixUcNA0i2quA== X-Received: by 2002:a17:90a:8b0e:b0:253:8796:3322 with SMTP id y14-20020a17090a8b0e00b0025387963322mr1959543pjn.27.1684516851906; Fri, 19 May 2023 10:20:51 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:9b89:2dd0:d160:429d]) by smtp.gmail.com with ESMTPSA id gj19-20020a17090b109300b0024e4f169931sm1763835pjb.2.2023.05.19.10.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 10:20:51 -0700 (PDT) From: Douglas Anderson <dianders@chromium.org> To: Petr Mladek <pmladek@suse.com>, Andrew Morton <akpm@linux-foundation.org> Cc: Matthias Kaehlcke <mka@chromium.org>, kgdb-bugreport@lists.sourceforge.net, Stephane Eranian <eranian@google.com>, mpe@ellerman.id.au, Tzung-Bi Shih <tzungbi@chromium.org>, Daniel Thompson <daniel.thompson@linaro.org>, Mark Rutland <mark.rutland@arm.com>, linuxppc-dev@lists.ozlabs.org, Sumit Garg <sumit.garg@linaro.org>, npiggin@gmail.com, davem@davemloft.net, Marc Zyngier <maz@kernel.org>, Stephen Boyd <swboyd@chromium.org>, sparclinux@vger.kernel.org, christophe.leroy@csgroup.eu, Catalin Marinas <catalin.marinas@arm.com>, ravi.v.shankar@intel.com, Randy Dunlap <rdunlap@infradead.org>, Pingfan Liu <kernelfans@gmail.com>, Guenter Roeck <groeck@chromium.org>, Lecopzer Chen <lecopzer.chen@mediatek.com>, Ian Rogers <irogers@google.com>, ito-yuichi@fujitsu.com, ricardo.neri@intel.com, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, Will Deacon <will@kernel.org>, Chen-Yu Tsai <wens@csie.org>, linux-kernel@vger.kernel.org, Masayoshi Mizuma <msys.mizuma@gmail.com>, Andi Kleen <ak@linux.intel.com>, Douglas Anderson <dianders@chromium.org> Subject: [PATCH v5 05/18] watchdog/perf: Ensure CPU-bound context when creating hardlockup detector event Date: Fri, 19 May 2023 10:18:29 -0700 Message-ID: <20230519101840.v5.5.I654063e53782b11d53e736a8ad4897ffd207406a@changeid> X-Mailer: git-send-email 2.40.1.698.g37aff9b760-goog In-Reply-To: <20230519101840.v5.18.Ia44852044cdcb074f387e80df6b45e892965d4a1@changeid> References: <20230519101840.v5.18.Ia44852044cdcb074f387e80df6b45e892965d4a1@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230519_182053_887011_CFC3B49B X-CRM114-Status: GOOD ( 18.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
watchdog/hardlockup: Add the buddy hardlockup detector
|
expand
|
diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c index 1e8a49dc956e..2125b09e09d7 100644 --- a/kernel/watchdog_hld.c +++ b/kernel/watchdog_hld.c @@ -165,10 +165,16 @@ static void watchdog_overflow_callback(struct perf_event *event, static int hardlockup_detector_event_create(void) { - unsigned int cpu = smp_processor_id(); + unsigned int cpu; struct perf_event_attr *wd_attr; struct perf_event *evt; + /* + * Preemption is not disabled because memory will be allocated. + * Ensure CPU-locality by calling this in per-CPU kthread. + */ + WARN_ON(!is_percpu_thread()); + cpu = raw_smp_processor_id(); wd_attr = &wd_hw_attr; wd_attr->sample_period = hw_nmi_get_sample_period(watchdog_thresh);