mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Wille Padnos <stephenwp@adelphia.net>
To: root@chaos.analogic.com
Cc: Hugh Dickins <hugh@veritas.com>,
	Linus Torvalds <torvalds@transmeta.com>,
	Rik van Riel <riel@conectiva.com.br>,
	Mark Hahn <hahn@coffee.psychology.mcmaster.ca>,
	David Howells <dhowells@cambridge.redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] micro-opt DEBUG_ADD_PAGE
Date: Thu, 08 Feb 2001 13:16:26 -0500	[thread overview]
Message-ID: <3A82E27A.E718E175@adelphia.net> (raw)
In-Reply-To: <Pine.LNX.3.95.1010208125335.2003B-100000@chaos.analogic.com>

"Richard B. Johnson" wrote:
> 
> On Thu, 8 Feb 2001, Stephen Wille Padnos wrote:
> 
> > "Richard B. Johnson" wrote:
> > [snip]
> > > Another problem with 'volatile' has to do with pointers. When
> > > it's possible for some object to be modified by some external
> > > influence, we see:
> > >
> > >         volatile struct whatever *ptr;
> > >
> > > Now, it's unclear if gcc knows that we don't give a damn about
> > > the address contained in 'ptr'. We know that it's not going to
> > > change. What we are concerned with are the items within the
> > > 'struct whatever'. From what I've seen, gcc just reloads the
> > > pointer.
> > >
[snip]

> Yes. My point is that a lot of authors have declared just about everything
> 'volatile' `grep volatile /usr/src/linux/drivers/net/*.c`, just to
> be "safe". It's likely that there are many hundreds of thousands of
> unneeded register-reloads because of this.
> 
> It might be useful for somebody who has a lot of time on his/her
> hands to go through some of these drivers.

I would be willing to do this (on the slow boat - I don't have THAT much
spare time :), but only if we can be sure that the gcc optimizer will
correctly handle a normal pointer to volatile data.  Your experiences
would seem to indicate that the optimizer needs fixing before much
effort should be spent on this.

-- 
Stephen Wille Padnos
Programmer, Engineer, Problem Solver
swpadnos@adelphia.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-02-08 18:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.21.0102071744440.5204-100000@localhost.localdomain>
2001-02-07 18:00 ` Hugh Dickins
2001-02-07 18:17   ` Linus Torvalds
2001-02-07 20:42     ` Hugh Dickins
2001-02-07 21:40       ` Linus Torvalds
2001-02-08  1:24         ` Kai Germaschewski
2001-02-08 16:24         ` Hugh Dickins
2001-02-08 16:37           ` David Weinehall
2001-02-08 16:56             ` Hugh Dickins
2001-02-08 17:02               ` Rik van Riel
2001-02-08 17:02           ` Richard B. Johnson
2001-02-08 17:19             ` Stephen Wille Padnos
2001-02-08 17:57               ` Richard B. Johnson
2001-02-08 18:16                 ` Stephen Wille Padnos [this message]
2001-02-08 19:32                   ` Richard B. Johnson

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=3A82E27A.E718E175@adelphia.net \
    --to=stephenwp@adelphia.net \
    --cc=dhowells@cambridge.redhat.com \
    --cc=hahn@coffee.psychology.mcmaster.ca \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    --cc=root@chaos.analogic.com \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®