Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1575918pxk; Tue, 1 Sep 2020 02:09:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2WKGkAKDu1myhvfDl2BOl2o5GbPANSysYKhatXgY4UeeUp6W+jdCF6eh2QqpgLmLTm09l X-Received: by 2002:a17:906:b09:: with SMTP id u9mr619895ejg.76.1598951357959; Tue, 01 Sep 2020 02:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598951357; cv=none; d=google.com; s=arc-20160816; b=ySZL89QqQmOznUuc8WdiypQ7rG2vU9QNt9Rr9hX+3nx6Hmf5T97J2g5C9TSq1J2LJa 3JCyziB12EoDFltPf9NufwllqE+FGkX6+80T67tnb2y11B4qdDZpu+eYhLjXypsVHzdo 7FI/VAm8eLgnm0jxDwRxI2Y46jpuJksT+fDD04Y8iyYjzZcRkHvgy99Uh2Hy+XM7m6IO 0Bp3h7qj00ORieOeDW0b32ayNTx5XqRntfGEMJgN4CH7BznCds7BuTnpJeUOiSO/HlPo NIy+hFGM52TAZXnUC0u2vWyayAVmGvWRqvjYaznjqilHIA0cRXch54UXA9o5ry4zNgYR rsEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=F8q9ul610cdfNSzlzzId/XpKveTdhWND9/PnLtoUgT0=; b=YEx+l2HrZ8IlpQ7bwrTo0WylbZZhJUzkieNIRt4n/SyMafYp3TBnmo6VHBvA3wVSV5 PCSjvVBrNXPKDpcEIhOUvKfJaUaa9OdiN+jZECt2zpPNy72Yyet+ZDs6bqeVNzr3IpQ3 fTjaamIV3QMNITpjQNMbOHQaFgqkQQXrox26cxqEW7+NqOzXU4P6wZro++w4bNFesBNZ CvkiKnrD8yjRNJYvZ3CPkN3KARwsWtfsFN+LvmlhlWGCTr8naU8iZwHAkLC14kTT0Wpt 80b9Aoso+tkUVo09JaYagWnzzAPlGD14Plq/dQfoxLN8bUgZp1FVOP3s6vaWhvsBhsmf 830A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ECI3sIDz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si335619ejh.15.2020.09.01.02.08.54; Tue, 01 Sep 2020 02:09:17 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ECI3sIDz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbgIAJGK (ORCPT + 99 others); Tue, 1 Sep 2020 05:06:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:37616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbgIAJGJ (ORCPT ); Tue, 1 Sep 2020 05:06:09 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89BE520866; Tue, 1 Sep 2020 09:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598951168; bh=x7UgaVEtn7LcKQh+v7eI7xv4Z3XN3zYAoRRb1ZIt3uk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ECI3sIDzwemAFk1AF06m2yM8vxOrxCc0wX4+yaqfW0m7s4wKm4xYZUYJNJ4bhaCi5 P/4glFhj1AZZSuCkPx/xcr13uAYsZuHWalLEHjfngPgeSAz2ei2Z9Kv1GZ2BGXp/xi NuHuZJ566H9WFVOq3wQXgO5LqBnH0RQ4Hj+BuLcI= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kD2Ew-008E6T-RI; Tue, 01 Sep 2020 10:06:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 01 Sep 2020 10:06:06 +0100 From: Marc Zyngier To: Dongjiu Geng Cc: linux-kernel@vger.kernel.org Subject: Re: Adjust interrupt Priority for ARM64 GIC In-Reply-To: <003822ee-c43b-9572-7a64-fda049ecb05f@huawei.com> References: <5a6e65cf-d2fe-0107-2318-0e3c81d57000@huawei.com> <51146530616bb8fdf23c637ff5bee44e@kernel.org> <003822ee-c43b-9572-7a64-fda049ecb05f@huawei.com> User-Agent: Roundcube Webmail/1.4.8 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: gengdongjiu@huawei.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-01 09:48, Dongjiu Geng wrote: > 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 Giving the timer a higher priority doesn't solve anything, really. It just papers over the fact that you are not using threaded interrupts. You also don't explain how you plan to change the scheduler and the whole locking infrastructure to cope with nesting interrupts in the general case. I would suggest you use PREEMPT-RT, where all interrupts are threaded and thus preemptable. M. -- Jazz is not dead. It just smells funny...