Received: by 10.223.185.116 with SMTP id b49csp152979wrg; Tue, 20 Feb 2018 18:01:14 -0800 (PST) X-Google-Smtp-Source: AH8x2254swytzr2tQKMF+q8knmBfs9dgF38AihzN4Hu6i595cXyemeLkPVnex8FbmeIYB9JfbqeE X-Received: by 2002:a17:902:d20a:: with SMTP id t10-v6mr1525318ply.257.1519178474488; Tue, 20 Feb 2018 18:01:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519178474; cv=none; d=google.com; s=arc-20160816; b=s9QXc0XTkYmLcgFUuj/uN0sZ4buF+4YeJ8jPZnmRCQI9xLS9Z6tUHmyTFZTMzK1qbI aJyxUjWnyag+9BGrTflWrt73mCMP9uq1HQJ5MWHbQA2TBsni4Aa5iewCndy6n8PWQaGK 5rf7Dt8IJIK+k3YNmLj3LTWTKDZcZr0HmEIT+BDCYYG5T2Cci7f5j44ATr/LqXf3A1+z DfDJDvhVV9u3t1m2NHTg68bRcIHnlRot0onTBPD8OQRQcmsjv5gciDsZGDO4aZ2trq25 LB2/WBlE6JCo1NgC6zObjfDde+McQKV+anRV/aZmac8599QnYMp2DndpHbx/nfvSRIHn aikg== 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:dkim-signature :arc-authentication-results; bh=REUhvZlJGAcDvrLSCpAPNqGxF6ffr5YU2ivDjBn/RIA=; b=IHtAUPnh/9WwyD8N4vQvlzESlmu/9HEVOMyv86VXBIM3qZUHyKd5sIM/ckXTTDhoWq Fp0iKTqMGI5thT47OCPHcBLVfBLwXFRNITkIu4dOE8r0CRklUYKCJTSprkg70cda4YVU lTS51g/M0ZtRv16fuNjvu6jFH2/y6OJiijYCtIQlWEBlhFzyrcguHcgANL/cJFxFPdLX nbsvCSIcN2X0K9JM/DvccAgtjC33CsLaM2WSUAMCm0nSso2rsvwy3Mc95y3+FSdSCSha A2oHgrdjUkINXCtgmzCCZga957Uw4LwOvYqLHrFKqArS+cBgYV4joQH7EY+MpRerj2RS x4Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=hFhcrLoE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e18-v6si835427plj.600.2018.02.20.18.01.00; Tue, 20 Feb 2018 18:01:14 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=hFhcrLoE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751385AbeBUB7F (ORCPT + 99 others); Tue, 20 Feb 2018 20:59:05 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:49028 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbeBUB7E (ORCPT ); Tue, 20 Feb 2018 20:59:04 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1L1vaKW017941; Wed, 21 Feb 2018 01:58:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=REUhvZlJGAcDvrLSCpAPNqGxF6ffr5YU2ivDjBn/RIA=; b=hFhcrLoEcktrhjjRPmXzd3AFuVGGHsR1VaSeiINKtdHDZpqxLGXUaS8q3GM3o7/5aJ81 r6R6DuKaPK4ROL5DpLy2Mh21Cl1+tCgKQSRS91v0ih0Gu5FEFWaEVd3JXiyTFjslIA+q lqdz1LaKHyxvy867pCmu7VQLMyHwb3hQ1CJALNJMOasafMUq7B6iI9cTVDchv8W+ZhyG PuTo75yv2N/jXzGRfuiCv/gvrlRq16vPQNZjKVyyODNM85dAWyg+j1LptF2iduMWjj1c YfOUA/jsaS6Tf3sfU3ld7KaW8nmR1vaa43L4q6hDyb6tO+dsj3GlZ+O6oCaGbf5ypIeT 4Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2g8x9dg5yt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Feb 2018 01:58:49 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1L1wmTS013379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Feb 2018 01:58:48 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1L1wlBr015276; Wed, 21 Feb 2018 01:58:48 GMT Received: from [192.168.1.164] (/98.246.252.205) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Feb 2018 17:58:47 -0800 Subject: Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core To: Thomas Gleixner , Reinette Chatre 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: <6c960fc0-820e-757c-2770-d770647e63d6@intel.com> From: Mike Kravetz Message-ID: <2db87a79-e13f-ad6b-c399-1ad58585f38e@oracle.com> Date: Tue, 20 Feb 2018 17:58:46 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; 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 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8810 signatures=668675 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802210022 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/20/2018 03:21 PM, Thomas Gleixner wrote: > On Tue, 20 Feb 2018, Reinette Chatre wrote: >> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: >>> On Tue, 13 Feb 2018, Reinette Chatre wrote: >>> >>> Now the remaining thing is the memory allocation and the mmap itself. I >>> really dislike the preallocation of memory right at setup time. Ideally >>> that should be an allocation of the application itself, but the horrid >>> wbinvd stuff kinda prevents that. With that restriction we are more or less >>> bound to immediate allocation and population. >> >> Acknowledged. I am not sure if the current permissions would support >> such a dynamic setup though. At this time the system administrator is >> the one that sets up the pseudo-locked region and can through >> permissions of the character device provide access to these regions to >> user space applications. > > You still would need some interface, e.g. character device which allows you > to hand in the pointer to the user allocated memory and do the cache > priming. So you could use the same permission setup for that character > device. > > The other problem is that we'd need to have MAP_CONTIG first so you > actually can allocate physically contigous memory from user space. Mike is > working on that, but it's not available today. The only way to do so today > (with lots of waste) would be MAP_HUGETLB, which might be an acceptable > constraint up to the point where MAP_CONTIG is available. Just to clarify, there is not any activity on exposing a general purpose MAP_CONTIG interface to user space. When initially proposed, MAP_CONTIG was shot down and the suggestion was to create a new in kernel interface to make allocation of contiguous pages easier. The initial use case was a driver which could use the new internal interface as part of it's mmap() routine to give contiguous regions to user space. Reinette is using this new interface, but that must be for the ?immediate allocation? case you are trying to move away from. Sorry, I have not been following development of this feature. If you would have to create a device to accept a user buffer, could you perhaps use the same device to create/hand out a contiguous mapping? -- Mike Kravetz