Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1052518ybi; Tue, 16 Jul 2019 08:58:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHBPBfO9aJwlMTBv7r3tS3vnIJ3sSVclKoyHTrhxLjcq2Zrkye71nvsPJ1Um46z6L6GlK9 X-Received: by 2002:a17:90a:26ea:: with SMTP id m97mr37628626pje.59.1563292700611; Tue, 16 Jul 2019 08:58:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563292700; cv=none; d=google.com; s=arc-20160816; b=X5MskMT0qtQbO0/k8NluEXyJ137pjjEO9ciswaN4lLbchu4Yax0i9nyVqS1dnXeO1t 2XTocbkzFmEnwSm5jq61R4B6dSC/OZ6Mtqzn6zYwagMqBPO1V4lurc9QIia65SWJHHNY 0zf4RFMgFhBeGgR67SWdDh7tHQgUZsAL7me2EbpyyrRTdR3sWFfxf1YL+XbnpnC3YNMQ DqPq5ikxzWkiGt6ThupXOH4RvEqeVAhASzvgwxmXDg0HqCeNrZfTCVVYjUlosmMy/emf DqplbIeOJnqD6AAagqpKXbihfl4JP5eipGYSepyZZpuaz0SceFiTShfqO4KErxv/zJD6 o7ZQ== 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=61IKGE8xVkITW1vfw98N8UwrDGN9FCQzrrCN4y6aLjk=; b=R8g+iSoxij9OskastJxb5DtppNO9GCAV92sb49Y5KxwjN+6q6V4iycSb17rRDF9dMn FHrUSdb2ZokHmUmJ184UjHnL5EYyIZgGhW8yvXqvxhP76iWUUJsJ3pt5Ik9EzqZXyM8E 5P5nnRVrcX3/TvBgVqbgXLj4wwi2+16ct7WRd517A1wdtn2pj4lt0OgtIe0u1SOVBFh/ XuHnp3CT5Jhtiaj0BBO1t+1fRuF531IaQByE6/A7Ad18+bXMS2CX365x9imtV5Xnccav TfA6ilJKlMDpI9Zb3dfdAvMRAuofddsxkX4ZFRmtjmBcPkjo8Sqgz06g3TjTOnjFA6kp t9PA== 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 6si7436921pgt.13.2019.07.16.08.58.03; Tue, 16 Jul 2019 08:58:20 -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 S2387773AbfGPP5g (ORCPT + 99 others); Tue, 16 Jul 2019 11:57:36 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50666 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728190AbfGPP5g (ORCPT ); Tue, 16 Jul 2019 11:57:36 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hnPpc-0002Gs-Vv; Tue, 16 Jul 2019 17:57:33 +0200 Date: Tue, 16 Jul 2019 17:57:31 +0200 (CEST) From: Thomas Gleixner To: Neil Horman cc: linux-kernel@vger.kernel.org, djuran@redhat.com, Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org Subject: Re: [PATCH] x86: Add irq spillover warning In-Reply-To: <20190716135917.15525-1-nhorman@tuxdriver.com> Message-ID: References: <20190716135917.15525-1-nhorman@tuxdriver.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Neil, On Tue, 16 Jul 2019, Neil Horman wrote: > On Intel hardware, cpus are limited in the number of irqs they can > have affined to them (currently 240), based on section 10.5.2 of: > https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf That reference is really not useful to explain the problem and the number of vectors is neither. Please explain the conceptual issue. > If a cpu has more than this number of interrupts affined to it, they > will spill over to other cpus, which potentially may be outside of their > affinity mask. Spill over? The kernel decides to pick a vector on a CPU outside of the affinity when it runs out of vectors on the CPUs in the affinity mask. Please explain issues technically correct. > Given that this might cause unexpected behavior on > performance sensitive systems, warn the user should this condition occur > so that corrective action can be taken > @@ -244,6 +244,14 @@ __visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs) Why on earth warn in the interrupt delivery hotpath? Just because it's the place which really needs extra instructions and extra cache lines on performance sensitive systems, right? The fact that the kernel ran out of vectors for the CPUs in the affinity mask is already known when the vector is allocated in activate_reserved(). So there is an obvious place to put such a warning and it's certainly not do_IRQ(). Thanks, tglx