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: Thu, 27 Aug 2015 16:59:21 +0300 From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com> To: Andrew Morton <akpm@...ux-foundation.org>, Hugh Dickins <hughd@...gle.com> Cc: Andrea Arcangeli <aarcange@...hat.com>, Dave Hansen <dave.hansen@...el.com>, Vlastimil Babka <vbabka@...e.cz>, Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...e.cz>, David Rientjes <rientjes@...gle.com>, linux-kernel@...r.kernel.org, linux-mm@...ck.org, "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com> Subject: [PATCHv4 7/7] mm: use 'unsigned int' for compound_dtor/compound_order on 64BIT On 64 bit system we have enough space in struct page to encode compound_dtor and compound_order with unsigned int. On x86-64 it leads to slightly smaller code size due usesage of plain MOV instead of MOVZX (zero-extended move) or similar effect. allyesconfig: text data bss dec hex filename 159520446 48146736 72196096 279863278 10ae5fee vmlinux.pre 159520382 48146736 72196096 279863214 10ae5fae vmlinux.post On other architectures without native support of 16-bit data types the difference can be bigger. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com> --- include/linux/mm_types.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index ecaf3b1d0216..39b0db74ba5e 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -150,8 +150,13 @@ struct page { /* First tail page of compound page */ struct { unsigned long compound_head; /* If bit zero is set */ +#ifdef CONFIG_64BIT + unsigned int compound_dtor; + unsigned int compound_order; +#else unsigned short int compound_dtor; unsigned short int compound_order; +#endif }; #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && USE_SPLIT_PMD_PTLOCKS -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists