Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp544556lqs; Tue, 5 Mar 2024 09:06:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXKgH46Vhgwq9gHVd8xHFX6AG//p6OKGxkN8CltdsVpS+jDdBc9/WYvsblxTETmRDOXdkaOEXdz8RAYaWmMgeta+TU3amt6nd/VOpjhkA== X-Google-Smtp-Source: AGHT+IFWiFz26Ce5QuqslqjJBurKZOEj8Z7U20BhVp+aVWgm9eYe0O+35TTeRn2pjF7RfuxfrMZv X-Received: by 2002:a17:906:4546:b0:a45:aef0:c449 with SMTP id s6-20020a170906454600b00a45aef0c449mr992609ejq.39.1709658401002; Tue, 05 Mar 2024 09:06:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709658400; cv=pass; d=google.com; s=arc-20160816; b=iKvGdrER9Y9rjIaS7pSZa+wRgPOcT/rbWStZIkMluoQ4/86iCDW40x6Qz0iLg6Zv/5 ngeYl3Z3CRvU0u2wZFtXwtytjtVoymxZ2pznNGVxqc5e6LPgCDTCqEEPmLGeJa1YwfF5 22OHh+Kb8yRL8e5RDb9VnCCPpFiu0e4TbHE/VT/Iwn6LnSaXAWqApz5C+Ogv7cdMeENm J42kiJ9ojGJTEYrabR0Ko7GcZUzbz24sEAXe+b2bXqBm3ma59L7ytMqDBWtsW1VNpimv K6zHSfI/BvjrAKu3VYqBc0Hhr8Ekuz7wAUFgVhAhh19lMvZ2t8ZQHijPv1NIY563sQC6 l+Ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=HRm+TnjyJg5idEpRreLSl5etxQBLrbJ4QAyjOJxgiHU=; fh=E4jyCTeXV6ICvvhBEIipXTS38/tf29O622Y3axY5jwg=; b=yCtKD8iizDIqYz4Dmdkhhg/5vGN86UW62uTLQTFT1xwl5DI8hAZICra2qnW3VkqXOU 3ON2zRVMxyg7OXp7rLJnbEXCFbnEiWZ7CJVSJrtwYhWFDKsyMM8OEeQpPoCCx3F/vNsk 9TNspUVadNkI3ecXBAUwr229FRSzYEXozYtLEGhpUX+U0rZClp+I4ZBA3CvSSCq839cE aERpeN3Ohvtf3hadapWDtwd+/JxhUlXJ9MI33/dha0FrZjd7R8aMTKY+78k42B9r3vpH 5KVvMl/irCOhzsDw7LM0z3KOHzjED/BihiUrUHdJEs+eYoOnzHzQhIzkhSWjb7vhyHiN qbew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HKbwYqoG; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-92726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92726-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o17-20020a1709061b1100b00a45788b6fa3si1540443ejg.9.2024.03.05.09.06.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 09:06:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HKbwYqoG; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-92726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92726-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A2D7D1F26FAD for ; Tue, 5 Mar 2024 16:57:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F102EDDA0; Tue, 5 Mar 2024 16:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HKbwYqoG"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8tNakUsg" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B389FD267; Tue, 5 Mar 2024 16:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709657870; cv=none; b=jFRthziKkHn/53065+mcwMlqW539AIcfRuWsBh5pbOaV7q0IPymOg9s4mffcONr9URexKixYdNSq+kb9tB6aK1Bt5ljkhSXYo0X5tzNCDKs2OtmdP1VtqBABXApbG2ApWGriUWHrztRHybCUtT0VkFvuRxM/HeLfxomxQp867j4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709657870; c=relaxed/simple; bh=azjFOsktqiCXb357AvMEW9hKL9yqQ3FCu5yPd9IL/jo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=WRDeXsA+X9W1f/2bgtRVEf5buQZB1XboZQXxdrxGewl5w6hZTk3vsbKQ47Blm5jhqHkZoN9r6xPH8QAT5sbkQBBSO2Pfo0Yr8765H4CYAzNAsTyYOk9n1ZLVbaF/II4FFB7YepmPrOodEjIIzPk7rjsSp9mYo4YRdNWfk1vPp38= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=HKbwYqoG; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8tNakUsg; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709657861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HRm+TnjyJg5idEpRreLSl5etxQBLrbJ4QAyjOJxgiHU=; b=HKbwYqoGgFwQ5w0c2x4gUshWZq5DHnmoTWFc3/aZZcUsyBPUvs7FtgO9sXWFeAyfxpuEi6 xlcIADFKW3TAaX8V6Ga3Vk3KxGSZLgdUIYbQXmyX2czdZGrJV+gT+com+2AYsi4w5tCpPe P+3R/323Mr+jpB72RGyL7UAB2G4Y24a0f5aPuMXb2XzcFpBHmn6AX+fCh47ITffrAmlSjQ X0sd2R+FxjQ3skVdAjuyST0jIZLH7tS9pVec6Q/PgKFl70I0IEfjpeTld2114ViFAQn5Jb vMDMFcMAgaGC7ZbfrNWUXKsAS9MSi3fMQV2MyyOkR6PfJ5iMQMb9P8IPdthLhQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709657861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HRm+TnjyJg5idEpRreLSl5etxQBLrbJ4QAyjOJxgiHU=; b=8tNakUsgVDjiTy1DgFT1yzq4jZIkpWJOqH5pgA+w3enng6vlac/FwllNiicYgryByF76pu dUSgco6KK8GYs2CA== To: Bitao Hu , Doug Anderson Cc: liusong@linux.alibaba.com, akpm@linux-foundation.org, pmladek@suse.com, kernelfans@gmail.com, deller@gmx.de, npiggin@gmail.com, tsbogend@alpha.franken.de, James.Bottomley@hansenpartnership.com, jan.kiszka@siemens.com, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, yaoma@linux.alibaba.com Subject: Re: [PATCHv11 2/4] genirq: Provide a snapshot mechanism for interrupt statistics In-Reply-To: <28a24e4b-c322-4631-ad6d-7259ca3d084d@linux.alibaba.com> References: <20240228072216.95130-1-yaoma@linux.alibaba.com> <20240228072216.95130-3-yaoma@linux.alibaba.com> <87plwdwycx.ffs@tglx> <3a89fafb-f62e-472f-b40b-8bf97954e9e3@linux.alibaba.com> <87wmqiulaw.ffs@tglx> <28a24e4b-c322-4631-ad6d-7259ca3d084d@linux.alibaba.com> Date: Tue, 05 Mar 2024 17:57:40 +0100 Message-ID: <87h6hkvcor.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Mar 05 2024 at 18:57, Bitao Hu wrote: > On 2024/3/4 22:24, Thomas Gleixner wrote: > "GENERIC_IRQ_STAT_SNAPSHOT" visible to the user. However, after > analyzing the previous emails, it seems that what you were actually > proposing was to directly disable "GENERIC_IRQ_STAT_SNAPSHOT" when > "SOFTLOCKUP_DETECTOR_INTR_STORM" is not enabled, as a way to save > memory. If my current understanding is correct, then the code for that > part would look something like the following. Correct. > diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig > index 2531f3496ab6..a28e5ac5fc79 100644 > --- a/kernel/irq/Kconfig > +++ b/kernel/irq/Kconfig > @@ -108,6 +108,10 @@ config GENERIC_IRQ_MATRIX_ALLOCATOR > config GENERIC_IRQ_RESERVATION_MODE > bool > > +# Snapshot for interrupt statistics > +config GENERIC_IRQ_STAT_SNAPSHOT > + bool > + > # Support forced irq threading > config IRQ_FORCED_THREADING > bool > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 49f652674bd8..899b69fcb598 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1032,6 +1032,7 @@ config SOFTLOCKUP_DETECTOR > config SOFTLOCKUP_DETECTOR_INTR_STORM > bool "Detect Interrupt Storm in Soft Lockups" > depends on SOFTLOCKUP_DETECTOR && IRQ_TIME_ACCOUNTING > + select GENERIC_IRQ_STAT_SNAPSHOT This goes into the patch which adds the lockup detector parts. Thanks, tglx