From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 552C1267B07 for ; Mon, 19 Jan 2026 11:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768822587; cv=none; b=cc1WoqGVmhiJb9FieQS2cisN+KIcse5DaBPtSjIddIqi+53+meCfTnTvNDOw6tMG3HtCERVv8iaqAfnXDQ+wIcJR6T1AU0UQRZT3+bOb3VmA8KWnx3AKbc9/1DacziZ7X+Ra6+6hvuBO14nfwIALfSSRhGAXCKfWUAlTnC223nI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768822587; c=relaxed/simple; bh=/4Kot4dqgtCYVgtIwmsRfrcIGEeUI2K4K//pbiu03tw=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ayn5AhhDICqSIPKp/MJi4KdngirUcLqSxPw7AfZ15H7+NiUAOuyHJTFOwNeryVpmDlwuTgP17FJ8uKO9eekVFC2Zj9tQJ+9Z8RjVaj5Pntg6zJgVWq26Wx27vFQ+MH9bQR8Pyg18ZARFXWExscS6g2rVuAAU/94tmcVjz+sR2KY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=epBRBT7c; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="epBRBT7c" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-59b7882e605so5562694e87.0 for ; Mon, 19 Jan 2026 03:36:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768822584; x=1769427384; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=oFpnCWhGNwWJuXsGKzqihX1fGRnDgxZyJ8bknQ6BEd4=; b=epBRBT7cofdwois1COaXrgctmVZNhfCBPf/WUZly8AqL5l70uYDPWCAYI6OvBt4Be5 ebYJmTLLec9VZKr/5q8AzEwjNHGfyQaR+Lb8Z7ReMFBwyFbhjmAo+4RdVCE39gsEJFI/ cXjH6A8BtCyScCaAt8BFib/ZkKoS+WOeFgZNQejhfB3j6FBE+tEMjvzxt7od3H72KOGk mOYp4CurxMKrmYpEC1oTfjaj+IWeW9VdU/IETdnMRnqltDCkJ6SHgcwt6shpNy7b0zrE PLE1C0tkpeTIFOq1yUMu5/BP+nNy63OvEZD2jMHcoIZsxxSND2k9W2EjkQyy9tlda8QM Bq2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768822584; x=1769427384; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oFpnCWhGNwWJuXsGKzqihX1fGRnDgxZyJ8bknQ6BEd4=; b=Aakx3sjvpdPDl/C8cB4b06sDD3tcXotzTyvwN94E6NSlZb8jYUqwiTnpQQ1dn3fyx9 OwUsKSz/161sf65mFmODGnmv+SbR5cU3aPpCeUD+OzmBI3BoLbMQbUZ6JSkKXHjV1W+N sTYJECJNJ6CnystunUllnZNdNZF8ZUdQbrgy6vM7ZuOPJJOmOpxeA2a3bEzKhXRNgVZP 3jV6PhT1eScrlvPhe7Rwb3H5AcBdhHPwcjWwAsve82247GQOhhCwPKyB0Lll1iE3a/FH m7s8Nz9j5SnUq4yFc6nqvZCuKCpT2JHI9rADmp5IK2WI3WnvCk/f5qolY0d0EB9iUE5N s1Tg== X-Forwarded-Encrypted: i=1; AJvYcCXEVEGcTmmuQHX9dYZZsJoco8FZJDK1RFZNr2XUU4eY27brNRt/MCOmCFOOGzD3D1h4DYl/F8Cyvfnegwc=@vger.kernel.org X-Gm-Message-State: AOJu0YzASgiCKZkBGsu6UxbLOhpWpltDRETX7j2OGxXDWtbZlCSRpoWe D2meA0pA4w9g+LQ9uLxVupOzZsoq/hum9Ue+PRmG0+tvWN9meFA4pvOw X-Gm-Gg: AY/fxX6J7maj6Bh8dvbqgm+MrhzUp+cnEYRu3mH2Awzmhshz2MoMIHI3a2iF+gDF1iK SO2C3AGMpuHBB41iPfAyXlt8bEVGru2U9/A74d68IM1uHQWaybIL0z+fBV33YRH3/vrsyQ1DhMZ oWYTkg1VAQnnSRon11FLji+IHhA8GY/iJa6G/Wfpl4n1h5ARq4uaC0Fy4gSdHKkodR6SlplRbFP hoEYOeOP45j+3BIHptO7Uc8ZRfkJJGR+NFhOxwR1YomyafOCwOme7OKRHR2qXnum7ydpYnUGFny goUtzYy1sRdltEvR5MyCkHAcN/o5kByBg6zfYEEFJHvNysMk2YOW1mtxgPAbfRYSqXS0NsU6NbK hF93hxnoVvr7DHAe5CnV47dEbFzV3+u7YCoIt4iIBAqun4T7pWqPI X-Received: by 2002:a05:6512:3b07:b0:59b:b3e3:c7fb with SMTP id 2adb3069b0e04-59bb3e3c825mr3094854e87.9.1768822584194; Mon, 19 Jan 2026 03:36:24 -0800 (PST) Received: from milan ([2001:9b1:d5a0:a500::24b]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59baf397ae4sm3285108e87.59.2026.01.19.03.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 03:36:23 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 19 Jan 2026 12:36:21 +0100 To: Audra Mitchell Cc: Audra Mitchell , shuah@kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, surenb@google.com, rppt@kernel.org, vbabka@suse.cz, Liam.Howlett@oracle.com, lorenzo.stoakes@oracle.com, david@kernel.org, urezki@gmail.com, raquini@redhat.com, Andrew Morton Subject: Re: [PATCH] lib/test_vmalloc.c: Minor fixes to test_vmalloc.c Message-ID: References: <20251201181848.1216197-1-audra@redhat.com> <20260118173036.fd0784f59848303024065b9b@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260118173036.fd0784f59848303024065b9b@linux-foundation.org> On Sun, Jan 18, 2026 at 05:30:36PM -0800, Andrew Morton wrote: > On Mon, 1 Dec 2025 13:18:48 -0500 Audra Mitchell wrote: > > > If PAGE_SIZE is larger than 4k and if you have a system with a > > large number of CPUs, this test can require a very large amount > > of memory leading to oom-killer firing. Given the type of allocation, > > the kernel won't have anything to kill, causing the system to > > stall. Add a parameter to the test_vmalloc driver to represent the > > number of times a percpu object will be allocated. Calculate this > > in test_vmalloc.sh to be 90% of available memory or the current > > default of 35000, whichever is smaller. > > > > ... > > > > --- a/lib/test_vmalloc.c > > +++ b/lib/test_vmalloc.c > > @@ -57,6 +57,9 @@ __param(int, run_test_mask, 7, > > /* Add a new test case description here. */ > > ); > > > > +__param(int, nr_pcpu_objects, 35000, > > + "Number of pcpu objects to allocate for pcpu_alloc_test"); > > + > > /* > > * This is for synchronization of setup phase. > > */ > > @@ -292,24 +295,24 @@ pcpu_alloc_test(void) > > size_t size, align; > > int i; > > > > - pcpu = vmalloc(sizeof(void __percpu *) * 35000); > > + pcpu = vmalloc(sizeof(void __percpu *) * nr_pcpu_objects); > > Could have used vmalloc_array() here. Otherwise lgtm, thanks. > We can also reduce the default number from 35 000 to smaller one since this patch makes it possible to control it via parameter. -- Uladzislau Rezki