From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941690AbdAIWTQ (ORCPT ); Mon, 9 Jan 2017 17:19:16 -0500 Received: from mga04.intel.com ([192.55.52.120]:61677 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933515AbdAIWTL (ORCPT ); Mon, 9 Jan 2017 17:19:11 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,341,1477983600"; d="scan'208";a="806939845" Date: Mon, 9 Jan 2017 14:17:55 -0800 From: Fenghua Yu To: Thomas Gleixner Cc: Fenghua Yu , Shaohua Li , LKML , Peter Zijlstra Subject: Re: [PATCH] x86/intel_rdt: reinitialize cbm for new group allocation Message-ID: <20170109221754.GA47453@linux.intel.com> References: <91a513378542f2d81e39baf954d8f8c447fd1943.1483747472.git.shli@fb.com> <20170109215558.GA7138@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2017 at 11:03:59PM +0100, Thomas Gleixner wrote: > On Mon, 9 Jan 2017, Fenghua Yu wrote: > > On Fri, Jan 06, 2017 at 04:05:19PM -0800, Shaohua Li wrote: > > But since you come here now, I would think reseting the CBM in > > closid_free() is better. > > No. closid_free() is the wrong place. closid_alloc/free() merily deal with > the bitmap and nothing else. > > If you really want to do that, then this needs a seperate function called > from rmdir. > > > The reason is user can see "right" max_cbm even through rdmsr after > > rmdir, ie no gap for cbm values between rmdir and the next mkdir. > > And the value pf this is? Not very useful value, but user may get a bit confused by a non max_cbm if a closid is not used after rdmsr. A couple of users actually asked this. Reseting to initial max_cbm may reduce questions from users. > > The closid is not usable after the rmdir, so it's really completely > uninteresting when the user can read the old value from that configuration > MSR. Agree with you. The cbm value is uninteresting after rmdir. > > When the closid is reused then it hardly matters either what's in those cbm > values (the old or max_cbm). > > Thanks, > > tglx