public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: Dave Jones <davej@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
	"kernel-testers@vger.kernel.org" <kernel-testers@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Dave Young <hidave.darkstar@gmail.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: Re: [patch 1/4] cpufreq: Eliminate the recent lockdep warnings in cpufreq
Date: Mon, 6 Jul 2009 13:19:20 +0200	[thread overview]
Message-ID: <200907061319.22660.trenn@suse.de> (raw)
In-Reply-To: <7E82351C108FA840AB1866AC776AEC4669BFF050@orsmsx505.amr.corp.intel.com>

On Friday 03 July 2009 16:28:43 Pallipadi, Venkatesh wrote:
> 
...
> >I still do not see the need of "dbs_mutex protects data in 
> >dbs_tuners_ins
> >from concurrent changes", though. If someone enlightens me, that would
> >be appreciated.
> 
> OK. Consider these two happening in parallel.
> echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice
> echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/ondemand/ignore_nice
Hm, I just consider parallel configuration, especially with different
values as a userspace bug anyway.

> As they are coming from different cpu, rwsem wont protect us and 
> without the dbs_mutex, end state after this can will be unpredictable.
> prev_cpu_idle and prev_cpu_nice can end up with wrong values where
> only one of them is set etc. That will affect the ondemand algorithm.
For one sample in this case.
But I see that it should be made 100%
bulletproof and even userspace is doing wrong things already you want to
have a defined state. A separate mutex, uncoupled from .governor() would make 
things easier, but I wait until it's clear what cleanups are going into which 
kernel and will suggest another cleanup to only allow
global dbs_tuners on top for .31 or further future.

Thanks,

    Thomas

  reply	other threads:[~2009-07-06 11:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03  0:08 [patch 0/4] Take care of cpufreq lockdep issues (take 2) venkatesh.pallipadi
2009-07-03  0:08 ` [patch 1/4] cpufreq: Eliminate the recent lockdep warnings in cpufreq venkatesh.pallipadi
2009-07-03  1:06   ` Mathieu Desnoyers
2009-07-03  2:04     ` Pallipadi, Venkatesh
2009-07-03  2:25       ` Mathieu Desnoyers
2009-07-03 11:41   ` Thomas Renninger
2009-07-03 14:28     ` Pallipadi, Venkatesh
2009-07-06 11:19       ` Thomas Renninger [this message]
2009-07-03  0:08 ` [patch 2/4] cpufreq: Mark policy_rwsem as going static in cpufreq.c wont be exported venkatesh.pallipadi
2009-07-03  0:08 ` [patch 3/4] cpufreq: Cleanup locking in ondemand governor venkatesh.pallipadi
2009-07-03  0:08 ` [patch 4/4] cpufreq: Cleanup locking in conservative governor venkatesh.pallipadi
2009-07-03  2:23 ` [PATCH] CPUFREQ: fix (utter) cpufreq_add_dev mess v1 Mathieu Desnoyers
2009-07-03  6:54 ` [patch 0/4] Take care of cpufreq lockdep issues (take 2) Ingo Molnar
2009-07-03 14:06   ` Mathieu Desnoyers
2009-07-03 14:31   ` Pallipadi, Venkatesh
2009-07-03 18:48     ` Ingo Molnar
2009-07-06 18:52 ` Pallipadi, Venkatesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907061319.22660.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=hidave.darkstar@gmail.com \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=rjw@sisk.pl \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox