public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Robert Wisniewski <bob@watson.ibm.com>
Cc: trz@us.ibm.com, karim@opersys.com, richardj_moore@uk.ibm.com,
	michel.dagenais@polymtl.ca, linux-kernel@vger.kernel.org,
	ltt-dev@shafik.org
Subject: Re: [PATCH 3/4] relayfs for 2.6.10: locking/lockless implementation
Date: Wed, 19 Jan 2005 11:25:18 -0800	[thread overview]
Message-ID: <20050119192518.GD2367@kroah.com> (raw)
In-Reply-To: <16872.28149.139878.872756@kix.watson.ibm.com>

On Fri, Jan 14, 2005 at 08:30:44PM -0500, Robert Wisniewski wrote:
> I believe the below illustrates the problem that will be seen without
> volatile.

Please read the lkml archives about all of the problems surrounding
marking variables "volatile" and how you really never want to do that in
the kernel.  If you want to access a variable in two different places,
at the same time, just use a lock to keep it sane.

>  > So these can just be removed, and the code changed to use the proper
>  > atomic calls?  If so, please do so.
> 
> Yes we can remove the code and use the standard atomic calls, but based on
> the above example, I think we need to mark a couple variables volatile.  Do
> you agree, if so, and unless there's dissenting opinion we can make the
> change.

No, I disagree.  Just use the standard atomic calls, they will work just
fine.

thanks,

greg k-h

  reply	other threads:[~2005-01-19 20:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-14 22:57 [PATCH 3/4] relayfs for 2.6.10: locking/lockless implementation Robert Wisniewski
2005-01-14 23:48 ` Greg KH
2005-01-15  1:30   ` Robert Wisniewski
2005-01-19 19:25     ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-14  3:04 Karim Yaghmour
2005-01-14 19:17 ` Greg KH

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=20050119192518.GD2367@kroah.com \
    --to=greg@kroah.com \
    --cc=bob@watson.ibm.com \
    --cc=karim@opersys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltt-dev@shafik.org \
    --cc=michel.dagenais@polymtl.ca \
    --cc=richardj_moore@uk.ibm.com \
    --cc=trz@us.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