Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4243971yba; Tue, 9 Apr 2019 14:27:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNBQgvDBW4wtFtkaYJcfcIypsgnI0xRKT1LPFFDCtXw4C7uxv2vtuHd00Dgx88w/kDlvzA X-Received: by 2002:a62:121c:: with SMTP id a28mr38918074pfj.58.1554845260767; Tue, 09 Apr 2019 14:27:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554845260; cv=none; d=google.com; s=arc-20160816; b=fiubaR8p6SxpORC3B4kdjsyJEUaUSwO19x10saLOFEpuYle9bU242C0zRw82ew/htI pGqTqa0nIMe1kl30QK5iowiNatjepEfWWahhtV7RdvycP3moOTX/wx3kUCC4phOSNNDn oakMYgSLk8CPfbe1lID8h4EToSL/k0XrpnGV3Q59ezSG9+iHRNLDJ39fck9bjng8H4YQ cvpox4MyYY/AamHGcGG9ZPjN097lKm8JmdH4JrPC8wgbBAB1z7LbSDWkYSi1M8CYBf0n knyVCmP3412DS5Ua2vOzVxuzuqzo110o9k8IomBXzDO0sumQg4YhYKvYw3QpF06PbbkQ Jx2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DygVSYvz5m9dBESggmimXQQjt5Z2HpKNF+jJeVcx8s4=; b=AFL+DcAQqLnNNqaiWocL4mVwt0T8+xPJcEQ1j1sgcIQzBiUwZiDd+kMRlX16J074Iw jilQmot52UHdB/T8L6iKWkd4Vwq1gXvt2CywOy2s/lLeaBYySc5iafy5E4lrvAQkVJ14 iVXe97xlGFlxQ3Vmlp9iajFV8kMx73Wt7yc2Zdk4bLzeAvxj+lglFPFTfnj3z0xnsPni AOvzMHNUSn8NDeAJbCeF6DnCwCDTGzn+/LWZYORX5N5OLP7TOM7IAGMfoxkOJhu/SZKH R9GXy2X8a0d1tIgC7/tTwVGelM8Ji0yg0w5caUuH/UmsmKdWtRCIiwkg8K18M81u1MVv Ruew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Shkioco4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j133si30237989pgc.543.2019.04.09.14.27.25; Tue, 09 Apr 2019 14:27:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Shkioco4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726988AbfDIV02 (ORCPT + 99 others); Tue, 9 Apr 2019 17:26:28 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:33209 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbfDIV0A (ORCPT ); Tue, 9 Apr 2019 17:26:00 -0400 Received: by mail-ed1-f68.google.com with SMTP id b8so157491edq.0 for ; Tue, 09 Apr 2019 14:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DygVSYvz5m9dBESggmimXQQjt5Z2HpKNF+jJeVcx8s4=; b=Shkioco4nRNSQGoqnv1xPT+0jyWUqUrxnxqFWT3McBDB/hhaNrNZgSyZtga/puxnA4 EThn5XeJk4gdke5kScjjpxUxIiKEdJFGVQH4Utb9/1PmGLK9SURM9TmOax9DE5/pxXJ3 E0+uFuCQawAJic9FBQBV4hpebacv5aUAB0kkA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DygVSYvz5m9dBESggmimXQQjt5Z2HpKNF+jJeVcx8s4=; b=j07jkdFxbT9tjmATpb/Lz0FMdar6FoJZ+UWda+PlSTcn/HmuQs9i2dY0av0K41gNX+ dLnmylIcaq2JV3lxf3eNEWLJcF/0Cx2Xnrmz7hWMcl+7kSw6Qo7bHmy2duH3aZRGkd66 8f11kITq83o9PDzuZw3f8PFCYlatPvwtR6zjLsjtXwDij/FZPEzewbYYFZIRGpamfe3G Aece6y3DLYFKDuKN/rwy9S3UEiL1XLfRyxM/vjiLNpXgsmJKM7oOwIkp4DRgZnkzWcRq PMkO1iexx8lmf5vgGh+22Um84gFpl14W3k6DWnREybJP5ZuENU+hbVgUf/ME/K/ghN/t HkEw== X-Gm-Message-State: APjAAAXKq8jfSgxszdUWdD4WtVfSw1LGXKHs2Azyp0rfKNlvxolTNCZd Pyh7LsxOBYG4btZG2Duoa+2hpQ== X-Received: by 2002:aa7:c88b:: with SMTP id p11mr17373736eds.79.1554845158624; Tue, 09 Apr 2019 14:25:58 -0700 (PDT) Received: from prevas-ravi.prevas.se (ip-5-186-118-63.cgn.fibianet.dk. [5.186.118.63]) by smtp.gmail.com with ESMTPSA id i26sm3477986ejc.51.2019.04.09.14.25.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 14:25:58 -0700 (PDT) From: Rasmus Villemoes To: Andrew Morton , x86@kernel.org Cc: Jason Baron , linux-kernel@vger.kernel.org, Rasmus Villemoes , Ingo Molnar Subject: [PATCH 08/10] x86-64: select DYNAMIC_DEBUG_RELATIVE_POINTERS Date: Tue, 9 Apr 2019 23:25:15 +0200 Message-Id: <20190409212517.7321-9-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190409212517.7321-1-linux@rasmusvillemoes.dk> References: <20190409212517.7321-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reduces the size of struct _ddebug from 56 to 40 bytes. There's one such struct for each pr_debug(), netdev_debug() etc. in a CONFIG_DYNAMIC_DEBUG kernel. An Ubuntu 4.15 kernel has about 2550 entries in the __verbose section of vmlinux, amounting to ~40K saved. (Modules also become smaller, but it's harder to quantify how much that yields at runtime.) For comparison, the __bug_table section of that Ubuntu kernel is 75576 bytes, i.e. 6298 12-byte bug_entrys, so GENERIC_BUG_RELATIVE_POINTERS saves ~50K. Due to the build-time sanity checks in asm-generic/dynamic_debug.h, we need to add another #undef to vclock_gettime.c. Signed-off-by: Rasmus Villemoes --- arch/x86/Kconfig | 1 + arch/x86/entry/vdso/vdso32/vclock_gettime.c | 1 + arch/x86/include/asm/Kbuild | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5ad92419be19..eb5488b4577d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -30,6 +30,7 @@ config X86_64 select SWIOTLB select X86_DEV_DMA_OPS select ARCH_HAS_SYSCALL_WRAPPER + select DYNAMIC_DEBUG_RELATIVE_POINTERS # # Arch settings diff --git a/arch/x86/entry/vdso/vdso32/vclock_gettime.c b/arch/x86/entry/vdso/vdso32/vclock_gettime.c index 9242b28418d5..9acec4426206 100644 --- a/arch/x86/entry/vdso/vdso32/vclock_gettime.c +++ b/arch/x86/entry/vdso/vdso32/vclock_gettime.c @@ -17,6 +17,7 @@ #undef CONFIG_ILLEGAL_POINTER_VALUE #undef CONFIG_SPARSEMEM_VMEMMAP #undef CONFIG_NR_CPUS +#undef CONFIG_DYNAMIC_DEBUG_RELATIVE_POINTERS #define CONFIG_X86_32 1 #define CONFIG_PGTABLE_LEVELS 2 diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index a0ab9ab61c75..793d2c6735b9 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild @@ -7,6 +7,7 @@ generated-y += unistd_64_x32.h generated-y += xen-hypercalls.h generic-y += dma-contiguous.h +generic-y += dynamic_debug.h generic-y += early_ioremap.h generic-y += export.h generic-y += mcs_spinlock.h -- 2.20.1