Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp434238ima; Wed, 6 Feb 2019 02:34:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IZYfT5aGncPsfllE+szzfIE2I+HQk9apJdhHZIw2Q4x741JI+p9S2mXRZRpXLDM2fL9QwiR X-Received: by 2002:a62:e0d8:: with SMTP id d85mr9661000pfm.214.1549449261682; Wed, 06 Feb 2019 02:34:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549449261; cv=none; d=google.com; s=arc-20160816; b=MPdnrwtBexvUCbtj2of05Eo03yBTBAo214PZIA8FylbHyZ/jc6qGw6Cg7jJRcgQlkI E46DtwwvP39oW79gUaODunBiAECkKGd7l0qQMPkDg6JQLqeO2upG7/v81F4Qx46D2ee4 T8d5k6tvWTXf/La0KkCg/ZCRCcfRX7bxWMt3LMr4G5e5ndCZUWSOZS5APO/nV1OATMv/ Webm+l7ikYkBKXh3d8uQ30Als4CDfK1y7okoe/gXD2Se7bg7UYgiO1S2sO9QrnadiAdu 6Y2/ei4/RYF4jFtuGtS0WD4QCniaEGRFfL4RFKbdQ8qKXdYkwrWGbULxWTjkJ2noMJFF AVsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xDp46tfcRjjWQrcnAkLZv/tWGWgxKj9ezZqfEu6E8Ww=; b=alBvNrK38lfxBGWlxDozrZ2ITp5CMwD6msfUM7AkS3NZpjg52K09c2fBzoyJp9hj96 6qAgdm0N2Uq+5zy4Dd+wmlUt6MJY9mngjBvaP6HR1Ll/q0iKAR8ufvhs/DACE+WcKn6E YAfTFDvJZS5OveDA/zHqO8CcJfnUswkZK6dap9jkmTf7k7JOpqjz5LJKNMYMXhM9bAMi /PkUmiEYey0hxoYC2kFOK4s2ZkFs+KwHlkvcAlqZogbb618tyMSH87EPi9iUfAy7cfXc ZB3j34pvpLlLT+g7JwsaA9s7jQtXhRhfYchbMKs6ggU61LJmaZMvURexWmkT0l0ZtFOD DPIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c22si1954768pgb.254.2019.02.06.02.34.06; Wed, 06 Feb 2019 02:34:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729012AbfBFKcV (ORCPT + 99 others); Wed, 6 Feb 2019 05:32:21 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:45562 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726835AbfBFKcU (ORCPT ); Wed, 6 Feb 2019 05:32:20 -0500 Received: from 79.184.254.36.ipv4.supernova.orange.pl (79.184.254.36) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id 183ab34d8a3d8790; Wed, 6 Feb 2019 11:32:17 +0100 From: "Rafael J. Wysocki" To: Sudeep Holla Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Jisheng Zhang , Steve Longerbeam , Eugeniu Rosca , Joshua Frkuska , Greg Kroah-Hartman Subject: Re: [RFC PATCH] drivers core: cpu: add hotplug callback to update cpu_dev state to resumed Date: Wed, 06 Feb 2019 11:31:04 +0100 Message-ID: <2477683.mi0XWuPk1d@aspire.rjw.lan> In-Reply-To: <20190204153720.GA24131@e107155-lin> References: <20190125130701.GA855@vmlxhi-102.adit-jv.com> <20190131160559.GA32759@e107155-lin> <20190204153720.GA24131@e107155-lin> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, February 4, 2019 4:37:20 PM CET Sudeep Holla wrote: > On Thu, Jan 31, 2019 at 04:05:59PM +0000, Sudeep Holla wrote: > > On Thu, Jan 31, 2019 at 12:48:49AM +0100, Rafael J. Wysocki wrote: > > > On Friday, January 25, 2019 4:09:06 PM CET Sudeep Holla wrote: > > > > The sysfs for the cpu caches are managed by adding devices with cpu > > > > as the parent in cpu_device_create() when secondary cpu is brought > > > > onlin. Generally when the secondary CPUs are hotplugged back is as part > > > > of resume from suspend-to-ram, we call cpu_device_create() from the cpu > > > > hotplug state machine while the cpu device associated with that CPU is > > > > not yet ready to be resumed as the device_resume() call happens bit later. > > > > It's not really needed to set the flag is_prepared for cpu devices are > > > > they are mostly pseudo device and hotplug framework deals with state > > > > machine and not managed through the cpu device. > > > > > > > > This often results in annoying warning when resuming: > > > > Enabling non-boot CPUs ... > > > > CPU1: Booted secondary processor > > > > cache: parent cpu1 should not be sleeping > > > > CPU1 is up > > > > CPU2: Booted secondary processor > > > > cache: parent cpu2 should not be sleeping > > > > CPU2 is up > > > > .... and so on. > > > > > > > > Just fix the warning by updating the device state quite early. > > > > > > > > Cc: "Rafael J. Wysocki" > > > > Reported-by: Jisheng Zhang > > > > Reported-by: Steve Longerbeam > > > > Reported-by: Eugeniu Rosca > > > > Signed-off-by: Sudeep Holla > > > > --- > > > > drivers/base/cpu.c | 20 +++++++++++++++++++- > > > > include/linux/cpuhotplug.h | 1 + > > > > 2 files changed, 20 insertions(+), 1 deletion(-) > > > > > > > > Hi Rafael, > > > > > > > > This is getting reported for quite some time. Let me know if you have > > > > better solution to fix this harmless yet annoying warnings during system > > > > resume. > > > > > > I'd rather have a flag in struct dev_pm_info that will cause the message to > > > be suppressed if set. > > > > > > It could be used for other purposes too then in princple (like skipping the > > > creation of empty "power" attr groups in sysfs for devices that don't > > > need them etc.). > > > > > Thanks for the suggestion. I did quick hack and came up with something > > below. I wanted to run through you once before I materialise it into > > a formal patch to check if I understood your suggestion correctly. > > We can move no_pm_required outside dev_pm_info struct and rename with > > any better names. > > > > Sorry for the nag, since the title has RFC, thought there are chances of > this getting lost. Let me know if the below idea aligns with your suggestion ? RFC would be fine, but Patchwork doesn't pick up patches posted as replies in the middle of a thread. :-) Yes, this is basically what I suggested, please post. Cheers, Rafael