linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: torvalds@osdl.org, akpm@osdl.org, ogasawara@osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] revert to static = {0}
Date: Tue, 5 Aug 2003 09:09:58 -0700	[thread overview]
Message-ID: <20030805090958.368ef508.rddunlap@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0308051638040.1471-100000@localhost.localdomain>

On Tue, 5 Aug 2003 16:48:02 +0100 (BST) Hugh Dickins <hugh@veritas.com> wrote:

| Please revert to static zero initialization of a const: when thus
| initialized it's linked into a readonly cacheline shared between cpus;
| otherwise it's linked into bss, likely to be in a dirty cacheline
| bouncing between cpus.
| 
| --- 2.6.0-test2-bk/mm/shmem.c	Tue Aug  5 15:57:31 2003
| +++ linux/mm/shmem.c	Tue Aug  5 16:16:55 2003
| @@ -296,7 +296,7 @@
|  	struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
|  	struct page *page = NULL;
|  	swp_entry_t *entry;
| -	static const swp_entry_t unswapped;
| +	static const swp_entry_t unswapped = {0};

In all of the "don't init statics to 0" patches, should we
check for "const" also and leave those with 0 initializers
(with explanation as Arjan requested)?

--
~Randy

  parent reply	other threads:[~2003-08-05 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-05 15:48 [PATCH] revert to static = {0} Hugh Dickins
2003-08-05 16:07 ` Arjan van de Ven
2003-08-05 18:41   ` [PATCH] revert to static = {0} + comment Hugh Dickins
2003-08-05 16:09 ` Randy.Dunlap [this message]
2003-08-05 18:49   ` [PATCH] revert to static = {0} Hugh Dickins
2003-08-05 16:18 ` Lou Langholtz
2003-08-05 17:44 ` Jeff Garzik
2003-08-05 18:51   ` Hugh Dickins
2003-08-05 19:06     ` William Lee Irwin III
2003-08-05 21:13       ` Jeff Garzik

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=20030805090958.368ef508.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogasawara@osdl.org \
    --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).