Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1075677pxj; Fri, 21 May 2021 06:02:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCdHZutLBPZ4yz94e6Wg7rnc1lYs4owsN5vZiFayg5uq+C1pRHF+SqGo7C85BzIBwMrES+ X-Received: by 2002:a17:906:c01a:: with SMTP id e26mr10291761ejz.300.1621602152732; Fri, 21 May 2021 06:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621602152; cv=none; d=google.com; s=arc-20160816; b=zl/4l/pngJ2dd+BB4lpl2pIhiJaXdPlaYK6U1b+xzAzovunBysqHpa3j/veQI+MPs/ JNt+GXCN6+NRTJUVyfw5moviW4+YP4zPsabUYx8YA3n1o5fYBF7EZ8DpEoP3i4ePKGc9 7b+KUR6CFVl1llGk7/H++fRaUca3H5r4KRqVWWTHIoRX78CszfxtJwks5PnRH//76HLA k2cCZaUwnLUYmnhDg2hBx7FnoCdLEzyZwY2xqJB4Ru2SH8BA+dBsN8gVN0f/TLiHQ5rU 5PeeW7SLuegGGBxeuE/w13IetbGcuQqo+k90uTTXNTOUiRO483+lB0nlIr840ePFt8pq uUiA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1nVuBjFNDltRdfTPJhIv6EHgW+4kAG8aHsavxlHPtJc=; b=VwHrMdI4gGv906wkKf3gUXnf3+nsplOlVhWi9mahwf+Dy32z1uWbHKmnsSMFDUNHsW nPPNyFnHyWpm2q0h967/RQ6TSmkQ2G5jtQ/VDDrmKMrwXRPBVS40G+W21C1rS78/wA0K m0hjpBHRj5KNl53vDLbkgLOm1EEG0MSOW/9lk/h8TntQzSAjtGXBBua4VUVQ7vNlxz02 4x5XzUcrK/oYSiQoaUGu1TET+cbDjQ0bPqRaVl6EgJH6eKOMP3QwHmiRM1O7Upm4vKi5 Bn1tQABLOHVl3Gwq6VZfslUAxTJ+9Zb20bBik92riFwHXtWhyB+sHH/WOMM2nprduiut z5iQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si5532438edb.244.2021.05.21.06.02.08; Fri, 21 May 2021 06:02:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232170AbhEUNCa (ORCPT + 99 others); Fri, 21 May 2021 09:02:30 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:48464 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhEUNC2 (ORCPT ); Fri, 21 May 2021 09:02:28 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 2.0.5) id 510932329d31bd57; Fri, 21 May 2021 15:01:04 +0200 Received: from kreacher.localnet (89-64-82-20.dynamic.chello.pl [89.64.82.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 701CD6696D3; Fri, 21 May 2021 15:01:03 +0200 (CEST) From: "Rafael J. Wysocki" To: viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, kyle.meyer@hpe.com Cc: Kyle Meyer Subject: Re: [PATCH] acpi-cpufreq: Skip initialization if a cpufreq driver exists Date: Fri, 21 May 2021 15:01:02 +0200 Message-ID: <4656572.31r3eYUQgx@kreacher> In-Reply-To: <20210518193455.192796-1-kyle.meyer@hpe.com> References: <20210518193455.192796-1-kyle.meyer@hpe.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 89.64.82.20 X-CLIENT-HOSTNAME: 89-64-82-20.dynamic.chello.pl X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrvdejfedgiedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvjeelgffhiedukedtleekkedvudfggefhgfegjefgueekjeelvefggfdvledutdenucfkphepkeelrdeigedrkedvrddvtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekledrieegrdekvddrvddtpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhrtghpthhtohepvhhirhgvshhhrdhkuhhmrghrsehlihhnrghrohdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehkhihlvgdrmhgvhigvrheshhhpvgdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, May 18, 2021 9:34:55 PM CEST kyle.meyer@hpe.com wrote: > From: Kyle Meyer > > Revert part of commit 75c0758137c7a > ("acpi-cpufreq: Fail initialization if driver cannot be registered"). > > acpi-cpufreq is mutually exclusive with intel_pstate, however, > acpi-cpufreq is loaded multiple times during startup while intel_pstate is > enabled. On systems using systemd the kernel triggers one uevent for each > device as a result of systemd-udev-trigger.service. The service exists to > retrigger all devices as uevents sent by the kernel before systemd-udevd > is running are missed. The delay caused by systemd-udevd repeatedly loading > the driver, getting a fail return, and unloading the driver twice per > logical CPU has a significant impact on the startup time, and can cause > some devices to be unavailable after reaching the root login prompt. > > Load the driver once but skip initialization if a cpufreq driver exists by > changing the return value of cpufreq_get_current_driver() from -EEXIST to > 0. > > Signed-off-by: Kyle Meyer > --- > drivers/cpufreq/acpi-cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c > index 7e7450453714..e79a945369d1 100644 > --- a/drivers/cpufreq/acpi-cpufreq.c > +++ b/drivers/cpufreq/acpi-cpufreq.c > @@ -1003,7 +1003,7 @@ static int __init acpi_cpufreq_init(void) > > /* don't keep reloading if cpufreq_driver exists */ > if (cpufreq_get_current_driver()) > - return -EEXIST; > + return 0; > > pr_debug("%s\n", __func__); > > Please resend this with CCs to linux-pm@vger.kernel.org and linux-acpi@vegr.kernel.org. Thanks!