Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3632946ybl; Mon, 19 Aug 2019 23:15:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwkpR7flMVLe/QTkEA4EwgMpNFCu3yd5e/5Ju3RVGIhPyX5iPYIA8pgoZdMkEwinocgdKL X-Received: by 2002:a63:1f03:: with SMTP id f3mr22901916pgf.249.1566281754147; Mon, 19 Aug 2019 23:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566281754; cv=none; d=google.com; s=arc-20160816; b=F5LKZYCvhT4CcD/oftx8ZVQ98Qj7iUEWEWwV4YwiUqxdX0sBedRv9U5Zwa8M5Scya0 AoGuaxd9d4wRswdqNiPzQu3+mBhG3coY3DrCDXfjQDI1sE71AFkzrJ9asD9+5qI4os/v 2eCuAyHeUWVpoguq7kgTET54oKCDDXbV7iED1BVjv8KxZpoQ5EVIegPyAYPuYG3M1WC1 MOhsA3teyKDKqsJZaNMdFtAy5HsiN/PmnI/HqAEJW6CLtmFsWXaAIoo0la8OL7gOx/+8 kke2+QeAjlL5P8z2hrdDlIZ+D+lMReFBM4WM1qjqqW7wP3/2Mt8JDaIzmjtuzykIP9wr vj1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=irR5tenrmHwMixa4DhE9mKUf8q1VdVSaHTLm1Tuq9yA=; b=QFziJufUntHHmhRED3T+aXLQRxH4AXMh19znApwqh2HkpGfEGosI6aHMMwKEGXFi7a bEv7q/2hPRPMRzr2qDKcj9Rw+Rf7OzRXOnZcU+glAGeRPBuFkXexGas7/kgLvNF5/BgA Xz1Gs/YVUopK4hoSsz/UvIx4MG2PRIZPhGTz+Lhb46y7inOm2cUHlEuEYBaJBg2VfuOo cphRqCOs5fkuI7dQxbQrkEuCxZxljRoNwLDdVbfLyCmYkq47ZjY7BJ9+7tamsOVVYGLP fwtEvcnsqwuxkr0wOUem+7EuxJP9RatdX8xhSAnngNQY5jRU8FWFFdgVImuv8kMQMJWi a+YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=cuZpaUG5; 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=NONE dis=NONE) header.from=linuxonhyperv.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i188si12151303pfe.96.2019.08.19.23.15.38; Mon, 19 Aug 2019 23:15:54 -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=@linuxonhyperv.com header.s=default header.b=cuZpaUG5; 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=NONE dis=NONE) header.from=linuxonhyperv.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729221AbfHTGOk (ORCPT + 99 others); Tue, 20 Aug 2019 02:14:40 -0400 Received: from linux.microsoft.com ([13.77.154.182]:37712 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728960AbfHTGOk (ORCPT ); Tue, 20 Aug 2019 02:14:40 -0400 Received: by linux.microsoft.com (Postfix, from userid 1004) id AE5EA20B7188; Mon, 19 Aug 2019 23:14:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AE5EA20B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1566281679; bh=irR5tenrmHwMixa4DhE9mKUf8q1VdVSaHTLm1Tuq9yA=; h=From:To:Cc:Subject:Date:From; b=cuZpaUG5UeYZabz6oj8RDw5nXWLrMKQlGvwqEH61vpCcMvvbx+jn98by0EUpmUT6a zcb4blqVOXkVebSjaczWLBjfWMWtR/mbapJcKNSpir7WhOaZdS/KrYKp3XAEnsHhyQ uq6RDsIUM90aYLW8/6RLLIqSl+EWGZjcVXalIyW0= From: longli@linuxonhyperv.com To: Ingo Molnar , Peter Zijlstra , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [PATCH 0/3] fix interrupt swamp in NVMe Date: Mon, 19 Aug 2019 23:14:26 -0700 Message-Id: <1566281669-48212-1-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Long Li This patch set tries to fix interrupt swamp in NVMe devices. On large systems with many CPUs, a number of CPUs may share one NVMe hardware queue. It may have this situation where several CPUs are issuing I/Os, and all the I/Os are returned on the CPU where the hardware queue is bound to. This may result in that CPU swamped by interrupts and stay in interrupt mode for extended time while other CPUs continue to issue I/O. This can trigger Watchdog and RCU timeout, and make the system unresponsive. This patch set addresses this by enforcing scheduling and throttling I/O when CPU is starved in this situation. Long Li (3): sched: define a function to report the number of context switches on a CPU sched: export idle_cpu() nvme: complete request in work queue on CPU with flooded interrupts drivers/nvme/host/core.c | 57 +++++++++++++++++++++++++++++++++++++++- drivers/nvme/host/nvme.h | 1 + include/linux/sched.h | 2 ++ kernel/sched/core.c | 7 +++++ 4 files changed, 66 insertions(+), 1 deletion(-) -- 2.17.1