From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A122BC3DA7A for ; Fri, 6 Jan 2023 14:53:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235426AbjAFOxZ (ORCPT ); Fri, 6 Jan 2023 09:53:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235376AbjAFOxD (ORCPT ); Fri, 6 Jan 2023 09:53:03 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F5CA831AC for ; Fri, 6 Jan 2023 06:53:02 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id bs20so1484807wrb.3 for ; Fri, 06 Jan 2023 06:53:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Fb113jvJzDpaLqkQd+chLk6YPOzvbAerk9emcElPRW8=; b=B9roCgNZ3+rIt6kkae9X8ldsFIGgC5Y/LAJrfN6RaNxbpKJwarDRvWjcsthOsW5+Bq CZVLxCmGkTzXy4WZW2gayuF1H0oWfNyb/fmrCE0YkIupIyvB8spgVEi2Ryh6/t/qWuXj cw2vs9mA0ucXzSA1iYpvpqf81mMRBudFtUvjDpQcfAwAselfjEIYq+oML/OV1Q3dArKD qZnwPFhsX37pAhhQBulKY4z3CyDONPfL1lSj/xxuOQgmI3JRjkw7+8n19V7AMhjqnQt4 +2PAfu2Cx7XXebcWFMLl5763smmXHnTxqLChksC3PYTkBGlwBOlBI32eUOD8Pqd/UAMs aP0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fb113jvJzDpaLqkQd+chLk6YPOzvbAerk9emcElPRW8=; b=P32wy1UU408LzNV0ZFCUl7yChvk38g3/R85hC643PkyH2d+SvlwAU1cwoObJId23kE oba7f3sDLebj6Kb79DNG0OYUz5LWgZZDwP3GTZpVOiFayf8rpCsJcU5ClTU54vx/EMbO WA3y/rEzg5IuG/koVlJesRualkJ/op8Xt4uRygSi+TEGLguBqPpnyH400buOGflBDlDt dBTtTJGnk5aEm3Q3AfQkDcl4GlmaeJEZXqP8YS1jm5t3zUGqzlFKUmz7YYzTEgnKx0Iu Zw6fn/YukyRGO6cwbvmN4cduBpbPSdPYruWQ9Mb6HbLMxJ5H9qGuibGNSrAsIfbzrwVa 4ikA== X-Gm-Message-State: AFqh2koSKWnv0pTzZggqf34/S4nVOd7jAmyjS44xhl59qv9q4jHJ2y4j 5mlXfi5+5P+AqNJa6qY0tyR98Q== X-Google-Smtp-Source: AMrXdXvv0m7kio2W55PZZW8SweXh/614tgLKinx4xscU4tnyjQfdaGyNgovQo1p45Ysx0bmcjLxFfw== X-Received: by 2002:a5d:5002:0:b0:28c:d89c:ae48 with SMTP id e2-20020a5d5002000000b0028cd89cae48mr18919200wrt.41.1673016780950; Fri, 06 Jan 2023 06:53:00 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id b1-20020adf9b01000000b0028e55b44a99sm1322146wrc.17.2023.01.06.06.52.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 06:53:00 -0800 (PST) Message-ID: <9771639f-5172-8f3b-3ce6-8fd195aa95b3@linaro.org> Date: Fri, 6 Jan 2023 15:52:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2 1/5] PM: domains: Add GENPD_FLAG_RT_SAFE for PREEMPT_RT Content-Language: en-US To: Ulf Hansson Cc: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , Kevin Hilman , Daniel Lezcano , Lorenzo Pieralisi , Sudeep Holla , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Adrien Thierry , Brian Masney , linux-rt-users@vger.kernel.org References: <20221219151503.385816-1-krzysztof.kozlowski@linaro.org> <20221219151503.385816-2-krzysztof.kozlowski@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/01/2023 16:45, Ulf Hansson wrote: > On Mon, 19 Dec 2022 at 16:15, Krzysztof Kozlowski > wrote: >> >> Realtime kernels with PREEMPT_RT must use raw_spinlock_t for domains >> which are invoked from CPU idle (thus from atomic section). Example is >> cpuidle PSCI domain driver which itself is PREEMPT_RT safe, but is being >> called as part of cpuidle. > > Just so I don't get this wrong, since the cpuidle-psci also calls > pm_runtime_* functions so it isn't PREEMPT_RT safe, at least not yet? You are correct. Patch 3 here addresses it by... just not doing runtime PM. This is a hacky workaround but: 1. I don't have any other idea, 2. It's not a big problem because RT systems are not supposed to have any CPU idle (one of first things during RT system tuning is to disable cpuidle). > >> >> Add a flag allowing a power domain provider to indicate it is RT safe. >> The flag is supposed to be used with existing GENPD_FLAG_IRQ_SAFE. >> >> Cc: Adrien Thierry >> Cc: Brian Masney >> Cc: linux-rt-users@vger.kernel.org >> Signed-off-by: Krzysztof Kozlowski > > For genpd, overall, I think this looks like an okay approach to me. > Although, let me check the whole series (I need some more time to do > that) before I give this my blessing. Sure, we are all have too many mails in inbox. :) Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FEFEC3DA7A for ; Fri, 6 Jan 2023 14:54:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p7xs8Jm726RRRabgRaMickd3Eo5VlA8POkQjjYQicgs=; b=Djo37GY5fXsRFG jTKRCeR+QbyigiPGawGqMLzLvJcAdP+TWXk1Gan0I9y2BUhPa6YSku0D12DW4lag+aCZYOq6nseAu TDC+VH1L6fYV4XR7n7isrfTDFoPdYRbaKMN8Uv+jgHB4szXNn1yYlLkT/oEhdnkxtFPZLw/8U3H0/ 6Cs5jkpbimOB5YKncX11u+uqQnpoUR13jLaVNdx1QlgrAYv/mvYXPDBzSNZIvFYwJQhkK7jXvAdbY 5CfztWRXMonLMDWRB4vsCwFy3i5cH1+9CU3C6+EBWBanUZplPAlXWNA+ILW1ucrU3dcSgT3TiaEDT PTgKoZkcCCgzmZgO5mHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDo5j-008x4d-LW; Fri, 06 Jan 2023 14:53:07 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDo5g-008x1t-Js for linux-arm-kernel@lists.infradead.org; Fri, 06 Jan 2023 14:53:06 +0000 Received: by mail-wr1-x42e.google.com with SMTP id bn26so1503864wrb.0 for ; Fri, 06 Jan 2023 06:53:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Fb113jvJzDpaLqkQd+chLk6YPOzvbAerk9emcElPRW8=; b=B9roCgNZ3+rIt6kkae9X8ldsFIGgC5Y/LAJrfN6RaNxbpKJwarDRvWjcsthOsW5+Bq CZVLxCmGkTzXy4WZW2gayuF1H0oWfNyb/fmrCE0YkIupIyvB8spgVEi2Ryh6/t/qWuXj cw2vs9mA0ucXzSA1iYpvpqf81mMRBudFtUvjDpQcfAwAselfjEIYq+oML/OV1Q3dArKD qZnwPFhsX37pAhhQBulKY4z3CyDONPfL1lSj/xxuOQgmI3JRjkw7+8n19V7AMhjqnQt4 +2PAfu2Cx7XXebcWFMLl5763smmXHnTxqLChksC3PYTkBGlwBOlBI32eUOD8Pqd/UAMs aP0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fb113jvJzDpaLqkQd+chLk6YPOzvbAerk9emcElPRW8=; b=iC3g5XmPHIL0iPeo4/kvEhb/DZZRcUW8XZzsCLn5nj65vXQ1vyH0qqT1HD80PbEtQG L79KnuVy1i95kwHtCkpqeCpK1X3WbPaUsZKnOkiBA9rd2h91H4EUcMLMGoZ1PjNQBwu2 iOxi5176ehDi0tSSR1p5xfddb1sLxJ+ZDjEaynBkAutiWv0QpwWT3TDucg+VKyM2m6xU okk6c5oPl7WyBb0hibyBIYro37bZi46X2gi1gOQEPGwKFd+Qpj4idhChDUyJvzQuoqAE X1tBqnbYo8eqoLHjNCs94UTbJb2Bp9hr3i0qGIVEdrAHsY9+qXa6FQkkRVEO1HL88vL3 1tKw== X-Gm-Message-State: AFqh2kokcpaRVpmcFWDfLNGW6P4gqTKEMUtToYaz1RH36oQV5EwGtIwA +CkU0fY88PBUVDzBgf8XJx2Mkw== X-Google-Smtp-Source: AMrXdXvv0m7kio2W55PZZW8SweXh/614tgLKinx4xscU4tnyjQfdaGyNgovQo1p45Ysx0bmcjLxFfw== X-Received: by 2002:a5d:5002:0:b0:28c:d89c:ae48 with SMTP id e2-20020a5d5002000000b0028cd89cae48mr18919200wrt.41.1673016780950; Fri, 06 Jan 2023 06:53:00 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id b1-20020adf9b01000000b0028e55b44a99sm1322146wrc.17.2023.01.06.06.52.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 06:53:00 -0800 (PST) Message-ID: <9771639f-5172-8f3b-3ce6-8fd195aa95b3@linaro.org> Date: Fri, 6 Jan 2023 15:52:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2 1/5] PM: domains: Add GENPD_FLAG_RT_SAFE for PREEMPT_RT Content-Language: en-US To: Ulf Hansson Cc: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , Kevin Hilman , Daniel Lezcano , Lorenzo Pieralisi , Sudeep Holla , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Adrien Thierry , Brian Masney , linux-rt-users@vger.kernel.org References: <20221219151503.385816-1-krzysztof.kozlowski@linaro.org> <20221219151503.385816-2-krzysztof.kozlowski@linaro.org> From: Krzysztof Kozlowski In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230106_065304_762107_60C3BAB8 X-CRM114-Status: GOOD ( 17.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 04/01/2023 16:45, Ulf Hansson wrote: > On Mon, 19 Dec 2022 at 16:15, Krzysztof Kozlowski > wrote: >> >> Realtime kernels with PREEMPT_RT must use raw_spinlock_t for domains >> which are invoked from CPU idle (thus from atomic section). Example is >> cpuidle PSCI domain driver which itself is PREEMPT_RT safe, but is being >> called as part of cpuidle. > > Just so I don't get this wrong, since the cpuidle-psci also calls > pm_runtime_* functions so it isn't PREEMPT_RT safe, at least not yet? You are correct. Patch 3 here addresses it by... just not doing runtime PM. This is a hacky workaround but: 1. I don't have any other idea, 2. It's not a big problem because RT systems are not supposed to have any CPU idle (one of first things during RT system tuning is to disable cpuidle). > >> >> Add a flag allowing a power domain provider to indicate it is RT safe. >> The flag is supposed to be used with existing GENPD_FLAG_IRQ_SAFE. >> >> Cc: Adrien Thierry >> Cc: Brian Masney >> Cc: linux-rt-users@vger.kernel.org >> Signed-off-by: Krzysztof Kozlowski > > For genpd, overall, I think this looks like an okay approach to me. > Although, let me check the whole series (I need some more time to do > that) before I give this my blessing. Sure, we are all have too many mails in inbox. :) Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel