Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1647002ybe; Tue, 3 Sep 2019 01:11:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsJ7wUrFy04bgQKnPz6DEDwSwtbs+pg0qjQCBgBc5JlfDBxg2M/Z7XC+Row/CLxKvJUllq X-Received: by 2002:a62:5802:: with SMTP id m2mr38612312pfb.169.1567498302610; Tue, 03 Sep 2019 01:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567498302; cv=none; d=google.com; s=arc-20160816; b=vOVqAJSzmjS1LhomljTKCkCXoPLutgmlhCNkfo3bWGogQJX2jjkmJ3iUBhOiqXSHKw toXLm38Ua+09j/dI4JrAXokUbCq4pvkUrg3t6/6l17oXA7Utlgpy8aPnU5QZgO4bzQ/W 63iC8ZKM2Lm4x7aCJHaYoDDkeOZT4kzXNqdYPaz+o59TZ7Zs5yghwxVpRa7PiolcCz96 ILYaBMlgvjWRSpubU//U7pN5RIW/YbH1KwhzGEylAhVpXTYG2XeGadVwjltf1Aoe8Usc jFvwPf4GcipwbzwtkX5sE2TCR/lYDVM1nBYZWuRG9Zmv4NhAN5G5QnKxL/6nPfXkB7o+ 64Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=2s6J3IqviB3WRV99BN4HiADFLrxCN0torphgJCa5Bts=; b=b3s+++XfHeT3PcB+g1ECXEWBgbua7KRiN2ojd7+WnEO/h4KcDF2pqPbvb6PuVbEUdF EqREwEjVWKjMJEtjhGaw0LLtSem1nh5YF659m5el2MPVyGPGBEy6sMITo+RVjd54a0wh oxikN7YjylnnTrBx0GQIWjWgOCVgj/oJJykkT85pSNDqI/2n4jnJLVcC0t59tF4C1R+K wmqj08EsW6fPBQ3ifXlxpHT4yjdYWJ++wAopjTmBvkDiKqRUFsxeYGxDuCgBT8DnoH9y XSpuAYwvrcFUGpFbajsVrnHi8XYpm0TTFrv/XRZg2m8SDu71hwGhJR87b1QywcmK+b+X n+2g== ARC-Authentication-Results: i=1; mx.google.com; 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 ay19si14190340pjb.44.2019.09.03.01.11.26; Tue, 03 Sep 2019 01:11:42 -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; 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 S1727525AbfICIKg (ORCPT + 99 others); Tue, 3 Sep 2019 04:10:36 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:59051 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbfICIKg (ORCPT ); Tue, 3 Sep 2019 04:10:36 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1i53t4-0002J5-HG; Tue, 03 Sep 2019 10:10:02 +0200 Date: Tue, 3 Sep 2019 10:09:57 +0200 (CEST) From: Thomas Gleixner To: Ming Lei cc: Daniel Lezcano , LKML , Long Li , Ingo Molnar , Peter Zijlstra , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , John Garry , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH 1/4] softirq: implement IRQ flood detection mechanism In-Reply-To: <20190903072848.GA22170@ming.t460p> Message-ID: References: <20190827225827.GA5263@ming.t460p> <20190828110633.GC15524@ming.t460p> <20190828135054.GA23861@ming.t460p> <20190903033001.GB23861@ming.t460p> <299fb6b5-d414-2e71-1dd2-9d6e34ee1c79@linaro.org> <20190903063125.GA21022@ming.t460p> <6b88719c-782a-4a63-db9f-bf62734a7874@linaro.org> <20190903072848.GA22170@ming.t460p> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Sep 2019, Ming Lei wrote: > Scheduler can do nothing if the CPU is taken completely by handling > interrupt & softirq, so seems not a scheduler problem, IMO. Well, but thinking more about it, the solution you are proposing is more a bandaid than anything else. If you look at the networking NAPI mechanism. It handles that situation gracefully by: - Disabling the interrupt at the device level - Polling the device in softirq context until empty and then reenabling interrupts - In case the softirq handles more packets than a defined budget it forces the softirq into the softirqd thread context which also allows rescheduling once the budget is completed. With your adhoc workaround you handle one specific case. But it does not work at all when an overload situation occurs in a case where the queues are truly per cpu simply. Because then the interrupt and the thread affinity are the same and single CPU targets and you replace the interrupt with a threaded handler which runs by default with RT priority. So instead of hacking something half baken into the hard/softirq code, why can't block do a budget limitation and once that is reached switch to something NAPI like as a general solution? Thanks, tglx