From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH 4/4] driver core: Allow showing cpu as offline if not valid in cpuset context Date: Mon, 14 Jun 2021 19:00:53 +0200 Message-ID: References: <20210614152306.25668-1-longman@redhat.com> <20210614152306.25668-5-longman@redhat.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623690056; bh=7iMl6YWN5AAOYzZBpWX/eEVFpy+IzMJ9khgpokIOPyw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HpBtaTRL2kH+P7hq4lH5uSTVhat+kchmH3KHZkk8D09fXytlYCzjwbp6qo0EqqfeS P74Orzf4PorJCN+DwYaNasW9xG2oBIF1FPYyfNQCAB1mUNngHKqx8mCXS+aps/KMFz 6oklC/0YoJwkpZDQTFB6FbKp1EWHG0wwR3YN+xNc= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Waiman Long Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Luis Chamberlain , Kees Cook , Iurii Zaikin , x86@kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org On Mon, Jun 14, 2021 at 12:32:01PM -0400, Waiman Long wrote: > On 6/14/21 11:52 AM, Greg KH wrote: > > On Mon, Jun 14, 2021 at 11:23:06AM -0400, Waiman Long wrote: > > > Make /sys/devices/system/cpu/cpu/online file to show a cpu as > > > offline if it is not a valid cpu in a proper cpuset context when the > > > cpuset_bound_cpuinfo sysctl parameter is turned on. > > This says _what_ you are doing, but I do not understand _why_ you want > > to do this. > > > > What is going to use this information? And now you are showing more > > files than you previously did, so what userspace tool is now going to > > break? > > One reason that is provided by the customer asking for this functionality is > because some applications use the number of cpu cores for licensing purpose. > Even though the applications are running in a container with a smaller set > of cpus, they may still charge as if all the cpus are available. They ended > up using a bind mount to mount over the cpuX/online file. Great, then stick with the bind mount for foolish things like that. There's no technical reason for doing this then, just marketing? thanks, greg k-h