Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp756026rdb; Thu, 22 Feb 2024 20:53:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUSnQ9taazZaVhkxCUApydBFyC8/3k4SMz1Y+IXIJ6wINmrvF6P/1hQE2Fvd3fXCq+GJiB9w6RWGBHnXKnEWUUzrkti8oUms7fuIRK1HA== X-Google-Smtp-Source: AGHT+IGx+PKyeWpPLopRjgZ09/t08WAP5udZzsMr9+XBxObLkjxA3ySEzE/xYy3Mj6/CkU9h+TQG X-Received: by 2002:aa7:c999:0:b0:564:3b52:2293 with SMTP id c25-20020aa7c999000000b005643b522293mr427690edt.24.1708663997258; Thu, 22 Feb 2024 20:53:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708663997; cv=pass; d=google.com; s=arc-20160816; b=gvth1EM+HFZ8bfkVrFXLhVWd2AUKSYCgQYj3r6YgMYUGK0FmfzddzrR9pl/zoLZQJS 74C8a3UvdoyfHYUy0QZr51287NQnphsWyCbdN1Ucpw/bFS3IFgti/yfeCCAqtBH08U6M MMiGk2dHjTn6caDD3LOqOUBCJDtnMZ9sG6eeTfabHHzhbQsgK397RoLmznXrdrscVjdQ +Nb1MFiFdHseWr23med3QW23d2hAd/N9XlMk2uuDPVwR55zGJfnQ8q6Q14VuPLaK+bT3 0l9FerJbiilxyUWD9gJE5o8/ZY8zYzki6M4xwcDnFRDZ7scRi6hmNMy+oc1XV24X9JVf D9ig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=G2a79SnguKy7LS5/McK8Bl18qsnHZ6N+ea/bVlJ73jc=; fh=22zA/IPJfcR6Ibc6JWYcqUNTUnvUTrBlQX29myQZx5s=; b=TerAmv9hEwcXWtn8vToSJxWcqG+V/hlWQDtZgZISbMGJ3y+pBKMzzP2tjEH3k3EtDE x5kpJjYh7HajELYA+xWkVcfmQdwas719nl9gWNzvMHvWV7LU7ZdQdKbw6wTc94CpFaqy d03gyCrn6UrjfpnmO+TVitczNQBefBZ/XB4FQWo1JeYGg3Jde/xLXAfAJbtgdtEU1fn8 f2aS93suzPAhT2OWYcyinnu+68PQWdNlXGVSzndtsFt1XMDjUIR3fR60rKzR1qSYvPAI 8xQraHC3Jzoe9oihV7BW/98WPQBGdIHIa45l+Obw8+3DH0OGiNN1SG7y6I3Z5s7vrHlV XigQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L+sGzeHW; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-77771-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77771-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h15-20020a05640250cf00b0056420f51921si5481665edb.264.2024.02.22.20.53.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 20:53:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77771-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L+sGzeHW; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-77771-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77771-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 046DA1F23746 for ; Fri, 23 Feb 2024 04:53:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDFB012B84; Fri, 23 Feb 2024 04:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="L+sGzeHW" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 54B88125D9 for ; Fri, 23 Feb 2024 04:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708663954; cv=none; b=Gr62WBlmfwHjiXwCmeZSpVeZv75BTC1D+jPQ0zntOhq9y23/nv8ALXz4991+HcuCgm1m3IUS6YG8Ve20hAXS9EMXHQw2L2CXUG7GJ9LQlzq4AhlaBrQ8/6sq0xdrhtauBqJSX2RARLZNnJ1jgAWxRJp+RwBe5gJn81LoreDy0DI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708663954; c=relaxed/simple; bh=XkHvRIn9l8T02N+1IdFfX69n71P34OHEy6ZzjjC0NSI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type:Content-Disposition; b=gXP6MjUHhKUIkfZYEbrNsdASysf1Ws8PRukWs7ayMZhnUeI/ZNNGxX7YMKrl302bP+bQvP2KRH3UyesqC+KV0bEV1rcyyd/xmijP3pStZNVtR+PO3haXF8yVe+L28jygp9CAG7DX6TuoYW8A+Bpq9Nv7n2ePqaRcpKEc3ew7Cso= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=L+sGzeHW; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708663952; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G2a79SnguKy7LS5/McK8Bl18qsnHZ6N+ea/bVlJ73jc=; b=L+sGzeHWINB+pvex9HrnEA/lcMPpXCjG/hjtoJgld+edDAVt0YjyIysjoJziXpwFHWb3Sj 0nEFyL7gH0Jq38wqHZVmG/FylkdA3z/DTnlJ7EHt5yMpLuDnKx3sQwW6HdKTl+lKJHKLfJ /8BozwvGLAk+MmTOV1TUM3BY1NckY+E= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-81-pxgBLHZmNJSjygogYECgcQ-1; Thu, 22 Feb 2024 23:52:30 -0500 X-MC-Unique: pxgBLHZmNJSjygogYECgcQ-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-42dbd942e22so3211761cf.3 for ; Thu, 22 Feb 2024 20:52:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708663949; x=1709268749; h=content-transfer-encoding:content-disposition: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=G2a79SnguKy7LS5/McK8Bl18qsnHZ6N+ea/bVlJ73jc=; b=OqFHML28m9MUrtg5rvBnAHwQJjeWDhXUs2bfUc6WqxyRCebRjiKlgcPZROlap4p2Wj wGkw4eevTKDmnzuaXpWIKuesTfw9b3opOll5d3aXibGUBwYOfmDI8pYvaqJWdA6bRZpc MhOHsVPxEsJpUsPB3lZLbbzS8f2SaUYdrqiW6KeA8pY+Td7MZv5HjgJDmZgT3MNHlcvH yRhifvUUDGwhsrGtVi78rD2b5Z8GhLqsBubwwPHfguqipbv8d5EH5+cXaM6Gw2k45Crp JzW0CU1t1f6QMx/sjmE4xqrICgCXiMrqtVLwc3Bq7tJHJolEdfVGtMtWVTuqJbbADwPQ hfXQ== X-Forwarded-Encrypted: i=1; AJvYcCXnOigiU/d+0JDCXb5Bh2C0V68LlHF5wRfs8Dgazmbpl2lTnbWwpqljhddlL2OeKnWhyIMJUvop7IeurMrErIIglh0sz53ZVqWMdpT2 X-Gm-Message-State: AOJu0YxrrZhaXFHQbQv4Omvv2260zStJT3z2YdpaN+csuS4ud/gOrWTr vduZpS5lgRvj2E6JlLHlpDSEezcsXnR11SxVqSdG2deWyNtmFO8Y7S8nOMXEjnY2QsBtOJEPnEE nv9JouDqztH3tWDjPmxLHE46VifM4Ew2LR4AxoQdMV5oq96DtnjzFEMLEXlbLOwnhwko+Tg== X-Received: by 2002:a05:622a:180d:b0:42d:c884:a8fd with SMTP id t13-20020a05622a180d00b0042dc884a8fdmr1352574qtc.21.1708663949072; Thu, 22 Feb 2024 20:52:29 -0800 (PST) X-Received: by 2002:a05:622a:180d:b0:42d:c884:a8fd with SMTP id t13-20020a05622a180d00b0042dc884a8fdmr1352559qtc.21.1708663948756; Thu, 22 Feb 2024 20:52:28 -0800 (PST) Received: from LeoBras.redhat.com ([2804:431:c7ec:a28e:99bd:8c92:cf80:d1bd]) by smtp.gmail.com with ESMTPSA id qn5-20020a056214570500b0068fbdafa771sm1585415qvb.5.2024.02.22.20.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 20:52:28 -0800 (PST) From: Leonardo Bras To: Thomas Gleixner Cc: Leonardo Bras , Greg Kroah-Hartman , Jiri Slaby , Tony Lindgren , Andy Shevchenko , John Ogness , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Florian Fainelli , Shanker Donthineni , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [RFC PATCH v2 3/4] irq: Introduce IRQ_HANDLED_MANY Date: Fri, 23 Feb 2024 01:52:22 -0300 Message-ID: X-Mailer: git-send-email 2.43.2 In-Reply-To: <87bk89hhpm.ffs@tglx> References: <20240216075948.131372-2-leobras@redhat.com> <20240216075948.131372-5-leobras@redhat.com> <87zfvwai62.ffs@tglx> <87v86kaf84.ffs@tglx> <87edd5hljz.ffs@tglx> <87bk89hhpm.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; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Feb 21, 2024 at 06:04:21PM +0100, Thomas Gleixner wrote: > On Wed, Feb 21 2024 at 16:41, Thomas Gleixner wrote: > > On Wed, Feb 21 2024 at 02:39, Leonardo Bras wrote: > > But as I pointed out above the detection logic is flawed due to the > > unconditional accumulation. Can you give the uncompiled below a test > > ride with your scenario? > > Bah. Ignore this. I misread the code completely. No idea where my brain > was. > > This thing triggers only when there are 100K interrupts and 99.9k of > them unhandled. The 100k total resets the unhandled counts. > > Though one thing which strikes me odd is that this actually triggers at > all because it needs 99.9k unhandled out of 100k total. That means on > average every thread handler invocation handles 1000 hardware interrupts > in one go. Is that even realistic? Yeap, it triggers pretty easily if you bring a vm with a serial console, and try to use it to work with something very verbose. It was detected by someone trying to unpack a kernel source tarball. Maybe this is an issue that only becomes reproducible for this and maybe a couple extra drivers, so the solution will only need to be implemented in those drivers when (if) this bug reproduces. This being said, thank you for helping me improve my understandig of this piece of code. I will put some effort in trying to find a solution that works by changing generic-code only, but would like to understand if the current proposal is valid if I am unable to find any. Thanks! Leo > > Thanks, > > tglx > >