From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 549DE1F37B8; Mon, 3 Mar 2025 10:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740998798; cv=none; b=oD1r5ZNBZoMQB6B590NM5ou4SCp/YdtwfKlZ+atTacwFedNRVnp0TeoriwRJAa/3w+LBpTvapmkfFOasBbe5RZd3qUDPw+YLN37sNADZn2lt+v2R4K0Dpgtv98I//MhX7hBLfdk6xjXZIWQKe7bC4MuJk5KhkIpdmqfGwrN/fTE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740998798; c=relaxed/simple; bh=679jHHpJiH/QrdZhvnaAMRPukFFs582fj75sGybLgHw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UsE07TrPtxC6pTyxdHm4jdMkqNYJPpBN+ygi24t+HWnwr6Wqnue3Pxkq6OD1CF0SxRTuTakTimWurc44EescM42xxsUJvUkgdyPHgWNZfhJ2lZMhKsg/Xv0ykbU9Xc1yIXSe2abt79qFsHE/HViMuTQwe3UMDZQHHPpv2nlU48w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6BC34113E; Mon, 3 Mar 2025 02:46:49 -0800 (PST) Received: from [10.163.38.109] (unknown [10.163.38.109]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C56143F66E; Mon, 3 Mar 2025 02:46:32 -0800 (PST) Message-ID: Date: Mon, 3 Mar 2025 16:16:29 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads To: Brendan Jackman Cc: Lorenzo Stoakes , Andrew Morton , Shuah Khan , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250228-mm-selftests-v3-0-958e3b6f0203@google.com> <20250228-mm-selftests-v3-4-958e3b6f0203@google.com> <18ea9794-3901-4802-875c-b0327984a9d6@arm.com> Content-Language: en-US From: Dev Jain In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 03/03/25 4:04 pm, Brendan Jackman wrote: > On Mon, Mar 03, 2025 at 03:48:38PM +0530, Dev Jain wrote: >> >> >> On 03/03/25 3:17 pm, Brendan Jackman wrote: >>> On Fri, Feb 28, 2025 at 11:06:35PM +0530, Dev Jain wrote: >>>> Taking a cursory look at the test, it creates three threads for each cpu. >>>> The bounding of the variable is fine but that being the reason to rename the >>>> variable is not making sense to me. >>> >>> Hmm yeah the name needs to be more abstract. Do you think nr_workers >>> would be confusing? Or even just "parallelism" or nr_parallel? Or any >>> other ideas? >>> >>> FWIW I briefly looked at just cleaning this up to remove the global >>> variable but that's a bigger time investment than I can afford here I >>> think. (The local variable in stress() would still need a better name >>> anyway). >>> >>> Thanks for the review BTW! >> >> Your welcome. >> >> I personally prefer leaving it as is; unless someone comes up and completely >> cleans up the structure, let us save our collective brain cycles for more >> meaningful battles than renaming variables :) > > Hmm, I think that's a false economy on brain cycles. A variable called > nr_cpus that isn't a number of CPUs is bound to waste a bunch of > mental energy at some point in the future. > > Unless you strongly object I'll go for nr_parallel. It's not a great > name but, well... I think that probably just suggests it's not a great > variable, and I don't have time to fix that. nr_parallel sounds better for sure. In case you send out a new patch: Reviewed-by: Dev Jain