Re: [PATCH] revert to static = {0}

Randy.Dunlap
2003-08-05T16:14:03Z

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