Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1083252ybd; Wed, 26 Jun 2019 10:54:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFkZEZ6owxvlaipajGa2NSD7qyo/LxDz/WJ+YGo6Brr+UlEXY1xhaKp799UitouMhMVgTz X-Received: by 2002:a17:902:74c7:: with SMTP id f7mr6744349plt.329.1561571655269; Wed, 26 Jun 2019 10:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561571655; cv=none; d=google.com; s=arc-20160816; b=Df1qmwCHhFe3LE6lkR/QdYEJY07GMRLPp8l8RhVG1v9lFFcPtVOxpRtF6dWgE20Hf6 aPZfnblqt6Uttkc/yfOSpHxt+OyAA6UdTB6L/b2q9SaLOvjFfB62munKIvLBONjFVxVA saqvS96VAqoSHT70DHkTToauK6ZFGrnA9QO7jXp/Lt9AJq16e/6nhkpUrpPtQyagc5lU Rp+P9E/psAvaByYLKrmywXekYTW0e6ihvki8u2Wk5+KEO5riEBMV/X8WvibUqoe28AwW EL8ycc+44yM53U7O7KEnoMM23eGP8IWWzbwpK+F+W3o35KNlVdKTHsG8JBdHxNsgfOZS 3VyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=8GOt5LqpglvxgkV7atJBMmoMw0nFCyAopm/5Ytz3XSg=; b=Dz74GyM8Mem1POWBG155StQyPEaBBGR9QniTUHtaJNkG2vimMVNF6axfHW4WrLhPzg Ic62YNW9XQQRZyNGpmmHUUi7bpFeuI5foxV8AI5isz3D/Dh+ODu4HN5+HoQb/Dn4pi+U ibXzZBt0yxsZoytPwzXuGGp3LYz2cwTlsteygbErZ/NC14g+C7sGZiUsIMp+D6F8vBn/ 1PFk8pw4B/Al4kUKBKkC3GRzRxkCvTIRq6IYIDtqBaJed012nv/WKowWb4nwOBL+i0KZ mAQT9iSmduwn3eOmc/1ODu8Ac5tvIZKypVPVURfi77hQqsBLipfIo4HkxyeIANOQOXh3 OxaQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q185si10313289pga.565.2019.06.26.10.53.58; Wed, 26 Jun 2019 10:54:15 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726478AbfFZRvJ (ORCPT + 99 others); Wed, 26 Jun 2019 13:51:09 -0400 Received: from mga01.intel.com ([192.55.52.88]:49814 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726223AbfFZRvI (ORCPT ); Wed, 26 Jun 2019 13:51:08 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2019 10:51:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,420,1557212400"; d="scan'208";a="337288581" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by orsmga005.jf.intel.com with ESMTP; 26 Jun 2019 10:51:07 -0700 From: Reinette Chatre To: tglx@linutronix.de, fenghua.yu@intel.com, bp@alien8.de, tony.luck@intel.com Cc: mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre Subject: [PATCH 00/10] x86/CPU and x86/resctrl: Support pseudo-lock regions spanning L2 and L3 cache Date: Wed, 26 Jun 2019 10:48:39 -0700 Message-Id: X-Mailer: git-send-email 2.17.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Maintainers, Cache pseudo-locking involves preloading a region of physical memory into a reserved portion of cache that no task or CPU can subsequently fill into and from that point on will only serve cache hits. At this time it is only possible to create cache pseudo-locked regions in either L2 or L3 cache, supporting systems that support either L2 Cache Allocation Technology (CAT) or L3 CAT because CAT is the mechanism used to manage reservations of cache portions. This series introduces support for cache pseudo-locked regions that can span L2 and L3 cache in preparation for systems that may support CAT on L2 and L3 cache. Only systems with L3 inclusive cache is supported at this time because if the L3 cache is not inclusive then pseudo-locked memory within the L3 cache would be evicted when migrated to L2. Because of this constraint the first patch in this series introduces support in cacheinfo.c for resctrl to discover if the L3 cache is inclusive. All other patches in this series are to the resctrl subsystem. In support of cache pseudo-locked regions spanning L2 and L3 cache the term "cache pseudo-lock portion" is introduced. Each portion of a cache pseudo-locked region spans one level of cache and a cache pseudo-locked region can be made up of one or two cache pseudo-lock portions. On systems supporting L2 and L3 CAT where L3 cache is inclusive it is possible to create two types of pseudo-locked regions: 1) A pseudo-locked region spanning just L3 cache, consisting out of a single pseudo-locked portion. 2) A pseudo-locked region spanning L2 and L3 cache, consisting out of two pseudo-locked portions. In an L3 inclusive cache system a L2 pseudo-locked portion is required to be matched with an L3 pseudo-locked portion to prevent a cache line from being evicted from L2 when it is evicted from L3. Patches 2 to 8 to the resctrl subsystem are preparing for the new feature and should result in no functional change, but some comments do refer to the new feature. Support for pseudo-locked regions spanning L2 and L3 cache is introduced in patches 9 and 10. Your feedback will be greatly appreciated. Regards, Reinette Reinette Chatre (10): x86/CPU: Expose if cache is inclusive of lower level caches x86/resctrl: Remove unnecessary size compute x86/resctrl: Constrain C-states during pseudo-lock region init x86/resctrl: Set cache line size using new utility x86/resctrl: Associate pseudo-locked region's cache instance by id x86/resctrl: Introduce utility to return pseudo-locked cache portion x86/resctrl: Remove unnecessary pointer to pseudo-locked region x86/resctrl: Support pseudo-lock regions spanning resources x86/resctrl: Pseudo-lock portions of multiple resources x86/resctrl: Only pseudo-lock L3 cache when inclusive arch/x86/kernel/cpu/cacheinfo.c | 42 +- arch/x86/kernel/cpu/resctrl/core.c | 7 - arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 37 +- arch/x86/kernel/cpu/resctrl/internal.h | 39 +- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 444 +++++++++++++++++++--- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 61 ++- include/linux/cacheinfo.h | 4 + 7 files changed, 512 insertions(+), 122 deletions(-) -- 2.17.2