linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Tim Schmielau <tim@physik3.uni-rostock.de>
Cc: Linus Torvalds <torvalds@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: please pull from the trivial tree
Date: Fri, 1 Dec 2006 13:55:04 +0100	[thread overview]
Message-ID: <20061201125504.GC11084@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.63.0612011329130.3090@fink.physik3.uni-rostock.de>

On Fri, Dec 01, 2006 at 01:41:18PM +0100, Tim Schmielau wrote:
> > Chase Venters (1):
> >       Fix jiffies.h comment
> 
> This one actually obscures the comment rather than fixing it.
> 
> >From jiffies.h:
> > 76 /*
> > 77  * The 64-bit value is not volatile - you MUST NOT read it
> > 78  * without sampling the sequence number in xtime_lock.
> > 79  * get_jiffies_64() will do this for you as appropriate.
> > 80  */
> > 81  extern u64 __jiffy_data jiffies_64;
> > 82  extern unsigned long volatile __jiffy_data jiffies;
> 
> Note that jiffies is volatile, while jiffies_64 is not; the comment 
> currently explains that. The proposed patch
> 
> > Fix jiffies.h comment
> > jiffies.h includes a comment informing that jiffies_64 must be read with the
> > assistance of the xtime_lock seqlock. The comment text, however, calls
> > jiffies_64 "not volatile", which should probably read "not atomic".
> > 
> > --- a/include/linux/jiffies.h
> > +++ b/include/linux/jiffies.h
> > @@ -74,7 +74,7 @@
> > #define __jiffy_data __attribute__((section(".data")))
> > /*
> > - * The 64-bit value is not volatile - you MUST NOT read it
> > + * The 64-bit value is not atomic - you MUST NOT read it
> > * without sampling the sequence number in xtime_lock.
> > * get_jiffies_64() will do this for you as appropriate.
> > */
> 
> would leave a comment that is correct, but less useful (I'd expect any 
> kernel hacker to know that u64 is non-atomic on many platforms).


If kernel hackers are expected to already know it's non-atomic we could 
remove the whole comment.

The comment regarding "volatile" was bogus since "volatile" wouldn't 
help against getting garbage when reading an u64 variable.


> Tim

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2006-12-01 12:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01 11:37 please pull from the trivial tree Adrian Bunk
2006-12-01 12:41 ` Tim Schmielau
2006-12-01 12:55   ` Adrian Bunk [this message]
2006-12-01 13:08     ` Tim Schmielau
  -- strict thread matches above, loose matches on Subject: below --
2008-02-03 20:17 Adrian Bunk
2007-07-22 21:08 Adrian Bunk
2007-05-11 17:15 Adrian Bunk
2007-05-09  9:30 Adrian Bunk
2007-02-18  1:12 Adrian Bunk
2006-12-12 23:48 Adrian Bunk
2006-10-03 23:05 Adrian Bunk
2006-06-26 20:26 Adrian Bunk
2006-04-02 14:15 Adrian Bunk
2006-04-01 10:43 Adrian Bunk
2006-03-26 17:31 Adrian Bunk
2006-03-25 10:17 Adrian Bunk
2006-03-22 10:41 Adrian Bunk
2006-01-15  2:05 Adrian Bunk
2006-01-11  1:31 Adrian Bunk
2006-01-10  0:54 Adrian Bunk
2006-01-03 13:19 Adrian Bunk
2005-11-08 16:55 Adrian Bunk

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=20061201125504.GC11084@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim@physik3.uni-rostock.de \
    --cc=torvalds@osdl.org \
    /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;
as well as URLs for NNTP newsgroup(s).