Received: by 10.223.164.202 with SMTP id h10csp2325102wrb; Sat, 18 Nov 2017 19:14:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMaKw+HqJFIjVZjxXB5JF3Ucy+VtZdjxNB27byTHACU9Qvzgd3mbUN+OmynascnYhxb50cmh X-Received: by 10.98.16.199 with SMTP id 68mr4830872pfq.182.1511061268846; Sat, 18 Nov 2017 19:14:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511061268; cv=none; d=google.com; s=arc-20160816; b=todvM59UOr3q3NnTNS0S54o4Wk9iJwkmXJJTk0ikWUFrl9vvadlP7z68l0k0yC3AWh J/DoCe5QXx30j8tZVUgCC448ZvtnZYaua9Caofp1JJKEBjb8tjmfiRpZp3pqI2WluEHn az7AtV24v6PXTDuQCr903waPToQEHy3kRL+FseFcTLQSbnIAaymVeWDhk1/adEE0MX2X fxQwy6HAxk9y3zgH64LC6VtdOj7hyqxMRDnB09lUpNLB0N4YOPRiKKk2gwuyNUYYxKNV ivdqBVOiIm7JUqfc6S2Q0Z5+XElBumAbKXdgcDCejGlv4XUZRsRbLPWUpew1q60GSzNi d5Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=ZNE3q1cawX+nyv7sGrzDQh5YQ07hTLvUz7QGqKLZQWs=; b=gXlewR1W6Io5G4HK4uA78oRM+MZHT3vacDj42cecESwuXIuCJuiCKyYIEJwABultC9 TS6TIcgZGjwSj2PgALuHXyBE5KzDv+PxHydmjLIIAG0/JKVefNZ/lc2MOU6rIgNuypkx vvaV6l/bAeYgAS4Lll93S4Uu4CUQZU5kZG9g9aerX0XV+sV6fyIMQnXQOWqEQFmcgrku hMMmZ6rLyVBBsJMrEUdkQ8PLBmBWkgI8NEDrh5jkI3GTGAifpEven5Xq3JLMA6M3z+kp 2EmWMqaz3BSPaWxBcK80chtpzqZXbBLGwSbThdXS/6+T1bvZ04U4Gk5mT5OS2Rxityh4 6yWQ== 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 n129si5358183pgn.572.2017.11.18.19.14.15; Sat, 18 Nov 2017 19:14:28 -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 S967200AbdKRGmV (ORCPT + 93 others); Sat, 18 Nov 2017 01:42:21 -0500 Received: from mga05.intel.com ([192.55.52.43]:54145 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967046AbdKRGmP (ORCPT ); Sat, 18 Nov 2017 01:42:15 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Nov 2017 22:42:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,413,1505804400"; d="scan'208";a="9015498" Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.254.188.81]) ([10.254.188.81]) by orsmga002.jf.intel.com with ESMTP; 17 Nov 2017 22:42:14 -0800 Subject: Re: [RFC PATCH 00/20] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling To: Thomas Gleixner Cc: fenghua.yu@intel.com, tony.luck@intel.com, vikas.shivappa@linux.intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org References: From: Reinette Chatre Message-ID: <93415e33-6adf-047f-9a46-0862c3cd33b6@intel.com> Date: Fri, 17 Nov 2017 22:42:13 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On 11/17/2017 4:48 PM, Thomas Gleixner wrote: > On Mon, 13 Nov 2017, Reinette Chatre wrote: > > thanks for that interesting work. Before I start looking into the details > in the next days let me ask a few general questions first. Thank you very much for taking a look. I look forward to your feedback. > >> Cache Allocation Technology (CAT), part of Intel(R) Resource Director >> Technology (Intel(R) RDT), enables a user to specify the amount of cache >> space into which an application can fill. Cache pseudo-locking builds on >> the fact that a CPU can still read and write data pre-allocated outside >> its current allocated area on cache hit. With cache pseudo-locking data >> can be preloaded into a reserved portion of cache that no application can >> fill, and from that point on will only serve cache hits. The cache >> pseudo-locked memory is made accessible to user space where an application >> can map it into its virtual address space and thus have a region of >> memory with reduced average read latency. > > Did you compare that against the good old cache coloring mechanism, > e.g. palloc ? I understand where your question originates. I have not compared against PALLOC for two reasons: 1) PALLOC is not upstream and while inquiring about the status of this work (please see https://github.com/heechul/palloc/issues/4 for details) we learned that one reason for this is that recent Intel processors are not well supported. 2) The most recent kernel supported by PALLOC is v4.4 and also mentioned in the above link there is currently no plan to upstream this work for a less divergent comparison of PALLOC and the more recent RDT/CAT enabling on which Cache Pseudo-Locking is built. >> The cache pseudo-locking approach relies on generation-specific behavior >> of processors. It may provide benefits on certain processor generations, >> but is not guaranteed to be supported in the future. > > Hmm, are you saying that the CAT mechanism might change radically in the > future so that access to cached data in an allocated area which does not > belong to the current executing context wont work anymore? Most devices that publicly support CAT in the Linux mainline can take advantage of Cache Pseudo-Locking. However, Cache Pseudo-Locking is a model-specific feature so there may be some variation in if, or to what extent, current and future devices can support Cache Pseudo-Locking. CAT remains architectural. >> It is not a guarantee that data will remain in the cache. It is not a >> guarantee that data will remain in certain levels or certain regions of >> the cache. Rather, cache pseudo-locking increases the probability that >> data will remain in a certain level of the cache via carefully >> configuring the CAT feature and carefully controlling application >> behavior. > > Which kind of applications are you targeting with that? > > Are there real world use cases which actually can benefit from this and To ensure I answer your question I will consider two views. First, the "carefully controlling application behavior" referred to above refers to applications/OS/VMs running after the pseudo-locked regions have been set up. These applications should take care to not do anything, for example call wbinvd, that would affect the Cache Pseudo-Locked regions. Second, what you are also asking about is the applications using these Cache Pseudo-Locked regions. We do see a clear performance benefit to applications using these pseudo-locked regions. Latency sensitive applications could relocate their code as well as data to pseudo-locked regions for improved performance. > what are those applications supposed to do once the feature breaks with > future generations of processors? This feature is model specific with a few platforms supporting it at this time. Only platforms known to support Cache Pseudo-Locking will expose its resctrl interface. Reinette From 1584432362302068686@xxx Sat Nov 18 19:14:10 +0000 2017 X-GM-THRID: 1584000475979894065 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread