All of lore.kernel.org
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com
Cc: vikas.shivappa@linux.intel.com, dave.hansen@intel.com,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	linux-kernel@vger.kernel.org,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [RFC PATCH 07/20] x86/intel_rdt: Connect pseudo-locking directory to operations
Date: Mon, 13 Nov 2017 08:39:30 -0800	[thread overview]
Message-ID: <8400c5d421510914f7061f88058e7b8490fa4ba5.1510568528.git.reinette.chatre@intel.com> (raw)
In-Reply-To: <cover.1510568528.git.reinette.chatre@intel.com>
In-Reply-To: <cover.1510568528.git.reinette.chatre@intel.com>

As a dependent of RDT/CAT we hook up the pseudo-locking files
initialization to that of RDT/CAT. The initial operations of mkdir/rmdir
used to create pseudo-locked regions are now hooked up also.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
index c711df201e57..afa3795a124e 100644
--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@ -1179,13 +1179,19 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type,
 		goto out_cdp;
 	}
 
+	ret = rdt_pseudo_lock_fs_init(rdtgroup_default.kn);
+	if (ret) {
+		dentry = ERR_PTR(ret);
+		goto out_info;
+	}
+
 	if (rdt_mon_capable) {
 		ret = mongroup_create_dir(rdtgroup_default.kn,
 					  NULL, "mon_groups",
 					  &kn_mongrp);
 		if (ret) {
 			dentry = ERR_PTR(ret);
-			goto out_info;
+			goto out_psl;
 		}
 		kernfs_get(kn_mongrp);
 
@@ -1226,6 +1232,8 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type,
 out_mongrp:
 	if (rdt_mon_capable)
 		kernfs_remove(kn_mongrp);
+out_psl:
+	rdt_pseudo_lock_fs_remove();
 out_info:
 	kernfs_remove(kn_info);
 out_cdp:
@@ -1374,6 +1382,7 @@ static void rmdir_all_sub(void)
 	/* Notify online CPUs to update per cpu storage and PQR_ASSOC MSR */
 	update_closid_rmid(cpu_online_mask, &rdtgroup_default);
 
+	rdt_pseudo_lock_fs_remove();
 	kernfs_remove(kn_info);
 	kernfs_remove(kn_mongrp);
 	kernfs_remove(kn_mondata);
@@ -1796,6 +1805,9 @@ static int rdtgroup_mkdir(struct kernfs_node *parent_kn, const char *name,
 	if (strchr(name, '\n'))
 		return -EINVAL;
 
+	if (parent_kn == pseudo_lock_kn)
+		return rdt_pseudo_lock_mkdir(name, mode);
+
 	/*
 	 * If the parent directory is the root directory and RDT
 	 * allocation is supported, add a control and monitoring
@@ -1905,6 +1917,9 @@ static int rdtgroup_rmdir(struct kernfs_node *kn)
 	cpumask_var_t tmpmask;
 	int ret = 0;
 
+	if (parent_kn == pseudo_lock_kn)
+		return rdt_pseudo_lock_rmdir(kn);
+
 	if (!zalloc_cpumask_var(&tmpmask, GFP_KERNEL))
 		return -ENOMEM;
 
-- 
2.13.5

  parent reply	other threads:[~2017-11-14  0:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 16:39 [RFC PATCH 00/20] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 01/20] x86/intel_rdt: Documentation for Cache Pseudo-Locking Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 02/20] x86/intel_rdt: Make useful functions available internally Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 03/20] x86/intel_rdt: Introduce hooks to create pseudo-locking files Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 04/20] x86/intel_rdt: Introduce test to determine if closid is in use Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 05/20] x86/intel_rdt: Print more accurate pseudo-locking availability Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 06/20] x86/intel_rdt: Create pseudo-locked regions Reinette Chatre
2017-11-13 16:39 ` Reinette Chatre [this message]
2017-11-13 16:39 ` [RFC PATCH 08/20] x86/intel_rdt: Introduce pseudo-locking resctrl files Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 09/20] x86/intel_rdt: Discover supported platforms via prefetch disable bits Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 10/20] x86/intel_rdt: Disable pseudo-locking if CDP enabled Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 11/20] x86/intel_rdt: Associate pseudo-locked regions with its domain Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 12/20] x86/intel_rdt: Support CBM checking from value and character buffer Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 13/20] x86/intel_rdt: Support schemata write - pseudo-locking core Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 14/20] x86/intel_rdt: Enable testing for pseudo-locked region Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 15/20] x86/intel_rdt: Prevent new allocations from pseudo-locked regions Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 16/20] x86/intel_rdt: Create debugfs files for pseudo-locking testing Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 17/20] x86/intel_rdt: Create character device exposing pseudo-locked region Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 18/20] x86/intel_rdt: More precise L2 hit/miss measurements Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 19/20] x86/intel_rdt: Support L3 cache performance event of Broadwell Reinette Chatre
2017-11-13 16:39 ` [RFC PATCH 20/20] x86/intel_rdt: Limit C-states dynamically when pseudo-locking active Reinette Chatre
2017-11-18  0:48 ` [RFC PATCH 00/20] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling Thomas Gleixner
2017-11-18  6:42   ` Reinette Chatre
2018-01-14 22:54     ` Thomas Gleixner
2018-01-15 16:23       ` Hindman, Gavin
2018-01-16 11:38         ` Thomas Gleixner
2018-01-17  0:53           ` Reinette Chatre
2018-02-12 19:07           ` Reinette Chatre
2018-02-13 10:27             ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8400c5d421510914f7061f88058e7b8490fa4ba5.1510568528.git.reinette.chatre@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vikas.shivappa@linux.intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.