Received: by 10.223.164.202 with SMTP id h10csp204201wrb; Mon, 13 Nov 2017 16:47:53 -0800 (PST) X-Google-Smtp-Source: AGs4zMZCOpEhg1E/eATwjZSCGu2HqhCsZp4dsXYfBFg/jQERc59oW7uJBPusLUYavpBVNfH6/CGV X-Received: by 10.84.138.131 with SMTP id 3mr10489377plp.238.1510620473168; Mon, 13 Nov 2017 16:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510620473; cv=none; d=google.com; s=arc-20160816; b=qpap5FBiVf8Yoi0kpOnL7+RoFqS/UJT7ijIwrjIDDDAtAojskwyUjLMyERq3jF0RUf C6zYhQbk/VIwcYVWEDakobOctVXw/qJwf6rUzfRsshfQqND8V+SBasOja+WsO2yjrAsw UG6F1BNJgtxqJIzowKivh4h9pMbfiCkJ77arNPN+IXRNjme3L2bOQxesX1IkLHxDAOF3 1K1Y8b5MTuD4Eyiz2o/lVwKzZDKW7bIK/FTGA63nHur6lRp4HDTWDo0tl1Iq/PTi3r8D v+Lp0WgIOKBnYjfkNMDm/BK/DZ2EFisdWuTBeSFm6pHRa23hDEvGAkqxfr+B6433wbNT 5gpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=L9W6jxVbq4wywpBoumUPeIQ6NCf7F0agF1GH383DzZM=; b=oVq5EUlOAy37Kz9WK5w+GTx+BQ2eZuMkgTwJ/J9rPot9SQ3ubI4Jq15ZL+gzZ5AGSF 5KBW38mf0L6gkiot3Jpyg7k/Nr+mLAhUXqTlTgnIVh54eGptWO7kx6ylEAy39ysW5rx2 FdU1P7fk0IOHmt6pqUeNEhl9oSy0FKn9n+onUN3C3PbIA9g/bSd3XjGcQfMC1FTI/Wtm XDLCQB5IYl8ekU9BK6iM+53FvaWo12V5skHHasKwdAfcmCJUAdamSvtz7+f/H6eck1NN BdavTK1oXYcKf3QWw8Fmyp7+t+Tn3qb/19RKHM1p26XI8er93+SY32QjsBPcp++Cc7he aNSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t123si14433010pgc.151.2017.11.13.16.47.40; Mon, 13 Nov 2017 16:47:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753488AbdKNApv (ORCPT + 90 others); Mon, 13 Nov 2017 19:45:51 -0500 Received: from mga01.intel.com ([192.55.52.88]:37796 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbdKNAmV (ORCPT ); Mon, 13 Nov 2017 19:42:21 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2017 16:42:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,392,1505804400"; d="scan'208";a="2288284" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by fmsmga001.fm.intel.com with ESMTP; 13 Nov 2017 16:42:20 -0800 From: Reinette Chatre 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 Subject: [RFC PATCH 10/20] x86/intel_rdt: Disable pseudo-locking if CDP enabled Date: Mon, 13 Nov 2017 08:39:33 -0800 Message-Id: <5c140012cca1f7215a452dcb5074bd57fbe558fb.1510568528.git.reinette.chatre@intel.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pseudo-locking can work when Code and Data Prioritization (CDP) is enabled, but there are a few additional checks and actions involved. At this time it is not clear if users would want to use pseudo-locking and CDP at the same time so the support of this is delayed until we understand the usage better. Disable pseudo-locking if CDP is enabled. Add the details of things to keep in mind for anybody considering enabling this support. Signed-off-by: Reinette Chatre --- arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c index a0c144b5b09b..d2fe8ef7e74a 100644 --- a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c +++ b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c @@ -443,6 +443,34 @@ int rdt_pseudo_lock_fs_init(struct kernfs_node *root) lockdep_assert_held(&rdtgroup_mutex); /* + * Pseudo-locking not supported when CDP is enabled. + * + * Some things to consider if you would like to enable this support: + * - When CDP is enabled two separate resources are exposed, L3DATA + * and L3CODE, but they are actually on the same cache. The + * implication for pseudo-locking is that if a pseudo-locked + * region is created on a domain of one resource (eg. L3CODE), + * then a pseudo-locked region cannot be created on that same + * domain of the other resource (eg. L3DATA). This is because + * the creation of a pseudo-locked region involves a call to + * wbinvd that will affect all cache allocations on particular + * domain. + * - Considering the previous, it may be possible to only expose + * one of the CDP resources to pseudo-locking and hide the other. + * For example, we could consider to only expose L3DATA and since + * the L3 cache is unified it is still possible to place + * instructions there are execute it. + * - If only one region is exposed to pseudo-locking we should still + * keep in mind that availability of a portion of cache for + * pseudo-locking should take into account both resources. Similarly, + * if a pseudo-locked region is created in one resource, the portion + * of cache used by it should be made unavailable to all future + * allocations from both resources. + */ + if (rdt_resources_all[RDT_RESOURCE_L3DATA].alloc_enabled) + return 0; + + /* * Not knowing the bits to disable prefetching is not a failure * that should be propagated since we only return prefetching bits * for those platforms pseudo-locking has been tested on. If -- 2.13.5 From 1583991552101138692@xxx Mon Nov 13 22:27:40 +0000 2017 X-GM-THRID: 1583931789428596279 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread