lkml.org 
[lkml]   [2018]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:x86/cache] x86/intel_rdt: Provide pseudo-locking hooks within rdt_mount
    Commit-ID:  32206ab36553be8714d9253ce33f4085681d369c
    Gitweb: https://git.kernel.org/tip/32206ab36553be8714d9253ce33f4085681d369c
    Author: Reinette Chatre <reinette.chatre@intel.com>
    AuthorDate: Fri, 22 Jun 2018 15:41:52 -0700
    Committer: Thomas Gleixner <tglx@linutronix.de>
    CommitDate: Sat, 23 Jun 2018 12:53:19 +0200

    x86/intel_rdt: Provide pseudo-locking hooks within rdt_mount

    Stephen Rothwell reported that the Cache Pseudo-Locking enabling and the
    kernfs support for mounting with fs_context are conflicting.

    In preparation for a conflict-free merge between the two repos some no-op
    hooks are created within the RDT mount function being changed by the two
    features. The goal is for this commit to be placed on a minimal no-rebase
    branch to be consumed by both features.

    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Suggested-by: Al Viro <viro@ZenIV.linux.org.uk>
    Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: fenghua.yu@intel.com
    Cc: tony.luck@intel.com
    Cc: vikas.shivappa@linux.intel.com
    Cc: gavin.hindman@intel.com
    Cc: jithu.joseph@intel.com
    Cc: dave.hansen@intel.com
    Cc: hpa@zytor.com
    Cc: David Howells <dhowells@redhat.com>
    Link: https://lkml.kernel.org/r/410697ead08978bd12111c0afc4ce9e7bd71a5fe.1529706536.git.reinette.chatre@intel.com

    ---
    arch/x86/kernel/cpu/intel_rdt.h | 9 +++++++++
    arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 10 +++++++++-
    2 files changed, 18 insertions(+), 1 deletion(-)

    diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h
    index 39752825e376..be152b3b2543 100644
    --- a/arch/x86/kernel/cpu/intel_rdt.h
    +++ b/arch/x86/kernel/cpu/intel_rdt.h
    @@ -468,4 +468,13 @@ void cqm_handle_limbo(struct work_struct *work);
    bool has_busy_rmid(struct rdt_resource *r, struct rdt_domain *d);
    void __check_limbo(struct rdt_domain *d, bool force_free);

    +/*
    + * Define the hooks for Cache Pseudo-Locking to use within rdt_mount().
    + * These are no-ops provided for the new kernfs changes to use as a
    + * baseline in preparation for a conflict-free merge between it
    + * (kernfs changes) and the Cache Pseudo-Locking enabling.
    + */
    +static inline int rdt_pseudo_lock_init(void) { return 0; }
    +static inline void rdt_pseudo_lock_release(void) { }
    +
    #endif /* _ASM_X86_INTEL_RDT_H */
    diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
    index 749856a2e736..fa668f967062 100644
    --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
    +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
    @@ -1289,10 +1289,16 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type,
    rdtgroup_default.mon.mon_data_kn = kn_mondata;
    }

    + ret = rdt_pseudo_lock_init();
    + if (ret) {
    + dentry = ERR_PTR(ret);
    + goto out_mondata;
    + }
    +
    dentry = kernfs_mount(fs_type, flags, rdt_root,
    RDTGROUP_SUPER_MAGIC, NULL);
    if (IS_ERR(dentry))
    - goto out_mondata;
    + goto out_psl;

    if (rdt_alloc_capable)
    static_branch_enable_cpuslocked(&rdt_alloc_enable_key);
    @@ -1310,6 +1316,8 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type,

    goto out;

    +out_psl:
    + rdt_pseudo_lock_release();
    out_mondata:
    if (rdt_mon_capable)
    kernfs_remove(kn_mondata);
    \
     
     \ /
      Last update: 2018-06-23 14:07    [W:3.724 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site