Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934219Ab3FSDAQ (ORCPT ); Tue, 18 Jun 2013 23:00:16 -0400 Received: from mail-ob0-f182.google.com ([209.85.214.182]:62129 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934183Ab3FSDAN (ORCPT ); Tue, 18 Jun 2013 23:00:13 -0400 MIME-Version: 1.0 In-Reply-To: References: <1371114118-19488-1-git-send-email-chenxg@marvell.com> <1912850.KuRKhn87Nf@vostro.rjw.lan> Date: Wed, 19 Jun 2013 08:30:11 +0530 Message-ID: Subject: Re: [PATCH v5] cpufreq: fix governor start/stop race condition From: Viresh Kumar To: Xiaoguang Chen , "Rafael J. Wysocki" Cc: Xiaoguang Chen , cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, "linux-kernel@vger.kernel.org" , njiang1@marvell.com, zjwu@marvell.com, ylmao@marvell.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1331 Lines: 35 On 19 June 2013 06:50, Xiaoguang Chen wrote: > 2013/6/19 Rafael J. Wysocki : >> On Thursday, June 13, 2013 05:01:58 PM Xiaoguang Chen wrote: >>> cpufreq governor stop and start should be kept in sequence. >>> If not, there will be unexpected behavior, for example: >>> >>> we have 4 cpus and policy->cpu=cpu0, cpu1/2/3 are linked to cpu0. >> >> Please spell cpus as "CPUs". And please start sequences from capitals. > > Ok, thanks for the remind > >> >> [Yes, it *really* is a problem.] Just wanted to know the reasoning behind it so that I can remind others about it and then argue :) >>> the normal sequence is as below: >>> >>> 1) Current governor is userspace, one application tries to set >>> governor to ondemand. it will call __cpufreq_set_policy in which it >>> will stop userspace governor and then start ondemand governor. >> >> Do I think correctly that this is for all CPUs? > > From current code design, it is for all CPUs. Why? This can be for a single cpu (which would eventually force all others CPUs sharing policy with it). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/