From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753707AbbG0Ojl (ORCPT ); Mon, 27 Jul 2015 10:39:41 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:33084 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753275AbbG0Ojj (ORCPT ); Mon, 27 Jul 2015 10:39:39 -0400 Date: Mon, 27 Jul 2015 20:09:35 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM list , Linux Kernel Mailing List , Russell King Subject: Re: [PATCH v2] cpufreq: Avoid attempts to create duplicate symbolic links Message-ID: <20150727143935.GB18535@linux> References: <1660815.CyKx9SEI9c@vostro.rjw.lan> <20150727022718.GE19944@linux> <4080510.IQ60sVQvbL@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4080510.IQ60sVQvbL@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27-07-15, 15:45, Rafael J. Wysocki wrote: > Say the subsys add callback runs for a CPU and it doesn't have a policy. > If it is offline, we ignore it and the add callback won't be executed > for it again. > > In turn, if it is online, we create a policy for it and we should (right > away) link the policy to all of the CPUs that were offline when the subsys add > callback was called for them. That's what we do today. > > Is there anything missing in that? So the code is working properly after your patch, but I was talking on the lines of what Russell suggested. We should play with the links only when we receive add-dev/remove-dev from subsys callbacks. The exception to that will be the offline CPUs for which add-dev is called before their policy existed. -- viresh