Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6182221imu; Mon, 21 Jan 2019 04:40:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN48Z8yfQwmCJYh49sLX5VS4Yi+s42Ym/qBhKggrZ0gGF8msLhHxASUdfKPOoQPirULYtjZ0 X-Received: by 2002:a62:c683:: with SMTP id x3mr29098908pfk.10.1548074443216; Mon, 21 Jan 2019 04:40:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548074443; cv=none; d=google.com; s=arc-20160816; b=mpEliczWuWclgwgKwDtHcjmFAwcrBEOcL/5KTZWoK1n4+Zu0yuAjIV66l+JrlKiF8z HwCdzD1h9YDTzcEEIQQKv1OfUE//OuNtLhDMGsVWw4r7Mhj6wGOsMgcG885bGGaH/lgE r/AYMTzAvL5zZfmDGRx2AoYZJrbGhIt+nyygtrFOu9+Avx3RuWQ+7wpdGAzUnZ7bFqBO EdG5rk/Uc4CIBTuoqvSlSLQZg1Jdf7vYopALAbd3/Y5w/te1enMBR4pRUe9yI59Swbl7 QKEjzPk8TfmTZGYVHZWRerWjZH/1Sk6ytjicSUMrimVm7kFG190FlMDctgo4RLOZ5+oC Becw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=2RuoEBro7lruH8W/TCfuvcf8xN9e9vNbT+hFmAOZrS4=; b=RcaWLlekavLJBNU6an9Av6/3Aw5wcRhxioTlwFzOnJ1+W/q+v+v+xjYy1mhfBC7CiO etkaAwwv6iWac6K1Wo6z1MxmzE3YSUZTIp1XjRFF4dYzWBFaUOB/zjzkRHxJKYNpYLrL A+N0R3JirVZiiyF13YPfAk9/M752jWaJo+lG1yaLZ7sz4+g9mZqVUpp80YkAthkVEPbq Le9O4fsmQ3oTNT8X9c+GklbHo5HMWzLiG4Hn2grO5DLmcnzXl0eae0dL/a/YZBp36jan YfSKwjA/7K4HaLyadNlik+QNilHOhopiAxaiQzK3mfWaFfwVEkgpB4TcHqiRZ5iV/97c lDCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@scalemp.com header.s=default header.b=VolZ7hua; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=scalemp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z71si12648464pgd.490.2019.01.21.04.40.27; Mon, 21 Jan 2019 04:40:43 -0800 (PST) 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=fail header.i=@scalemp.com header.s=default header.b=VolZ7hua; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=scalemp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728655AbfAUMiH (ORCPT + 99 others); Mon, 21 Jan 2019 07:38:07 -0500 Received: from www.scalemp.com ([169.44.78.149]:33743 "EHLO scalemp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728163AbfAUMiG (ORCPT ); Mon, 21 Jan 2019 07:38:06 -0500 X-Greylist: delayed 3020 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Jan 2019 07:38:06 EST DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=scalemp.com ; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2RuoEBro7lruH8W/TCfuvcf8xN9e9vNbT+hFmAOZrS4=; b=VolZ7hua96nkIn0Z4GVDi+AVXw EqTBNkZv2kzdagbkiPrZqiCZy6oAlZNrGQPMuJoT4CJDvHEHvuPFK3+8qqNR2Kr6JMWc/O+uMGJT9 21d9Kj9oHoiURG7g/8ALLGhFH1inoD+XuxQV2Osh4sbPJTJB18WYTwofiqPM4g7swQwQ=; Received: from bzq-80-45-146.red.bezeqint.net ([82.80.45.146]:23449 helo=eial.scalemp) by hosting.virtualsmp.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.91) (envelope-from ) id 1glY3N-000KGh-9W; Mon, 21 Jan 2019 06:47:45 -0500 From: Eial Czerwacki To: linux-kernel@vger.kernel.org Cc: Eial Czerwacki , Shai Fultheim , Oren Twaig Subject: [PATCH] percpu/module resevation: change resevation size iff X86_VSMP is set Date: Mon, 21 Jan 2019 13:47:31 +0200 Message-Id: <1548071251-1849-1-git-send-email-eial@scalemp.com> X-Mailer: git-send-email 2.7.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hosting.virtualsmp.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - scalemp.com X-Get-Message-Sender-Via: hosting.virtualsmp.com: authenticated_id: eial@scalemp.com X-Authenticated-Sender: hosting.virtualsmp.com: eial@scalemp.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org as reported in bug #201339 (https://bugzilla.kernel.org/show_bug.cgi?id=201339) by enabling X86_VSMP, INTERNODE_CACHE_BYTES's definition differs from the default one causing the struct size to exceed the size ok 8KB. in order to avoid such issue, increse PERCPU_MODULE_RESERVE to 64KB if CONFIG_X86_VSMP is set. the value was caculated on linux 4.20.3, make allmodconfig all and the following oneliner: for f in `find -name *.ko`; do echo $f; readelf -S $f |grep perc; done |grep data..percpu -B 1 |grep ko |while read r; do echo -n "$r: "; objdump --syms --section=.data..percpu $r|grep data |sort -n |awk '{c++; d=strtonum("0x" $1) + strtonum("0x" $5); if (m < d) m = d;} END {printf("%d vars-> last addr 0x%x ( %d )\n", c, m, m)}' ; done |column -t |sort -k 8 -n | awk '{print $8}'| paste -sd+ | bc Signed-off-by: Eial Czerwacki Signed-off-by: Shai Fultheim Signed-off-by: Oren Twaig --- include/linux/percpu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 70b7123..6b79693 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -14,7 +14,11 @@ /* enough to cover all DEFINE_PER_CPUs in modules */ #ifdef CONFIG_MODULES +#ifdef X86_VSMP +#define PERCPU_MODULE_RESERVE (1 << 16) +#else #define PERCPU_MODULE_RESERVE (8 << 10) +#endif #else #define PERCPU_MODULE_RESERVE 0 #endif -- 2.7.4