Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6285800ybf; Thu, 5 Mar 2020 17:17:24 -0800 (PST) X-Google-Smtp-Source: ADFU+vs6KasnQIMdWRA8wI1D5MrvFypKHvI5zR1ahF3fG/gITAyOXXXLnodOzhMq1+Ef87r4cxOY X-Received: by 2002:a9d:6c4f:: with SMTP id g15mr565402otq.96.1583457444180; Thu, 05 Mar 2020 17:17:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583457444; cv=none; d=google.com; s=arc-20160816; b=pyfZ3nJtrTTg30nf8A6wB2jHmxLPWUdn4Ny0dpI+5qEW1c6n+s7xGQTUUMKFyPAJ/u w9oWSCOCTfcBOHjAMKjvdgnbZyDXIopJ5j8vglUcymZrYlbWTQqHiGNn6jwT65xAcpdP ZpKWjCZmz54vSnLslz/EzT6Zf0VMi35hrO80QpOy/H0DYJoA0tTn5IeBdrmBHHE0OFYW 75L16ym5zY9GaaywSIc1usrXilFOXoNHkgz0OFMDOkAqyRzQ2KR/S/pdrxR3EWePvrDR imzKTwolyfQICUrxPRDaNxTPnlYs0tQGKyiH0AqgBYOflhD/ll0Fz+xSDSJAUHZiECrd 6Bgg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=w/Vqkumn/RHHCHsg28o5TElun0WCp3EnRDLyxx7bNCY=; b=hk4M2Zv+z91uuFxYHlZiAD1osAPHDWl3mf+epK/WhUwEF+2g9WmW6r/1tPNrS/4LOn rZtm85UsPmNS1W3gEJjun99SvqMX8k+gW1NzPQA53ujQhmKEKgl8ZFT4qUuzwDthKTWu XSee6Dl+vGG8x8rohky8Rbc93oUoGl+DAgTYIV3o5ffUv+pqxwBFuvSwmD/7089U+fRu XqGCe0RMsoc4/lkkfAAPWHKRrq5G502VVzPF88Mqw6kHTTPu/NwAr4e7xO8N89Iif2jB iS09E9xl9rttk5L6Rbaylv+3rN/qTlQ4eamxyePNkMNWh/hM6GXqXdW6j6nF6bIjE9Sd 7p6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=NG1T3fBT; 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 i8si382100otr.227.2020.03.05.17.17.12; Thu, 05 Mar 2020 17:17:24 -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=pass header.i=@joelfernandes.org header.s=google header.b=NG1T3fBT; 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 S1726440AbgCFBQg (ORCPT + 99 others); Thu, 5 Mar 2020 20:16:36 -0500 Received: from mail-qv1-f68.google.com ([209.85.219.68]:39031 "EHLO mail-qv1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbgCFBQf (ORCPT ); Thu, 5 Mar 2020 20:16:35 -0500 Received: by mail-qv1-f68.google.com with SMTP id fc12so237079qvb.6 for ; Thu, 05 Mar 2020 17:16:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w/Vqkumn/RHHCHsg28o5TElun0WCp3EnRDLyxx7bNCY=; b=NG1T3fBTXkAXVDjCWQdULYeSHkaWIO+lNW6+qNFMIb0eh3q05SunsJOTOTzaMoCmd/ zVA4gLfxEBLo2TdLQitZbT9fcbCOceM167cFWG8DEi3qZ7q9Ny6f1A6/Z8nW8PnPTNxo hHV6gR6kvmC3goH5y5vM7m/K1vWRjrZuR62m0= 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:mime-version :content-transfer-encoding; bh=w/Vqkumn/RHHCHsg28o5TElun0WCp3EnRDLyxx7bNCY=; b=dlERY2QjBdpul9pJwDA964C9FakCsnKmHJxdsTfF2XicfGz2gYdPqnRuzd2f6cznbg uGZiIsEkem3Vz/EsK7u1Qua/sLLLEryim2QgmVuywgTW0ibmZz/ECLW6PEmTx/qqB6N7 14krdaPeFRqtOBsXom0Li4xnv7tP9n+6nsbCtBBSOLSLJhUXBVq7cDXtSgkgTK5yJOBW pDuaejwLMbIF7sAPP/lnvGkwHGAVufEsHyaquIpwgfEKSgUEDCgPrlyBeUOAZWf6fm4/ pGw0eM3yXNI5UIt8rFd9jyw3OP7744AEYKe+hDg/1XFpa4JPeux8pmz/2kIYqFo0e0hv wCUw== X-Gm-Message-State: ANhLgQ3Mn6fNfV38V9CYvOZlbQ/8XpkonspopG26bIzdEPjtUXj2VDzV /tHnzootyiDu97B3RjRXLAvO/LfXBco= X-Received: by 2002:a0c:f381:: with SMTP id i1mr948212qvk.163.1583457394590; Thu, 05 Mar 2020 17:16:34 -0800 (PST) Received: from joelaf.cam.corp.google.com ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id 65sm16934009qtf.95.2020.03.05.17.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 17:16:34 -0800 (PST) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , Davidlohr Bueso , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , "Paul E. McKenney" , rcu@vger.kernel.org, Steven Rostedt , urezki@gmail.com Subject: [PATCH rcu-dev 1/2] rcuperf: Add ability to increase object allocation size Date: Thu, 5 Mar 2020 20:16:25 -0500 Message-Id: <20200306011626.97616-1-joel@joelfernandes.org> X-Mailer: git-send-email 2.25.0.265.gbab2e86ba0-goog 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 allows us to increase memory pressure dynamically using a new rcuperf boot command line parameter called 'rcumult'. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcuperf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c index a4a8d097d84d9..16dd1e6b7c09f 100644 --- a/kernel/rcu/rcuperf.c +++ b/kernel/rcu/rcuperf.c @@ -88,6 +88,7 @@ torture_param(bool, shutdown, RCUPERF_SHUTDOWN, torture_param(int, verbose, 1, "Enable verbose debugging printk()s"); torture_param(int, writer_holdoff, 0, "Holdoff (us) between GPs, zero to disable"); torture_param(int, kfree_rcu_test, 0, "Do we run a kfree_rcu() perf test?"); +torture_param(int, kfree_mult, 1, "Multiple of kfree_obj size to allocate."); static char *perf_type = "rcu"; module_param(perf_type, charp, 0444); @@ -635,7 +636,7 @@ kfree_perf_thread(void *arg) } for (i = 0; i < kfree_alloc_num; i++) { - alloc_ptr = kmalloc(sizeof(struct kfree_obj), GFP_KERNEL); + alloc_ptr = kmalloc(kfree_mult * sizeof(struct kfree_obj), GFP_KERNEL); if (!alloc_ptr) return -ENOMEM; @@ -722,6 +723,8 @@ kfree_perf_init(void) schedule_timeout_uninterruptible(1); } + pr_alert("kfree object size=%lu\n", kfree_mult * sizeof(struct kfree_obj)); + kfree_reader_tasks = kcalloc(kfree_nrealthreads, sizeof(kfree_reader_tasks[0]), GFP_KERNEL); if (kfree_reader_tasks == NULL) { -- 2.25.0.265.gbab2e86ba0-goog