Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1538373pxk; Tue, 1 Sep 2020 00:51:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUxXtI8ygsqSJ773swP2G1i1WVzsWqSp+2+dSjl7ftoFO68X+51sjOTRpXvO10DUNji1z1 X-Received: by 2002:a17:906:46d5:: with SMTP id k21mr358916ejs.247.1598946686172; Tue, 01 Sep 2020 00:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598946686; cv=none; d=google.com; s=arc-20160816; b=qBcrqFAKSemGn6MV8Wf+Pkz4zqM1NQxyxWQbirZJskKJvdwlh7rYn0bDoMAuBI3ym6 rJq22cZGtvwLfcd0kUXXeh5TVHVj4+/zIAemnys6jeNNsuXCHCc4qV/R98ndqwTSbGT7 T9h0qQU/23/MXd90Vl6ZP6L7lmROyy2x3l3Vh65zahsXoSThayZY+GujamGsfCEMauZe 7Wem5PEw26rLDzxKyK7nJQkIlWEE0aEw7khJZTQXrP0RxFar+SoyeSoibyEXUrvGsdX2 tYroNXsuyX3MNZUOHFIJyroGdn/djf9CiflU0ICd0DUPK21fezP5diysMqriLEk3JC/o WfiA== 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=6TuBWcwLw11wCVTKfmU2YBowN9pOnC3gMpOPskRoWCk=; b=sYqeuqYyGAPbHkhrsq6apFIGBFcoIX0EAS0/5M6syMJFWFunYg4S1I8WkFqZgr5EIk XtZxBfF+g+GGEUKhsNrUaY9Eh/cUGhS3ejpjWd5ryuKJVwpwC3X1T1EFDWRjEX75rBy3 2XT+EXzDCMDoxQLbHUsyaBjHYHXR7AHWgX3Vosue/LrSw/fNIU2XSq6lvawIloX/xE9h A8dkS/F6XrrVQLHW6nMrsswwCKpFXiurgyoZkPS0I+vkKYCdTPH7ck/uQ4mzwdqhEio1 jcUD5AZHDegCiGwa0CPzH68hExEzrQ7awbndxyJqLbYLYkYaXOOsR6FJjFc0xhfRCf2X In+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lek3gwvl; 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 j20si154226edt.233.2020.09.01.00.51.02; Tue, 01 Sep 2020 00:51:26 -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=lek3gwvl; 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 S1726293AbgIAHsF (ORCPT + 99 others); Tue, 1 Sep 2020 03:48:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:34676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbgIAHsE (ORCPT ); Tue, 1 Sep 2020 03:48:04 -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 15FA62068E; Tue, 1 Sep 2020 07:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598946484; bh=hMj2e4wFJknK1lax5LtgwDFzrkKqm76QV+xaVk0tjYs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lek3gwvlMfsPNSTpoieF5oIDAXBYQImxjW7gBuyg3spxlvPpK7q8N8LYcyKGhroIf uBTxZiGzlmfOo3FXbZ9Gq5n+/hnxmT2Ro3Ax4AR05ZP/ANygw4p3v6Ysir+w6+SYSE EU6ev0NuxKHr+tY0/L+xM51dH82ocKHKsl/j+hgs= 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 1kD11O-008D4p-Fr; Tue, 01 Sep 2020 08:48:02 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 01 Sep 2020 08:48:02 +0100 From: Marc Zyngier To: Dongjiu Geng Cc: linux-kernel@vger.kernel.org, linuxarm@huawei.com Subject: Re: Adjust interrupt Priority for ARM64 GIC In-Reply-To: <5a6e65cf-d2fe-0107-2318-0e3c81d57000@huawei.com> References: <5a6e65cf-d2fe-0107-2318-0e3c81d57000@huawei.com> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <51146530616bb8fdf23c637ff5bee44e@kernel.org> 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, linuxarm@huawei.com 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 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. But please don't waste time implementing any sort of priority change, there is no way I'll consider it as such. Thanks, M. -- Jazz is not dead. It just smells funny...