From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756477AbbLHNam (ORCPT ); Tue, 8 Dec 2015 08:30:42 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:32964 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756102AbbLHNak (ORCPT ); Tue, 8 Dec 2015 08:30:40 -0500 Date: Tue, 8 Dec 2015 19:00:36 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, ashwin.chaugule@linaro.org, "Rafael J. Wysocki" , open list Subject: Re: [PATCH V2 5/6] cpufreq: governor: replace per-cpu delayed work with timers Message-ID: <20151208133036.GB3692@ubuntu> References: <3999637.u4UiK7zxOR@vostro.rjw.lan> <20151208065622.GZ3294@ubuntu> <7208072.lZriMRM1aD@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7208072.lZriMRM1aD@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 08-12-15, 14:18, Rafael J. Wysocki wrote: > Well, if the timer function runs on all CPUs at the same time, they all > can see skip_work > 1 and none of them will queue the work. You are talking about code after my patch, right? Will will all of them see it > 1? At least one of them will see it 0 and queue the work, unless the governor is stopped completely. > You are right, I've overlooked that race (but then it is rather easy to > overlook). Yeah, we (at least I) took a long time to understand that this was the real problem we always had and so fixed it recently. -- viresh