lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 7 Apr 2010 09:46:28 -0700 From: Laurent Chavey <chavey@...gle.com> To: netdev@...r.kernel.org Cc: laurent chavey <chavey@...gle.com> Subject: [RFC] change dst_entry padding from using an array to using __attribute__ what are the benefit(s) of using an array to force a struct element to be aligned on 64 bytes / 32 bytes boundaries versus using gcc __attribute__. ------------------------------------ struct dst_entry { /* * Align __refcnt to a 64 bytes alignment * (L1_CACHE_SIZE would be too much) */ - #ifdef CONFIG_64BIT - long __pad_to_align_refcnt[1]; - #else - long __pad_to_align_refcnt[0]; - #endif + atomic_t __refcnt __attribute__ ((aligned(64))); /* client references */ #undef __padding__ /* * __refcnt wants to be on a different cache line from * input/output/ops or performance tanks badly */ atomic_t __refcnt; /* client references */ }; -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists