From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 11:08:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F5767E; Fri, 24 Apr 2015 11:08:30 +0000 (UTC) Received: from elf.torek.net (mail.torek.net [96.90.199.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 531521A43; Fri, 24 Apr 2015 11:08:29 +0000 (UTC) Received: from elf.torek.net (localhost [127.0.0.1]) by elf.torek.net (8.14.9/8.14.9) with ESMTP id t3OB1Ovp029628; Fri, 24 Apr 2015 04:01:24 -0700 (PDT) (envelope-from torek@elf.torek.net) Received: (from torek@localhost) by elf.torek.net (8.14.9/8.14.9/Submit) id t3OB1O8Z029626; Fri, 24 Apr 2015 04:01:24 -0700 (PDT) (envelope-from torek) Date: Fri, 24 Apr 2015 04:01:24 -0700 (PDT) From: Chris Torek Message-Id: <201504241101.t3OB1O8Z029626@elf.torek.net> To: adrian@freebsd.org, scott4long@yahoo.com Subject: Re: svn commit: r281451 - head/sys/vm Cc: dchagin@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (elf.torek.net [127.0.0.1]); Fri, 24 Apr 2015 04:01:24 -0700 (PDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:08:30 -0000 The problem seems likely to be related to odd compiler handling of alignment. Consider this code bit, which extracts the essentials: struct x { int x; } __attribute__((__aligned__(32))); struct s1 { int a; struct x b[1]; }; struct s2 { int a; struct x b[]; }; extern void test2(int); void test(void) { test2(sizeof(struct s1)); test2(sizeof(struct s2)); } Compiled, here are the two sizeof values (this particular compiler output is from clang but gcc and clang both agree on sizeof here): movl $64, %edi callq test2 movl $32, %edi popq %rbp jmp test2 # TAILCALL With the flexible array, (sizeof(struct uma_cache)) is going to be 32 bytes smaller than without it. (I have not looked closely enough to determine what the size should be.) Chris