Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1566256pxk; Tue, 1 Sep 2020 01:49:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ1GkpT56mULJBiiPwVzZfp8IJDzAxsDg6I4o8Z7ZKyU77XOqaDxnptAPMlZ69hn2AEC4d X-Received: by 2002:a17:906:3816:: with SMTP id v22mr536190ejc.105.1598950152245; Tue, 01 Sep 2020 01:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598950152; cv=none; d=google.com; s=arc-20160816; b=Rm0pE+Yd6+IQlcTZquHsqiY95xu1KDRbdzeiIgQOozocvQgikaCEFk2MBZMLKTQan4 PdR7g0KHp/c8qRhhVX3mSv7EKhhhB78n1qavVeU6s9VXi1GDAitmKDBuzZb33+LUkqLH rch0QuCYLds1EtKieC7xRFLUt9w6zd9cf11J4UhQhd8uL6TovUaq6mrLTVdCo6ZYA2GR 1NG7P33WF+I/srzSGdaLO7FEGiwzN/cHu4YODm9yoX9DXIJgk8+syj/YHzakWqmZAusZ yD7xa+x3D39GVP7pW7NlPiWtpZuqtRddYDxCyd6cTZEv/FyUCR7ZESerFhvZ+jiUGj7c 2QDg== 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:from:references:cc:to:subject; bh=NrMeQiOje0cZSzYg+koA+mbTNf6P2BPg4VLVo68t8Fc=; b=lLRqBkIV4MrF0HQx4DePdxBL8vvfiMApce4eLr3JgPF3R16FtzSOZ9dAeAPtTcgsLc ADvT22Po468E1T4sr2x0Y9nczDHkBdvhPHpsRHVLf+cSq1gzE16ETrp+NLlBXBGuOXR6 d8gQEi7apj1SgsPRPae2yY60hEQThwhK+9kUE2zXhoVXLnBNjfUEIamUYC5Z9qXthLG6 haRw45J3PXRXI+O4scF120V0niqzVIA93uQ1M3mbCIJVMxIA/rLTXJMWdU4eoTxRsPfO chAOln3uRPHJukeVtru2WildKw5K7w/Le1p9j17H81hCMPsn52lVAmPET9jYi3oh8IBS 8Ndg== 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 p60si235921edd.302.2020.09.01.01.48.48; Tue, 01 Sep 2020 01:49:12 -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 S1726112AbgIAIsL (ORCPT + 99 others); Tue, 1 Sep 2020 04:48:11 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3081 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725949AbgIAIsL (ORCPT ); Tue, 1 Sep 2020 04:48:11 -0400 Received: from dggeme755-chm.china.huawei.com (unknown [172.30.72.53]) by Forcepoint Email with ESMTP id 07087318D0CCF9839338; Tue, 1 Sep 2020 16:48:09 +0800 (CST) Received: from [10.140.157.78] (10.140.157.78) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Tue, 1 Sep 2020 16:48:08 +0800 Subject: Re: Adjust interrupt Priority for ARM64 GIC To: Marc Zyngier CC: References: <5a6e65cf-d2fe-0107-2318-0e3c81d57000@huawei.com> <51146530616bb8fdf23c637ff5bee44e@kernel.org> From: Dongjiu Geng Message-ID: <003822ee-c43b-9572-7a64-fda049ecb05f@huawei.com> Date: Tue, 1 Sep 2020 16:48:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <51146530616bb8fdf23c637ff5bee44e@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.140.157.78] X-ClientProxiedBy: dggeme712-chm.china.huawei.com (10.1.199.108) To dggeme755-chm.china.huawei.com (10.3.19.101) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/9/1 15:48, Marc Zyngier wrote: > Hi Dongjiu, > > In the future, please use my kernel.org address, as I don't work > for ARM anymore, and would have missed this email if I wasn't pointed > to it. > > On 2020-08-14 18:10, Dongjiu Geng wrote: >> Hi Marc, >>    In the Linux kernel, we can not adjust the  interrupt Priority, For >> all the interrupts, the interrupt Priority are fixed to 0xa0. >> In some scenarios, it needs to change the Priority. so I want to >> upstream a serie patch to support to change the Priority through >> procfs. do you agree I upstream this feature? thanks~ > > No, that's not something I would ever consider, and for multiple > reasons: > > - Linux only supports a single priority, meaning that interrupts are >   themselves aren't preemptable. Dealing with things like (pseudo) NMI >   is invasive enough, and I can't see a good reason to relax the >   single priority requirement. > > - Building on top of the above, the whole scheduler and locking model >   relies on the non-preemptable property of an interrupt. > > - I cannot see a good reason to leave the priority control to userspace. >   That's a sure recipe for userspace-controlled livelocks. > > Now, I'm sure you want to introduce this for a reason, and you are not > explaining it ("some scenarios" doesn't quite cut it). If you care to > explain these "scenarios", maybe there is something we can do. Marc, Thanks for answer. In the real-time system(RTOS), we want the timer tick irq is responded as soon as possible to trigger kernel do task schedule. Non-preemptable IRQ decreases the Real-Time Performance of Real-Time Operating System > > But please don't waste time implementing any sort of priority change, > there is no way I'll consider it as such. > > Thanks, > >         M.