[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090511080509.B9A1.A69D9226@jp.fujitsu.com>
Date: Mon, 11 May 2009 08:13:24 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: kosaki.motohiro@...fujitsu.com,
LKML <linux-kernel@...r.kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Greg KH <greg@...ah.com>, Ingo Molnar <mingo@...e.hu>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Ben Slusky <sluskyb@...anoiacs.org>,
Dave Jones <davej@...hat.com>,
Chris Wright <chrisw@...s-sol.org>
Subject: Re: lockdep warnings: cpufreq ondemand gorvernor possibly circular locking
> On Mon, 11 May 2009 00:22:26 +0900 KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> wrote:
>
> > my box output following warnings.
> > it seems regression by commit 7ccc7608b836e58fbacf65ee4f8eefa288e86fac.
> >
> > A: work -> do_dbs_timer() -> cpu_policy_rwsem
> > B: store() -> cpu_policy_rwsem -> cpufreq_governor_dbs() -> work
>
> I can't find any commit which matches
> 7ccc7608b836e58fbacf65ee4f8eefa288e86fac
Grr, sorry. it's mmotm only commit.
filename is cpufreq-fix-timer-teardown-in-ondemand-governor.patch.
commit 7ccc7608b836e58fbacf65ee4f8eefa288e86fac
Author: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Date: Tue Apr 28 20:50:21 2009 +0200
The problem is that dbs_timer_exit() uses cancel_delayed_work() when it
should use cancel_delayed_work_sync(). cancel_delayed_work() does not
wait for the workqueue handler to exit.
The ondemand governor does not "seem" to be affected (read : race
condition occurs very rarely) because the "if (!dbs_info->enable)" check
at the beginning of the workqueue handler returns immediately without
rescheduling the work. The conservative governor in 2.6.30-rc has the
same check as the ondemand governor, which makes things usually run
smoothly. However, if the governor is quickly stopped and then started,
this could lead to the following race :
dbs_enable could be reenabled and multiple do_dbs_timer handlers would
run. This is why a synchronized teardown is required.
The patch applies to, at least, 2.6.28.x, 2.6.29.1, 2.6.30-rc2.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists