linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] revert to static = {0}
@ 2003-08-05 15:48 Hugh Dickins
  2003-08-05 16:07 ` Arjan van de Ven
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Hugh Dickins @ 2003-08-05 15:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Randy Dunlap, Leann Ogasawara, linux-kernel

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};
 
 	if (sgp != SGP_WRITE &&
 	    ((loff_t) index << PAGE_CACHE_SHIFT) >= i_size_read(inode))


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-08-05 21:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] revert to static = {0} Randy.Dunlap
2003-08-05 18:49   ` 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

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).