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

From: Lou Langholtz (ldl@aros.net)
Date: Tue Aug 05 2003 - 11:18:16 EST


Hugh Dickins 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};
>
> if (sgp != SGP_WRITE &&
> ((loff_t) index << PAGE_CACHE_SHIFT) >= i_size_read(inode))
>
>
If this static zero initialization makes it into the kernel distro for
the given reason, please also add a comment sharing your above mentioned
reasoning.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 07 2003 - 22:00:29 EST