Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp211721ybz; Tue, 21 Apr 2020 07:40:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKfTDC0LQomu1S4lRAHV81AvlVGMasQkrOn8hcud56n89BTdIRzZLerU62lRm91UhkWi+rZ X-Received: by 2002:a17:906:4310:: with SMTP id j16mr7976565ejm.102.1587480037437; Tue, 21 Apr 2020 07:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587480037; cv=none; d=google.com; s=arc-20160816; b=AdIEI1T/cB98TfGjU3oNlSl+iJFFfN7CY0a5mHUhn+x1j2InRELl8bUj0A3dW7cUi5 s3ECOpDpkdLwUKGVFCboT+T+1kcZeTPKM/Vqd5a0pbh5W/1p1TAG6lLk6TBpBFRPyBHo cGncRNsCPiUprligBYqrbAv5mfShF+2ltEdNYBNOL4XqnpHfi97iE9lOELBsQntlyawF Y1SoUaPl/5kFOmbolC4mXBQEoyPPjwSidKZzg0sZtYfzbU+Cf8FqhGoInWx1xXIhDSTp LFg+AYqSPPSdTSvnGTStV0D0iVhJeaTKWvLfwoxA913eIsJTLGmzBr3+ggnmNextGc8S CkCw== 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=i6HbTIcakKDXxTZEeKQQSYUjWyxGTsu5pz+Y7KQJa2Y=; b=r6EnIvwX/8T5LPoA1C2NijrZGuaUYb+c97D+fTgKDvZYwLFaWWcD13YhJo6isPTBLe AqGeF3yx4ghs3dXCNciA7TfSm9g18wUXY62YKlkpaIGl7sxfVSYirX+2xht9M7CuOTLR X3hdzQztYb17gP2p7x7Cc7M5g5VBeN/ixUd4x+owggMcl85X3fOYNgoDFA6i5K+SjPEN TyiCtctqXvQIkYq6gXYSK070bnJDyYUXAeZZHxamm+APxtHA08akw7Sa8z6iS6v2nzek 2deB8opUx20/U5cYNW7ENqU2wq40aAO6GAbpAnOSUa9ZWarvANIodzFH5qAYmJwTUudg RALw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l9si1673876ejh.463.2020.04.21.07.40.12; Tue, 21 Apr 2020 07:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728725AbgDUOjK (ORCPT + 99 others); Tue, 21 Apr 2020 10:39:10 -0400 Received: from foss.arm.com ([217.140.110.172]:36688 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgDUOjJ (ORCPT ); Tue, 21 Apr 2020 10:39:09 -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 05A7031B; Tue, 21 Apr 2020 07:39:09 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8AF583F68F; Tue, 21 Apr 2020 07:39:06 -0700 (PDT) Date: Tue, 21 Apr 2020 15:39:04 +0100 From: Qais Yousef To: Marc Zyngier Cc: Valentin Schneider , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Andrew Morton , Thomas Gleixner , Yury Norov , Paul Turner , Alexey Dobriyan , Josh Don , Pavan Kondeti , linux-kernel@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH 0/4] sched/rt: Distribute tasks in find_lowest_rq() Message-ID: <20200421143903.iox2bgmezrd5x6c5@e107158-lin.cambridge.arm.com> References: <20200414150556.10920-1-qais.yousef@arm.com> <20200421121305.ziu3dfqwo7cw6ymu@e107158-lin.cambridge.arm.com> <20200421142243.lea26mnmxnjpynlf@e107158-lin.cambridge.arm.com> <1c21b8e7b08e6db7fb97dc46d1246d9a@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1c21b8e7b08e6db7fb97dc46d1246d9a@kernel.org> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/21/20 15:28, Marc Zyngier wrote: > On 2020-04-21 15:22, Qais Yousef wrote: > > On 04/21/20 15:09, Marc Zyngier wrote: > > > On 2020-04-21 14:18, Valentin Schneider wrote: > > > > On 21/04/20 13:13, Qais Yousef wrote: > > > > > > [...] > > > > > > > > I CCed Marc who's the maintainer of this file who can clarify better > > > > > if this > > > > > really breaks anything. > > > > > > > > > > If any interrupt expects to be affined to a specific CPU then this > > > > > must be > > > > > described in DT/driver. I think the GIC controller is free to > > > > > distribute them > > > > > to any cpu otherwise if !force. Which is usually done by > > > > > irq_balancer anyway > > > > > in userspace, IIUC. > > > > > > > > > > I don't see how cpumask_any_and() break anything here too. I > > > > > actually think it > > > > > improves on things by better distribute the irqs on the system by > > > > > default. > > > > > > That's a pretty bold statement. Unfortunately, it isn't universally > > > true. > > > Some workload will be very happy with interrupts spread all over the > > > map, > > > and some others will suffer from it because, well, it interrupts > > > userspace. > > > > > > > As you say, if someone wants smarter IRQ affinity they can do > > > > irq_balancer > > > > and whatnot. The default kernel policy for now has been to shove > > > > everything > > > > on the lowest-numbered CPU, and I see no valid reason to change that. > > > > > > Exactly. I would like to keep the kernel policy as simple as > > > possible for > > > non-managed interrupts (managed interrupts are another kettle of fish > > > entirely). > > > Userpace is in control to place things "intelligently", so let's not > > > try and > > > make the kernel smarter than it strictly needs to be. > > > > Fair enough. But why is it asking for cpumask_any() in the first place? > > Implementation detail. Turn it into cpumask_first_and() if you want. Will do. Thanks -- Qais Yousef