Message ID | 20230510162406.1955-1-jszhang@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3770406vqo; Wed, 10 May 2023 09:51:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nPj6W/WdtZ48YlaDCRLD7S2jP/eI3VN6huQzaITjUGK3USOSj9E6mSnn1ziX9ihHC8ZfZ X-Received: by 2002:a05:6a20:160e:b0:101:1008:6b84 with SMTP id l14-20020a056a20160e00b0010110086b84mr11300380pzj.8.1683737514145; Wed, 10 May 2023 09:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683737514; cv=none; d=google.com; s=arc-20160816; b=ySSNnP4Vhz5w3z6Z63oPVqoltCsxkfiN7aeDJjSdflVqwcasupuq+CPEZMQqmMpRwc Ysci76zOcM8WZbGj8WrM7RT/1SJ61z8oZDKnGaZz+SPZzxoflqofEXpXuj4m0M6Vm1st HJPJCmKLkPkcSfWePMRtPy7fRHK4xuv+9jiC5Jz2/Bvs4BnRcgsEDkF/Li2mXQ2qLdP8 PLGnjqSTVyvsxpu1wlpPuctFlbnIOGijG7tg1alVdwF53MbCtHzhPHpMhIn2qyoeSYsG 10IqwWgKddyH/FzuakaDohhRqF+5Cnj86yRTZA/Vap4rUnQQrHos/jQl2H/4dsIsgF0/ LjSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cqHiz2vjUNRDGAtCADX23igJJXGy5vRI+puw6feR/Co=; b=Z5lMTf35wyoEhoglflkoglU+RH/+mSGLHKIPbOJBQbnfn4QiuUpEjF0R377TLD2QEK hoDChEkNdvrN2yqAoP96sk+9yLAPJDui0P5xPnzG/fhb3pcvboXDCA4G+RIJ0WTprirI 4BRfm4vK8MOyCD9LywqJP5AcOnlEFfiYkuVCVciY+62q7nWmGb3iYdk1itMjcYc2BUyp HqzyXuUoTu5XbDOCLg/gMN6JpFPFBfxIxHD1ofJ17gEUK27IFpzU17yu6sBcIGaxIkkW oGcZ36yi21f0wMvIp01pLna3i+p3CBDXvaWvAYuRvG4Uo7H/xMtlRgjQXY6lvFCr5uV1 UsBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ai1fuoEk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m24-20020a637118000000b00513128cd495si4492755pgc.730.2023.05.10.09.51.40; Wed, 10 May 2023 09:51:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ai1fuoEk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235704AbjEJQfR (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Wed, 10 May 2023 12:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235624AbjEJQfP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 10 May 2023 12:35:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E914E7D99; Wed, 10 May 2023 09:35:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6C8C664A11; Wed, 10 May 2023 16:35:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF292C433D2; Wed, 10 May 2023 16:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683736512; bh=xdYYdDgbeOJh27nNgHFmZzDLEDBpmLgBjwcmj+Nf3Qo=; h=From:To:Cc:Subject:Date:From; b=Ai1fuoEkb9u4C4wGl9R2tgr/RHpVl5lsEnKBu1vH6mNsGLY/jjHm8BqcvPlUHIKQ8 eCB1lLFWH5QTU3rFLgFZiAXV5GvfucEMWbtXp+N9ChOkxUh3T8a6+BM/z4kz5qevc3 qCxqhUnaRiemW6zyiwP1enG9ewAv7kMK3dSo11CCXCZC2IuPz9tAn+2Y8M5i7m02YM IiOevP4GQDOabCnTmoL8PLPRwcOAaDrtsecp/R/kiuNtD3Qpwn5yUmE+cPoTkIgtrV F1WGS37oCrfOJUE1oTNqpGh2wrKqXVfs0QcEaz02CM7OO9lRmQ3THYBqERDPMipx8B m/wPG2pwQLLGw== From: Jisheng Zhang <jszhang@kernel.org> To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Thomas Gleixner <tglx@linutronix.de>, Schaffner Tobias <tobias.schaffner@siemens.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Arnd Bergmann <arnd@arndb.de> Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH RT 0/3] riscv: add PREEMPT_RT support Date: Thu, 11 May 2023 00:24:03 +0800 Message-Id: <20230510162406.1955-1-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765526747651312017?= X-GMAIL-MSGID: =?utf-8?q?1765526747651312017?= |
Series |
riscv: add PREEMPT_RT support
|
|
Message
Jisheng Zhang
May 10, 2023, 4:24 p.m. UTC
This series is to add PREEMPT_RT support to riscv. Compared with last try[1], there are two major changes: 1. riscv has been converted to Generic Entry. And riscv uses asm-generic/preeempt.h, so we need to patch asm-generic's preeempt to enable lazy preempt support for riscv. This is what patch1 does. However, it duplicates the preempt_lazy_count() defintion, I'm sure there must be an elegant solution. Neverless, it doesn't impact the riscv PREEMPT_RT support itself. 2. three preparation patches(patch1/2/3 in [1]) has been merged in mainline. I back-ported the lastest linux-6.3.y-rt patches to the lastest Linus tree, then cook this series. Link: https://lore.kernel.org/linux-riscv/20220831175920.2806-1-jszhang@kernel.org/ Jisheng Zhang (3): asm-generic/preempt: also check preempt_lazy_count for should_resched() etc. riscv: add lazy preempt support riscv: Allow to enable RT arch/riscv/Kconfig | 2 ++ arch/riscv/include/asm/thread_info.h | 5 ++++- arch/riscv/kernel/asm-offsets.c | 1 + include/asm-generic/preempt.h | 8 +++++++- 4 files changed, 14 insertions(+), 2 deletions(-)
Comments
On 10.05.23 18:24, Jisheng Zhang wrote: > This series is to add PREEMPT_RT support to riscv. Compared with last > try[1], there are two major changes: > > 1. riscv has been converted to Generic Entry. And riscv uses > asm-generic/preeempt.h, so we need to patch asm-generic's preeempt to > enable lazy preempt support for riscv. This is what patch1 does. > However, it duplicates the preempt_lazy_count() defintion, I'm sure > there must be an elegant solution. Neverless, it doesn't impact the > riscv PREEMPT_RT support itself. > > 2. three preparation patches(patch1/2/3 in [1]) has been merged in > mainline. > > I back-ported the lastest linux-6.3.y-rt patches to the lastest Linus tree, > then cook this series. > > Link: https://lore.kernel.org/linux-riscv/20220831175920.2806-1-jszhang@kernel.org/ Any news on this series? Are there any open tasks blocking this? I am willing to help, but do not see what's missing to get this merged. > Jisheng Zhang (3): > asm-generic/preempt: also check preempt_lazy_count for > should_resched() etc. > riscv: add lazy preempt support > riscv: Allow to enable RT > > arch/riscv/Kconfig | 2 ++ > arch/riscv/include/asm/thread_info.h | 5 ++++- > arch/riscv/kernel/asm-offsets.c | 1 + > include/asm-generic/preempt.h | 8 +++++++- > 4 files changed, 14 insertions(+), 2 deletions(-) >
On Mon, Oct 23, 2023 at 04:33:13PM +0000, Schaffner, Tobias wrote: > On 10.05.23 18:24, Jisheng Zhang wrote: > > This series is to add PREEMPT_RT support to riscv. Compared with last > > try[1], there are two major changes: > > > > 1. riscv has been converted to Generic Entry. And riscv uses > > asm-generic/preeempt.h, so we need to patch asm-generic's preeempt to > > enable lazy preempt support for riscv. This is what patch1 does. > > However, it duplicates the preempt_lazy_count() defintion, I'm sure > > there must be an elegant solution. Neverless, it doesn't impact the > > riscv PREEMPT_RT support itself. > > > > 2. three preparation patches(patch1/2/3 in [1]) has been merged in > > mainline. > > > > I back-ported the lastest linux-6.3.y-rt patches to the lastest Linus tree, > > then cook this series. > > > > Link: https://lore.kernel.org/linux-riscv/20220831175920.2806-1-jszhang@kernel.org/ > > Any news on this series? Are there any open tasks blocking this? > I am willing to help, but do not see what's missing to get this merged. Hi Thomas, Sebastian could you please review? Any comments are appreciated. or do you want a rebase on linux-6.5.y-rt? Thanks > > > Jisheng Zhang (3): > > asm-generic/preempt: also check preempt_lazy_count for > > should_resched() etc. > > riscv: add lazy preempt support > > riscv: Allow to enable RT > > > > arch/riscv/Kconfig | 2 ++ > > arch/riscv/include/asm/thread_info.h | 5 ++++- > > arch/riscv/kernel/asm-offsets.c | 1 + > > include/asm-generic/preempt.h | 8 +++++++- > > 4 files changed, 14 insertions(+), 2 deletions(-) > > >
On 2023-10-24 00:40:20 [+0800], Jisheng Zhang wrote: > Hi Thomas, Sebastian > > could you please review? Any comments are appreciated. or do you want a > rebase on linux-6.5.y-rt? Please resend on top of latest v6.6-RT. Lazy preempt is gone so only PREEMPT_RT config switch remains from your three patch series. If you have generic-entry then you could use the new PREEMPT_AUTO. Are there any reports of this booting without warnings with LOCKDEP and CONFIG_DEBUG_ATOMIC_SLEEP enabled? I remember there was something earlier. > Thanks Sebastian
On Tue, Oct 24, 2023 at 08:18:52AM +0200, Sebastian Andrzej Siewior wrote: > On 2023-10-24 00:40:20 [+0800], Jisheng Zhang wrote: > > Hi Thomas, Sebastian > > > > could you please review? Any comments are appreciated. or do you want a > > rebase on linux-6.5.y-rt? > > Please resend on top of latest v6.6-RT. Lazy preempt is gone so only > PREEMPT_RT config switch remains from your three patch series. If you > have generic-entry then you could use the new PREEMPT_AUTO. Hi Sebastian, Thank you so much for pointing out PREEMPT_AUTO, I read the discussions last weekend, glad to know PREEMPT_AUTO. And riscv has switched to generic entry, so it's easy to support PREEMPT_AUTO for riscv. V2 was sent out a few mintues ago. Could you please review? > > Are there any reports of this booting without warnings with LOCKDEP and > CONFIG_DEBUG_ATOMIC_SLEEP enabled? I remember there was something > earlier. IIRC, Conor reported the warning and stack trace is ext4 related. But I didn't reproduce the warning. And Schaffner also tried the series but it seems he didn't see the warning either. So I'm asking for Conor's help to retry v2. Thanks > > > Thanks > > Sebastian
On 2023-10-31 22:43:52 [+0800], Jisheng Zhang wrote: > Hi Sebastian, Hi Jisheng, > Thank you so much for pointing out PREEMPT_AUTO, I read the discussions > last weekend, glad to know PREEMPT_AUTO. And riscv has switched to > generic entry, so it's easy to support PREEMPT_AUTO for riscv. V2 was > sent out a few mintues ago. Could you please review? Sure. I have no idea what the upstream status about PREEMPT_AUTO but I think we want this. > > Are there any reports of this booting without warnings with LOCKDEP and > > CONFIG_DEBUG_ATOMIC_SLEEP enabled? I remember there was something > > earlier. > > IIRC, Conor reported the warning and stack trace is ext4 related. But > I didn't reproduce the warning. And Schaffner also tried the series > but it seems he didn't see the warning either. So I'm asking for Conor's > help to retry v2. oki. > Thanks Sebastian