All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J.A. Magallon" <jamagallon@able.es>
To: Andrea Arcangeli <andrea@suse.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: AA's 00_backout_gcc_3-0-patch-1
Date: Tue, 27 May 2003 01:15:48 +0200	[thread overview]
Message-ID: <20030526231548.GA14858@werewolf.able.es> (raw)
In-Reply-To: <20030526225445.GV3767@dualathlon.random>; from andrea@suse.de on Tue, May 27, 2003 at 00:54:45 +0200


On 05.27, Andrea Arcangeli wrote:
> On Mon, May 26, 2003 at 07:30:44PM -0300, Marcelo Tosatti wrote:
[...]
> 
> Overall in kernel we disagreed to follow the MUST requrested by the gcc
> developers, we often want to do comparisons of variables out of locks to
> know if we need to take the lock and work on a garbage collection or
> stuff like that and we for sure don't want to mark those variables
> volatile since they must be cached and not spilled all the time, under
> the locks. Linus as well was against using volatile for every piece of
> memory that can change under gcc. The decision is been basically to
> outsmart gcc in choosing if gcc has rights to generate kernel crashing
> code or not. This makes kernel developement even more difficult since
> you've to imagine whatever smart thing gcc can do with your not
> serialized code to know if you're forced to mark the stuff volatile, but
> it'll generate the very best performance.
> 

So you are telling that you are allowed to do something like:

int* a = 0x320;

for (i=1000 samples)
	v[i] = *a;

in kernel code and you trust gcc to not optimize the loop away ??
What is volatile is volatile...

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-rc3-jam1 (gcc 3.2.3 (Mandrake Linux 9.2 3.2.3-1mdk))

  reply	other threads:[~2003-05-26 23:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26 22:30 AA's 00_backout_gcc_3-0-patch-1 Marcelo Tosatti
2003-05-26 22:54 ` Andrea Arcangeli
2003-05-26 23:15   ` J.A. Magallon [this message]
2003-05-26 23:30     ` Andrea Arcangeli

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=20030526231548.GA14858@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.