Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1065984ybi; Tue, 16 Jul 2019 09:09:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzu34eERchc+pLhz3IuPtjLZVpFiChM65Hvo3wRNkDOW+mfOT+9TlQvA3zQrnbWOlzAw/mi X-Received: by 2002:a17:902:6b81:: with SMTP id p1mr33996837plk.91.1563293346830; Tue, 16 Jul 2019 09:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563293346; cv=none; d=google.com; s=arc-20160816; b=S0YfJd9YZli99uLlmAi6I1Kf79oN/5Q54SH6jm3UH9HBns4LrVR9kG8MI/hhQuxqBI dC8UWKOLrABa8gaxVgXWcc0hthL0XpPQHwSQeLcBZKjsA1smRu7ZrYYDq9rdizOA/Wkw nvIB0s4zecMCEfirKI5TreqIEWXoGHdKjVzZkjewxPYOehcnNmduxLdULdxtltPWMi+m QkYm+4k17Ri7fJ1faQv1fThLFxDXwEp2uE3pi2YT/ASyglZiP2mIMyrVxyPfLRWh/D5s 8vNFhNsY8sS2KUKcZsrC0NsSTxV5jsEssVfp9LbHRCSTRHqEVQ2gsyb8GBmoPtAaNNt9 P+hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=rLTq39LZVv4Z9C+JKRMbSgn3dp1gTfSXZpf7NbcsUgs=; b=HufaJu6hLXiqz+jlcFGj87ifN3Urc8YRNXhjwx+A1KSJ99wsuB/vcfAJMFJhd59Cfg LFSyDsQW3cUJWYtdItf/CyahqA20Ye8j205FSwrsbNFKU84YGBgQYPZdVi7gYOGQ734m n+Jd4G1mx59r/+XReH3zJDl0fzPM+WHhb3FSpLBNqRFj9sAiFCgw5lOvf/Rod7pPxdRM byW8N7JPikRoCFGOXOQzRl9kj+poptyEzUCh2iFaSmj3d3iovsVaohIBoGY8Yi3SDTbo y079cV2LCOjzb15CX2+cOWudusNTlOlTS0bgVlGh5TrpbXG6pX8/Cj/zOtajuoaKECrj rJ9w== 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 i32si19294999pje.44.2019.07.16.09.08.50; Tue, 16 Jul 2019 09:09:06 -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 S2387920AbfGPQIY (ORCPT + 99 others); Tue, 16 Jul 2019 12:08:24 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:40117 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728004AbfGPQIY (ORCPT ); Tue, 16 Jul 2019 12:08:24 -0400 Received: from cpe-2606-a000-111b-405a-0-0-0-162e.dyn6.twc.com ([2606:a000:111b:405a::162e] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1hnPzz-0001za-Tr; Tue, 16 Jul 2019 12:08:22 -0400 Date: Tue, 16 Jul 2019 12:07:45 -0400 From: Neil Horman To: Thomas Gleixner 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 Message-ID: <20190716160745.GB1498@hmswarspite.think-freely.org> References: <20190716135917.15525-1-nhorman@tuxdriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: -2.9 (--) X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2019 at 05:57:31PM +0200, Thomas Gleixner wrote: > 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. > You seem to have already done that below. Not really sure what more you are asking for here. > > 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. > Yes. > Please explain issues technically correct. > I don't know what you mean by this. I explained it above, and you clearly understood it. > > 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? > Because theres already a check of the same variety in do_IRQ, but if the information is available outside the hotpath, I was unaware, and am happy to update this patch to refelct that. > 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(). > Sure Thanks Neil > Thanks, > > tglx >