From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EF261FBBE9 for ; Mon, 13 Jan 2025 15:09:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736780985; cv=none; b=Zcvy8atyvtSAbQ/wHUYdH43LIubVPy6yoOOxl7xqewh0Wa7P7wJDJpcig/w5BXNL2p1OenfkVbHbCZto67iHny16XzObrf2tc1k0giF4uMzYhrzfh3e/xbNUOfvBdM7yuRHkd8wwxmyKo43sbPOYW1OzoUu4Dva5nYOn0doVHEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736780985; c=relaxed/simple; bh=OwLnHCJynr95k/kX6V+mfQ9V35Pl4/BkweNr5tAn2hI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=jCj+srAHX3h7GWQLRwYF/yQRqUqihY5o9cIMEu6B0dUYa3AGriIlTlhPK6iuOM7W74YWu5zrAz/M/FeXTsimp9C4p5savsbzXLE5XNr26wiuYBVyE45aemdn+E/Jelzn2T/Qe/WdKS2SfoRMzpxr3MT9Jl6oFkkuQ62GzkMu7ls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=YnMFRYcE; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="YnMFRYcE" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2ee9a780de4so5587410a91.3 for ; Mon, 13 Jan 2025 07:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1736780982; x=1737385782; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3JEPYZ3CZiadv0FeVqn0tgGKX/a2pKv6MMDJV6fcEyY=; b=YnMFRYcEQCUo7rBANdrRVYhk0djPV+ldPOME4bUr9BsgGA9QKErgWQ2XzbnHgrCoLN MpSJTuXHYP5GMfSeyJ/QZOLB1SwuCwyMB6USeT//lputwUYNz+rLHmg5kENqQAt+OrPD XHKxQS4KfJoR1akbUvErxmlavCq2pgq1k03GPyjcS2yz1gKBKCGKr7/y8RAwl0toLsGh EnPsBHMQ8kj+I7WysMhxztu3HVUF3mooEKxLcR3i66imA19OKwwVGD40dgAkbvvqNx9e JYC1YLGh1x1crlAVTp66aE7l5t/T70OUqbK3AzzfdoaqSONZQTLnEY7zZkJ+t9w1ujDQ p6Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736780982; x=1737385782; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3JEPYZ3CZiadv0FeVqn0tgGKX/a2pKv6MMDJV6fcEyY=; b=qqZyLV8a/Bpy5RdbJfsZUcOa9mFGUYs0jgPlknavWJpiQY+h71awCGm4tx7uDELHAB URaHgIg88MuvaTHkRRXMBOgTHU1gmtDNx6KL7E+s1BjzXWeny9TrgcTSenYX2JKTki/w 1b4na91TmEPcJOIFrGRiQg3eQSRQxSaBuhm+eFfhQHJNW4gAzRNwPro5iJ+UlHPzvcMZ aL3Nljn8DfKJKM14ChWS7Xvqy76gDUoUyvZqegynhKYR8iNiwAovjE+/VWsQPWHncXVZ YL9AGCQCsLRhDVmBDh/dDrUhwL5tXEcIXzo7EsBOQpbTD4KB8DKay4LUO2bnqpwGSnVW VPtQ== X-Forwarded-Encrypted: i=1; AJvYcCX6lmpn17Q/7AnTINdD9esOLguiLT+nrFibhvkH4KDplQpcy8YFCB6e0Gd5OjykEjqFjGkutsMUAZxyQC0=@vger.kernel.org X-Gm-Message-State: AOJu0YyUwe1QeFkg7K7PMt5WdKmScC0T+Ei+PlP33HWWk6ZDpm30av3o 1ItgNc+9jX0Mtrh0ekGlKTg/bwHTe8ctZOnCKsyeK8dZi4XxEBIlVkD2QJsor2YFyX3WX2NLw2U dzUY= X-Gm-Gg: ASbGncutwNpcmz1UI+NWfPmIfXkXaxM/flyaRtnmR4PM3Kng12TlhCYWLNJQrmi/xBG y6Xp8QmoO4b92o+awpDT23my6eFzve9kJecTarotV/cyRoHoILsn87HNODm1oxempBhWcIEfMjc eF6gKHQWs9KJHsRsKu56Xq3+5L2QvGtVuOEUN8u5RJz5kMwD5TBl2XkwsWl3v+OS8gGR16aXvN3 e/lESbDDJcAEQq7lh0YNTaDvJq2fvevFDEmQIxW1o6W4wRRmPu732kEqdvRELD3hqF63/XcvofU EX8HwOHAHCBQwei+jgRbl5mVbLDDIKeDSMuDuVY= X-Google-Smtp-Source: AGHT+IEMX3JioaPcwbiF7eb4hzjcn+zIMS4w8BKcU/Z/uA0ebbyNORLjUYR7QiCS4H2LK8soZskKhA== X-Received: by 2002:a17:90b:5446:b0:2ee:44ec:e524 with SMTP id 98e67ed59e1d1-2f548f7d212mr29923350a91.35.1736780982257; Mon, 13 Jan 2025 07:09:42 -0800 (PST) Received: from J9GPGXL7NT.bytedance.net ([61.213.176.56]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f54a26ae2fsm10193120a91.9.2025.01.13.07.09.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Jan 2025 07:09:41 -0800 (PST) From: Xu Lu To: daniel.lezcano@linaro.org, tglx@linutronix.de, anup@brainfault.org, paul.walmsley@sifive.com, palmer@dabbelt.com Cc: lihangjing@bytedance.com, xieyongji@bytedance.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Xu Lu Subject: [PATCH 0/5] riscv: irqchip: Optimization of interrupt handling Date: Mon, 13 Jan 2025 23:09:28 +0800 Message-Id: <20250113150933.65121-1-luxu.kernel@bytedance.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series provides some optimization for the existing interrupt handling procedure. First, it tries to make a balance between interrupt priority and fairness to avoid interrupts with lower priority get starved. Also, it inserts barriers to ensure the order between normal memory writes and IPI issuing. Xu Lu (5): irqchip/riscv-intc: Balance priority and fairness during irq handling irqchip/riscv-imsic: Add a threshold to ext irq handling times irqchip/riscv-imsic: Use wmb() to order normal writes and IPI writes irqchip/timer-clint: Use wmb() to order normal writes and IPI writes irqchip/aclint-sswi: Use wmb() to order normal writes and IPI writes drivers/clocksource/timer-clint.c | 6 ++++ drivers/irqchip/irq-riscv-imsic-early.c | 37 +++++++++++++------- drivers/irqchip/irq-riscv-intc.c | 32 +++++++++++++---- drivers/irqchip/irq-thead-c900-aclint-sswi.c | 6 ++++ 4 files changed, 62 insertions(+), 19 deletions(-) -- 2.20.1