mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	pavel@ucw.cz, len.brown@intel.com, mingo@elte.hu,
	akpm@linux-foundation.org, suresh.b.siddha@intel.com,
	lucas.demarchi@profusion.mobi,
	linux-pm@lists.linux-foundation.org, rusty@rustcorp.com.au,
	vatsa@linux.vnet.ibm.com, ashok.raj@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CPU hotplug, freezer: Fix bugs in CPU hotplug call path
Date: Tue, 04 Oct 2011 18:49:38 +0530	[thread overview]
Message-ID: <4E8B07EA.4020307@linux.vnet.ibm.com> (raw)
In-Reply-To: <1317636215.12973.16.camel@twins>

On 10/03/2011 03:33 PM, Peter Zijlstra wrote:
> On Mon, 2011-10-03 at 01:14 +0530, Srivatsa S. Bhat wrote:
>> +static atomic_t tasks_frozen = ATOMIC_INIT(0);
>> +
>> +void set_tasks_frozen_flag(void)
>> +{
>> +       atomic_set(&tasks_frozen, 1);
>> +}
>> +
>> +void clear_tasks_frozen_flag(void)
>> +{
>> +       atomic_set(&tasks_frozen, 0);
>> +}
>> +
>> +int tasks_are_frozen(void)
>> +{
>> +       int ret;
>> +       ret = atomic_read(&tasks_frozen);
>> +       return ret;
>> +} 
> 
> What's the point of using atomic_t here? Neither set nor read are
> actually atomic ops.
> 

Hi Peter,
Thank you for the review. I'll send version 2 of the patch with
the changes incorporated.

-- 
Regards,
Srivatsa S. Bhat  <srivatsa.bhat@linux.vnet.ibm.com>
Linux Technology Center,
IBM India Systems and Technology Lab

  reply	other threads:[~2011-10-04 13:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 19:44 Srivatsa S. Bhat
2011-10-03 10:03 ` Peter Zijlstra
2011-10-04 13:19   ` Srivatsa S. Bhat [this message]
2011-10-04 13:28     ` [PATCH v2] " Srivatsa S. Bhat
2011-10-04 13:37       ` Peter Zijlstra
2011-10-07 20:56         ` Srivatsa S. Bhat
2011-10-08 12:52           ` Américo Wang
2011-10-08 20:28             ` Srivatsa S. Bhat
2011-10-10 10:48           ` Peter Zijlstra
2011-10-21 11:30             ` Srivatsa S. Bhat

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=4E8B07EA.4020307@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=ashok.raj@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=lucas.demarchi@profusion.mobi \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=rusty@rustcorp.com.au \
    --cc=suresh.b.siddha@intel.com \
    --cc=vatsa@linux.vnet.ibm.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

Powered by JetHome