Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1826524ybd; Thu, 27 Jun 2019 02:13:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWIvBi9t9tPf3CYjohe1MIJmAsGy8kBoBZTwqr0eLd+8egg0d4sGYF6t8Ph0WE7VKUOHxm X-Received: by 2002:a17:902:363:: with SMTP id 90mr3341336pld.340.1561626794563; Thu, 27 Jun 2019 02:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561626794; cv=none; d=google.com; s=arc-20160816; b=eNtm09vdMh1N1MaEXgpjuO+CqV4sZeLVhVGGc9OF/rSdHsfvZrWqqR47AzOrjPfwES 0nbHXb2fvtpqSd9HdE0vT94MfS7rcQe3+H8h92duZt5oKjxR/2NRDNXi1xvM6dogWLR6 cV7DpJMm1BwHL+YBpGJQCJ/4bl5EyLZ7no4Sl8CHrmHKm2m19/gkCYdRfyVAYZ5exKMa RC6kj6zA2ueuW22U4NenrzSw4bQXkA4vJG5U+PylcP+o1vLIelHPtmkQH2DO2+l5ZXBI RhGkRk4WoDsQQx/EnMf9UhURby2khHO6BHjK/ysDosMqMu6IAqnu66xQ8Hz4W5LY+Wl1 WiMg== 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:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=T8ZRwB+WLbRcNJWpJnq3WNwqscvRRiBoaMZt1i2gzk0=; b=nkXgX4bHRGCVsaPRheig8eVHjqEY9txdOYQYHtnnr9xv6InwRWyBi7BqE9Nzyc61CQ coByh02oKqyc/HX1cafb4eAmiG+ynKWPyhQ0BKNTjTLjrYA4i1KH3MARJR9fY8aiMEFQ E9oTqvoorfC5ZYblwpHOFsldLFOhlsddMRkAdBnfJNCKpa33yavH9453ps0p0O1yeoW9 /5dKnnnjUPuSIqybVC0aLeOc2ej8V3zRQg0YRpEh1x15IoMQfkqpQkDCQX4seQj3/6Xv E3JPIG6OXETR6IdgnLN/6o2Tz7vbYgQKB6qMqC4E1ZUW9XMsdP8Ifi6HvqBkfMr9e28G wblQ== 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 w1si1800896plq.125.2019.06.27.02.12.54; Thu, 27 Jun 2019 02:13:14 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbfF0JMo convert rfc822-to-8bit (ORCPT + 99 others); Thu, 27 Jun 2019 05:12:44 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([146.101.78.151]:35616 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725385AbfF0JMo (ORCPT ); Thu, 27 Jun 2019 05:12:44 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-7-UfpZyM_bND6y_efQ6g2k2A-1; Thu, 27 Jun 2019 10:12:40 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b::d117) by AcuMS.aculab.com (fd9f:af1c:a25b::d117) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 27 Jun 2019 10:12:40 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Thu, 27 Jun 2019 10:12:40 +0100 From: David Laight To: 'Reinette Chatre' , "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" Subject: RE: [PATCH 00/10] x86/CPU and x86/resctrl: Support pseudo-lock regions spanning L2 and L3 cache Thread-Topic: [PATCH 00/10] x86/CPU and x86/resctrl: Support pseudo-lock regions spanning L2 and L3 cache Thread-Index: AQHVLEe9xpx8VVsweUuywxr187msuKavNmNg Date: Thu, 27 Jun 2019 09:12:40 +0000 Message-ID: <41cd71514a9042abaaef909d816e2522@AcuMS.aculab.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: UfpZyM_bND6y_efQ6g2k2A-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Reinette Chatre > Sent: 26 June 2019 18:49 > > 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. While this is a 'nice' hardware feature for some kinds of embedded systems I don't see how it can be sensibly used inside a Linux kernel. There are an awful lot of places where things can go horribly wrong. I can imagine: - Multiple requests to lock regions that end up trying to use the same set-associative cache lines leaving none for normal operation. - Excessive cache line bouncing because fewer lines are available. - The effect of cache invalidate requests for the locked addresses. - I suspect the Linux kernel can do full cache invalidates at certain times. You've not given a use case. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)