From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758704AbdAIV6W (ORCPT ); Mon, 9 Jan 2017 16:58:22 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:52447 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbdAIV6R (ORCPT ); Mon, 9 Jan 2017 16:58:17 -0500 Date: Mon, 9 Jan 2017 22:58:13 +0100 (CET) From: Thomas Gleixner To: Shaohua Li cc: LKML , Fenghua Yu , Peter Zijlstra Subject: Re: [PATCH] x86/intel_rdt: reinitialize cbm for new group allocation In-Reply-To: <91a513378542f2d81e39baf954d8f8c447fd1943.1483747472.git.shli@fb.com> Message-ID: References: <91a513378542f2d81e39baf954d8f8c447fd1943.1483747472.git.shli@fb.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Jan 2017, Shaohua Li wrote: > rdtgroup_rmdir deletes a group and frees the closid, but doesn't > reiniaialize domain's cbm to default for the closid. Next time the > closid is allocated again, 'schemata' will show old cbm. Rightfully so. Because that's the value which is in the configuration MSR. That's perfectly fine because nothing can use that closid and therefor the configuration MSR is completely irrelevant until the closid is reused. > We can do the reinitialization at free/alloc closid, but sounds doing it > at alloc is more nartual. What you are doing is not natural, it's just wrong. Assume the admin wants to keep the 'max_cbm' value for a domain and therefor does not update the schemata file, but the MSR still contains the old value. Not what you really want, right? If you really want to have the CBM values reset to max_cbm then this needs to be done when the directory is removed and this needs to be written to the hardware as well on all affected packages. Not sure if that's worth the effort. Thanks, tglx