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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74088C433E5 for ; Wed, 24 Mar 2021 09:40:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FEDF619FF for ; Wed, 24 Mar 2021 09:40:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236270AbhCXJjt (ORCPT ); Wed, 24 Mar 2021 05:39:49 -0400 Received: from foss.arm.com ([217.140.110.172]:59172 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236174AbhCXJjY (ORCPT ); Wed, 24 Mar 2021 05:39:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ADF711FB; Wed, 24 Mar 2021 02:39:23 -0700 (PDT) Received: from [10.57.25.74] (unknown [10.57.25.74]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 52C343F718; Wed, 24 Mar 2021 02:39:22 -0700 (PDT) Subject: Re: [PATCH] PM / EM: postpone creating the debugfs dir till fs_initcall To: "Rafael J. Wysocki" Cc: Greg KH , Linux Kernel Mailing List , Linux PM , "Rafael J. Wysocki" , Ionela Voinescu , Dietmar Eggemann References: <20210323145608.29832-1-lukasz.luba@arm.com> <39cee1e7-c085-88d2-9b3b-e4ffbbee04eb@arm.com> From: Lukasz Luba Message-ID: Date: Wed, 24 Mar 2021 09:39:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/23/21 6:55 PM, Rafael J. Wysocki wrote: > On Tue, Mar 23, 2021 at 4:57 PM Lukasz Luba wrote: >> >> >> >> On 3/23/21 3:26 PM, Greg KH wrote: >>> On Tue, Mar 23, 2021 at 02:56:08PM +0000, Lukasz Luba wrote: >>>> The debugfs directory '/sys/kernel/debug/energy_model' is needed before >>>> the Energy Model registration can happen. With the recent change in >>>> debugfs subsystem it's not allowed to create this directory at early stage >>>> (core_initcall). Thus creating this directory would fail. >>>> Postpone the creation of the EM debug dir to later stage: fs_initcall. >>>> It should be safe since all clients: CPUFreq drivers, Devfreq drivers will >>>> be initialized in later stages. >>>> The custom debug log below prints the time of creation the EM debug dir at >>>> fs_initcall and successful registration of EMs at later stages. >>>> >>>> [ 1.505717] energy_model: creating rootdir >>>> [ 3.698307] cpu cpu0: EM: created perf domain >>>> [ 3.709022] cpu cpu1: EM: created perf domain >>>> >>>> fixes: 56348560d495 ("debugfs: do not attempt to create a new file before the filesystem is initalized") >>>> Reported-by: Ionela Voinescu >>>> Signed-off-by: Lukasz Luba >>>> --- >>>> Hi Rafael, >>>> >>>> Please take this patch into your PM v5.12 fixes. The change described in >>>> the patch above landed in v5.12-rc1. Some of our EAS/EM tests are failing. >>> >>> Reviewed-by: Greg Kroah-Hartman >>> >> >> Thank you Greg! > > Applied as 5.12-rc material, thanks! > Thank you Rafael! Regards, Lukasz