Received: by 10.223.185.116 with SMTP id b49csp799307wrg; Tue, 20 Feb 2018 08:04:43 -0800 (PST) X-Google-Smtp-Source: AH8x227cbirEZYMCyYv8+Oasi1YxrURqGPmp5yXIv/9ISwEIsCKAOO/W8O12LVFRUNC9Q8yZCpMv X-Received: by 2002:a17:902:48:: with SMTP id 66-v6mr101697pla.288.1519142683196; Tue, 20 Feb 2018 08:04:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519142683; cv=none; d=google.com; s=arc-20160816; b=bUEinrFcuFSjzzJUJptygdVEDDdP3KhMprTqLGQN2sXY5xV6dvch1P76FX85SWIZ1w YFlmAmk7l1fq+uGhZTCWGtJ0pIr+I4aq+9KhNJkvKkqMMc4U6EkpAWctFrSGcYZW7rLY OYJeTbmXnWfsZGNSwpTZlHyY+LtJHLqnUzGlb73+JVtuePfrQIU3HRVur5G36ARQo9Ri rqC4pzOcyp0ACWOdddfadNhMl9JWnnf+lPkxulYoNn7TrA5GldfIBPTwA0rAAcJWz8nn VZ1BT/laTrLSGOpiNmkimBywAjm/nPD1EuIfeJROnbUZaWTk+xfVniXiQoG0tnQlKjg8 eGfQ== 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=cEJ8JC9K7KJNxb1l5/3t2El6Df2IJOQS+VdXcONvJOs=; b=K0lkI9UgP5grnIGbflACRFM2ojhgalH/T/h5HTS4Gs55eFKJuCU87cL9kGtEg1sMIE tWKfjeVzKlRXAXmXIg61b0QqOW6l3HVz2e7ZQHjRW19+gm39Jd6nXEnug933SjYB8rKp SqQ0LiLCZExg/bwLJSiNj7z3UVKzCI9w2D8sjijqwc6IZUIks3izhqsPcdaEDCywPezj hcSC7WSS59Pxrl2uHQA032qi6fVyw8fybXm30jDYnySvsti5G1YGS/CQbkMkgQbOnm9k vC4vWByOZYjRvkzG7Iuftcrr8YxZI89OUtthc0z7USEgf8MGUBgaAUrJ7wkS4CPrfLQ+ pf+g== 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 c11-v6si178132pls.801.2018.02.20.08.04.28; Tue, 20 Feb 2018 08:04:43 -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 S1752771AbeBTQCM (ORCPT + 99 others); Tue, 20 Feb 2018 11:02:12 -0500 Received: from mga07.intel.com ([134.134.136.100]:26594 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752753AbeBTQCL (ORCPT ); Tue, 20 Feb 2018 11:02:11 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2018 08:02:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,540,1511856000"; d="scan'208";a="19473629" Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.255.73.9]) ([10.255.73.9]) by orsmga008.jf.intel.com with ESMTP; 20 Feb 2018 08:02:09 -0800 Subject: Re: [RFC PATCH V2 11/22] x86/intel_rdt: Associate pseudo-locked regions with its domain To: Thomas Gleixner Cc: fenghua.yu@intel.com, tony.luck@intel.com, gavin.hindman@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: <216ad1ef8314dc578a900ff8b06248464f5aa2ee.1518443616.git.reinette.chatre@intel.com> <7bd1f8e8-116f-bdb2-23d2-a94f9a21e028@intel.com> <0efce774-57a8-40fa-7b8a-6e57e496bb37@intel.com> From: Reinette Chatre Message-ID: <9551bc69-1183-cc36-7ed9-5b949ce924cc@intel.com> Date: Tue, 20 Feb 2018 08:02:08 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 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 2/20/2018 2:00 AM, Thomas Gleixner wrote: > On Mon, 19 Feb 2018, Reinette Chatre wrote: >> On 2/19/2018 3:19 PM, Thomas Gleixner wrote: >>> On Mon, 19 Feb 2018, Reinette Chatre wrote: >>>> On 2/19/2018 1:19 PM, Thomas Gleixner wrote: >>>>> On Tue, 13 Feb 2018, Reinette Chatre wrote: >>>>> >>>>>> After a pseudo-locked region is locked it needs to be associated with >>>>>> the RDT domain representing the pseudo-locked cache so that its life >>>>>> cycle can be managed correctly. >>>>>> >>>>>> Only a single pseudo-locked region can exist on any cache instance so we >>>>>> maintain a single pointer to a pseudo-locked region from each RDT >>>>>> domain. >>>>> >>>>> Why is only a single pseudo locked region possible? >>>> >>>> The setup of a pseudo-locked region requires the usage of wbinvd. If a >>>> second pseudo-locked region is thus attempted it will evict the >>>> pseudo-locked data of the first. >>> >>> Why does it neeed wbinvd? wbinvd is a big hammer. What's wrong with clflush? >> >> wbinvd is required by this hardware supported feature but limited to the >> creation of the pseudo-locked region. An administrator could dedicate a >> portion of cache to pseudo-locking and applications using this region >> can come and go. The pseudo-locked region lifetime need not be tied to >> application lifetime. The pseudo-locked region could be set up once on >> boot and remain for lifetime of system. >> >> Even so, understanding that it is a big hammer I did explore the >> alternatives. Trying clflush, clflushopt, as well as clwb. Finding them >> all to perform poorly(*) I went further to explore if it is possible to >> use these other instructions with some additional work in support to >> make them perform as well as wbinvd. The additional work included, >> looping over the data more times than done for wbinvd, reducing the size >> of memory locked in relationship to cache size, unused spacing between >> pseudo-locked region and other regions, unmapped memory at end of >> pseudo-locked region. >> >> In addition to the above research from my side I also followed up with >> the CPU architects directly to question the usage of these instructions >> instead of wbinvd. > > What was their answer? This really wants a proper explanation and not just > experimentation results as it makes absolutely no sense at all. I always prefer to provide detailed answers but here I find myself at the threshold where I may end up sharing information not publicly known. This cannot be the first time you find yourself in this situation. How do you prefer to proceed? Reinette