From patchwork Fri Sep 20 07:37:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 1987724 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=kr5ByTm5; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=eATyYmag; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X94654DnWz1y31 for ; Fri, 20 Sep 2024 17:39:40 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rB2+SxYyeys7zlzx0DTyy+RKuLcWpkdNWnqLenWCHK8=; b=kr5ByTm5Eo1Dcq sSkBCrcGKb/BpWXEAgdqjg39agrXUsc9BN4QYnYZDtwkAfyZpHgMiS0pkmfD7j6hLM/3/LR5MJU2X JsMGdaRij/fAH++cvsVUJoJiN9uigmxlfOI/DXvubKVJsx1IzA5Ud9d/4ekvpn6N8gGd5MiiDrfCH TycuPC90DJqG+Z8lZ2LWQIdNRP0g5QJRTOYDhHqnSHGXeqCfZas23DuCE+21ml8szLFXWBBXpUD+Y jiyroU+dB0HucTaP+l9lNSJaU46/4/7XBfgol7OdI3Td2iPmiojkwTiY4laHGfc4SuaM7CsILm6Cj LcLU2CSeGkC3pa14OTow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srYEl-0000000BdfD-46zF; Fri, 20 Sep 2024 07:39:31 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srYEg-0000000BdZc-0GuO for opensbi@lists.infradead.org; Fri, 20 Sep 2024 07:39:27 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2068a7c9286so18416265ad.1 for ; Fri, 20 Sep 2024 00:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726817964; x=1727422764; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CoOd9Sfi3HvDh6EoFMQIe0Yzc0O5fS8YSLwVqvj3TeA=; b=eATyYmagOQQElvqxGIxcuDqIA04nJMrInOQZAbDgTJcdO6UwZaJw5k9SMXwDtJ/KJf 1wZNoirTYvvYkeP+1FbIoYlYbM8frJnOaE0c82XfL+f657EH3GCjFFU9dNuLdYxyYVKS jY3IRS7y3UAcjJOGBdcViDtddI+mn1ojx2ZVSK+kdnqehotjt+MU580lvm7Du0pjvaaD xhOSEVcGCyj8MCyGWWg5lDlNGFTmsmsElNgNujbaJQ5atNFA5TZWLiyfMJT3W12xk91g kqhEDAnTGfpMOKkr8rP2b+yl4vTM3rDeozRJKnzxjlrHNUlXA4Ns9TDsKAVuY4oZ1LBF fEFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726817964; x=1727422764; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CoOd9Sfi3HvDh6EoFMQIe0Yzc0O5fS8YSLwVqvj3TeA=; b=IQDHDQB0rWwu9AsRiAwC91/hVWAGnwwY36XtjpjkNah+yJWuHM3QtQGdYTKk4BnDNT HxwI5p42d7x7RJO65ix1Q7SNKtcjdCUnwFRFH8dUiNtiFn8VVE3e3uSAlBxICkM5mMGn GJjOyoejKQe+oaV8zqJRPWYIxp7GEW0BNHiB8Af7ozEYYb84XG/tBoYMaaPMlbslMi/m 5O3ciVrO5qTWXa3P0hqtLC+g3loSOCpk6/GJgTU7Te9KFI2C4hnl/UxIs6n3bii7Y58b ZD/smAQnDhmhKTCr/q9v0qnrFuzGSG2fgcYJfPZdaxf5A/Hz0KAWq2rHIQR+ohXfVBZy 1rEQ== X-Gm-Message-State: AOJu0YzoTGvtdKt9zNdxrbA3HPutmIU4GWUlfRu7WJ6ruaWCGYASSqpT S+V0U8elz6JQOhDVtGr6LVCF6EY3Zi7aMZIW3IJn6B+m3xz3VcfSF85MBQ== X-Google-Smtp-Source: AGHT+IHdr44P0O7Q/YpIA8VqUY57l6Csm/ZnsM+L2LnTGEyjoJe0pfRuANgsiWREZOhpVdMGNtAM6g== X-Received: by 2002:a17:902:f687:b0:203:a051:a29b with SMTP id d9443c01a7336-208d8338b15mr35187535ad.7.1726817964280; Fri, 20 Sep 2024 00:39:24 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-207946d663csm89863355ad.175.2024.09.20.00.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 00:39:23 -0700 (PDT) From: Inochi Amaoto To: opensbi@lists.infradead.org Cc: Xing Xiaoguang , Xiang W , Inochi Amaoto Subject: [PATCH v2 0/2] platform: improve heap size handle Date: Fri, 20 Sep 2024 15:37:34 +0800 Message-ID: <20240920073738.597300-1-inochiama@gmail.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240920_003926_122905_2B0BEED8 X-CRM114-Status: UNSURE ( 7.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This patch is split into two parts: 1. the first part is used to adjust the default heap size and make it more driven by the CPU as most allocation is percpu. I think this could reduce the further enlarge for the default heap size. Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:635 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [inochiama(at)gmail.com] X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This patch is split into two parts: 1. the first part is used to adjust the default heap size and make it more driven by the CPU as most allocation is percpu. I think this could reduce the further enlarge for the default heap size. 2. the second part is introduce a DT-based "heap-size", so the platform can set the suitable heap-size. This is serve as a more generic solution for some platform. Changed from v1: 1. add forgot BIT_ALIGN when processing DT-based "heap-size". Inochi Amaoto (2): platform: ensure enough heap size with debug triggers extension platform: introduce DT-based configurable heap size docs/opensbi_config.md | 4 ++++ include/sbi/sbi_platform.h | 2 +- platform/generic/platform.c | 28 +++++++++++++++++++++++++--- 3 files changed, 30 insertions(+), 4 deletions(-) --- 2.46.1