Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753295AbZIXOk7 (ORCPT ); Thu, 24 Sep 2009 10:40:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753274AbZIXOk6 (ORCPT ); Thu, 24 Sep 2009 10:40:58 -0400 Received: from BISCAYNE-ONE-STATION.MIT.EDU ([18.7.7.80]:35624 "EHLO biscayne-one-station.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752979AbZIXOk5 (ORCPT ); Thu, 24 Sep 2009 10:40:57 -0400 From: Tim Abbott To: Linus Torvalds Cc: Linux Kernel Mailing List , Sam Ravnborg , Tim Abbott Subject: [PATCH v2 01/11] Optimize the ordering of sections in RW_DATA_SECTION. Date: Thu, 24 Sep 2009 10:36:16 -0400 Message-Id: <1253802986-8132-2-git-send-email-tabbott@ksplice.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1253802986-8132-1-git-send-email-tabbott@ksplice.com> References: <1253802986-8132-1-git-send-email-tabbott@ksplice.com> X-Spam-Flag: NO X-Spam-Score: 0.00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1430 Lines: 41 The old RW_DATA_SECTION had INIT_TASK_DATA (which was more-than-PAGE_SIZE-aligned), followed by a bunch of small alignment stuff, followed by more PAGE_SIZE-aligned stuff, so you wasted memory in the middle of .data re-aligning back up to PAGE_SIZE. This patch sorts the sections by alignment requirements, which should pack them essentially optimally. Signed-off-by: Tim Abbott Reviewed-by: Sam Ravnborg --- include/asm-generic/vmlinux.lds.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 29ca8f5..b6e818f 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -721,12 +721,12 @@ . = ALIGN(PAGE_SIZE); \ .data : AT(ADDR(.data) - LOAD_OFFSET) { \ INIT_TASK_DATA(inittask) \ + NOSAVE_DATA \ + PAGE_ALIGNED_DATA(pagealigned) \ CACHELINE_ALIGNED_DATA(cacheline) \ READ_MOSTLY_DATA(cacheline) \ DATA_DATA \ CONSTRUCTORS \ - NOSAVE_DATA \ - PAGE_ALIGNED_DATA(pagealigned) \ } #define INIT_TEXT_SECTION(inittext_align) \ -- 1.6.3.3 -- 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/