Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7295772ybi; Mon, 22 Jul 2019 10:29:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRTuIQBZPL7pWuq7gJGkNOnf29JKYhPGVy8FUzEhpScV7V/cTtJPjekP6uwmPbKMKt0+em X-Received: by 2002:a65:6104:: with SMTP id z4mr35577635pgu.27.1563816576636; Mon, 22 Jul 2019 10:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563816576; cv=none; d=google.com; s=arc-20160816; b=JugzrblPUGlF9mUWnGM0Ny72xRItmpbtANdqAzaJVIQmbe947aVvvg7wJaAVXAA2lr SYQ9X3gEu7t5Ftpi/xQD+uGPO8HZmbLZkJZYBFkNrMnXp3GJUthqxqNg8Ybd/O7COTgv 5EFSAQItBFDpuxYqf+BNm8hnIDURO4bEis08zB+bwv8ARfLP7P7b1NWCYrALYY6/z0BG LNLLS5DJgjoW+4WZyXiuRyakXygvMKOcrh1KqrDBuvprmHjLq0QmC0h8xZfurcrwE9cU 9xD2Gs7lbOY2NeE1GSKXw5pUmL5R+AQqlGumOVoe/FG/3hmnLNWyveV1ErFDC8ebC6GW QnuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=YpDhAnJi6XF6JjAc7kJ50N5JkcaCaTxau+Abf/t+QEU=; b=llUOSKBOoUuAJY91dbKHgJDep0pKR2vSveyFPHPVOUB0AJrq9I4FEcVO/1twiDA2o9 r7RPqHPTaHizKPDcuAZSSZiosdeHmQd5360FUOKFTQChkufli8n+F01iLSbsmz3a0KpA TLnEA0nW04Qz+H1ybanOXAJMEDkd4xHDuDHXdP38AqOzb07lNkxV4ueCUXKbCeO3kavm 4WwGpDicFSPIHaYZf1IeYIvcEksP5avuFGSOlpIxZdVbstry5eBz5iHxPK+Pfnk6vp0w stv7vcOv5Byt3nZG5Se6uVD881++u4rc1de0j7yj1UmIy3sDcRtogsk31bEp3wIcLtvl getQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si8023960pll.132.2019.07.22.10.29.20; Mon, 22 Jul 2019 10:29:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726358AbfGVOls (ORCPT + 99 others); Mon, 22 Jul 2019 10:41:48 -0400 Received: from foss.arm.com ([217.140.110.172]:38908 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbfGVOls (ORCPT ); Mon, 22 Jul 2019 10:41:48 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6C6C8344; Mon, 22 Jul 2019 07:41:47 -0700 (PDT) Received: from [10.1.197.61] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8D84D3F694; Mon, 22 Jul 2019 07:41:46 -0700 (PDT) Subject: Re: About threaded interrupt handler CPU affinity To: John Garry , Thomas Gleixner Cc: bigeasy@linutronix.de, chenxiang , "linux-kernel@vger.kernel.org" References: From: Marc Zyngier Organization: Approximate Message-ID: Date: Mon, 22 Jul 2019 15:41:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On 22/07/2019 15:14, John Garry wrote: > Hi Thomas, > > I have a question on commit cbf8699996a6 ("genirq: Let irq thread follow > the effective hard irq affinity"), if you could kindly check: > > Here we set the thread affinity to be the same as the hard interrupt > affinity. For an arm64 system with GIC ITS, this will be a single CPU, > the lowest in the interrupt affinity mask. So, in this case, effectively > the thread will be bound to a single CPU. I think APIC is the same for this. > > The commit message describes the problem that we solve here is that the > thread may become affine to a different CPU to the hard interrupt - does > it mean that the thread CPU mask could not cover that of the hard > interrupt? I couldn't follow the reason. Assume a 4 CPU system. If the interrupt affinity is on CPU0-1, you could end up with the effective interrupt affinity on CPU0 (which would be typical of the ITS), and the thread running on CPU1. Not great. The change you mentions ensures that the thread affinity is strictly equal to the *effective affinity* of the interrupt (or at least that's the way I read it). > We have experimented with fixing the thread mask to be the same as the > interrupt mask (we're using managed interrupts), like before, and get a > significant performance boost at high IO datarates on our storage > controller - like ~11%. My understanding is that this patch does exactly that. Does it result in a regression? Thanks, M. -- Jazz is not dead, it just smells funny...