Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp460935pxa; Fri, 21 Aug 2020 11:40:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXaf7lfLMxw7+8pw/K+9RHFFict+FisBY7Js9S0uPpC3/cQYQ5FH8maZ9y8IAJiZCHDCG8 X-Received: by 2002:a17:906:5612:: with SMTP id f18mr4347774ejq.225.1598035212786; Fri, 21 Aug 2020 11:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598035212; cv=none; d=google.com; s=arc-20160816; b=ZEq9QANRR525WE/b72cWsSUjjJ3pPaklJiFy2Nvlv1pqwneqXI4SLpT8b1M9hGq/Gc PRW9qqZNCB7zz52lckIqK4722GSh9Fm8dzpEVd4HuskNBPhFPKmQwFiF6ds/d22rZ8wE 4mf6lWprtMJeeF52JWyU5kEqclxbPR6gDyNPwReRe7qOXs7P8it5ePK2iDwekMkP5inV hHgW10K4s5E80tqdasnV3XW8A7AVpiGvLXflQDnRn9AbHcBp4EMlcwmGq3kWazBIbNis 5dzB23o3ZQ7noQfuGECd11FXkvQtYVBX1NZlHr4DnnckPjZNl4O4oMeblRkUu5OmoAum SvaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=shQPOS/D8M4JXXfHHqbOPcw2UQKwykbpQIY4dcI2U7Y=; b=vRyKkj0XtWS02+QArFGHbbuhXODr56GDNzuOm2Fp2LRMeou0HlmT65NHTNoOZHslUb BqBOgqIA+v1xWHSwu+9VgctcB0cWK4nlxF8iEQg/fdnVmUbmBcoXLYgSIraAznOCeZBx l6JG0nf3A01QKRwTVwekqlJ5UmGQjEPnl51VEpviN06ySFwVZSDRRQ8+j0NBo3NV+uvo dEZyYkonA16EwGJtoqFE4tYdK4mpsW/tgoI9fiRNVj1GqLTth77qUkNIAcipiPjLb/Nt JdtacKWitT1UgZGID0eHwAbVJ7yvVb5+GxAom4ovMAntvqSjESimwbI9T8HSh28npCuW 4DEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=ikEqxcCd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id i2si1627911ejh.541.2020.08.21.11.39.49; Fri, 21 Aug 2020 11:40:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=ikEqxcCd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726792AbgHUSg3 (ORCPT + 99 others); Fri, 21 Aug 2020 14:36:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbgHUSgI (ORCPT ); Fri, 21 Aug 2020 14:36:08 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72906C061796 for ; Fri, 21 Aug 2020 11:27:16 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id cq28so2226820edb.10 for ; Fri, 21 Aug 2020 11:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=shQPOS/D8M4JXXfHHqbOPcw2UQKwykbpQIY4dcI2U7Y=; b=ikEqxcCd/y/+zxCU3xzhcSEWvCbwaJlbGlOLU2haz4TMsmbxrj69tC+ooBZKr1P46K Y/7oKiPoeLuokNW96KPRtAis1XU6MgYlKWUKvQfz8bSKiVBb67RiS0n0+HRUObc5MDsW Hr3XRWSkRsygWIu9BTIsi89UxDTlWl8Jx9e2TdeSI6TKHW9SjyD7428aN8ZO1JgSF/V0 +Brg8zgjea9I5lp6ABFKyqv+3kw+5eJlt3SUzM8JbPrdtocIn8IqPjTZ6pdIonV414Jr hemzvtz9IMppAPXxjRI7BvSPqSEEqKaV80yw0+UV60kLQjbkHtoPrvueFGux9mlE+28a SxHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=shQPOS/D8M4JXXfHHqbOPcw2UQKwykbpQIY4dcI2U7Y=; b=J1mikv1GQPfL5Phrdrp0miOMLYCd6yHjOLKxf31cxo+aDykYrrote3OClOx9X355Ts YXj0k8M6o41pgfpz6zUI7d45oSqHOyUroLKmS6EwJdEaxOgltH0sbQaAx4Iojx4tcVNS X2Se8eTNQ+eqrCgM+auD/Z4iSmaer4IXHun1cK4nNGhlfaWhZgJAX0UCweQdtsOW8Wj7 KouL3vrtSk/cLCH5WKg2GbRReN7KTK8aEvsvH0hQt3SBOYlXLpF/Urw8T9TH9PTYgGrl 7eYhcDTRWmxzBF6Uct3W/hJ8uIdhcwiYmoS04iEzC51l1ossZK7xLl4ZOpKMGYEJiI2N ZJYg== X-Gm-Message-State: AOAM531AK4XppPbY1wJXGHxHtIKdQKFo0Cj7WiOCLcjRqTdnV7UVUuas Cf1MriW4VP4UBDf1mMDwqgqH3WY8lZWIajVy8vuqHQ== X-Received: by 2002:a05:6402:30a5:: with SMTP id df5mr4051980edb.18.1598034434104; Fri, 21 Aug 2020 11:27:14 -0700 (PDT) MIME-Version: 1.0 References: <159643094279.4062302.17779410714418721328.stgit@dwillia2-desk3.amr.corp.intel.com> <6af3de0d-ffdc-8942-3922-ebaeef20dd63@redhat.com> In-Reply-To: <6af3de0d-ffdc-8942-3922-ebaeef20dd63@redhat.com> From: Dan Williams Date: Fri, 21 Aug 2020 11:27:02 -0700 Message-ID: Subject: Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges To: David Hildenbrand Cc: Andrew Morton , Ira Weiny , Ard Biesheuvel , Mike Rapoport , Borislav Petkov , Vishal Verma , David Airlie , Will Deacon , Catalin Marinas , Ard Biesheuvel , Joao Martins , Tom Lendacky , Dave Jiang , "Rafael J. Wysocki" , Jonathan Cameron , Wei Yang , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Greg Kroah-Hartman , Pavel Tatashin , Peter Zijlstra , Ben Skeggs , Benjamin Herrenschmidt , Jason Gunthorpe , Jia He , Ingo Molnar , Dave Hansen , Paul Mackerras , Brice Goglin , Jeff Moyer , Michael Ellerman , "Rafael J. Wysocki" , Daniel Vetter , Andy Lutomirski , "Rafael J. Wysocki" , Linux MM , linux-nvdimm , Linux Kernel Mailing List , Linux ACPI , Maling list - DRI developers Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2020 at 3:15 AM David Hildenbrand wrote: > > >> > >> 1. On x86-64, e820 indicates "soft-reserved" memory. This memory is not > >> automatically used in the buddy during boot, but remains untouched > >> (similar to pmem). But as it involves ACPI as well, it could also be > >> used on arm64 (-e820), correct? > > > > Correct, arm64 also gets the EFI support for enumerating memory this > > way. However, I would clarify that whether soft-reserved is given to > > the buddy allocator by default or not is the kernel's policy choice, > > "buddy-by-default" is ok and is what will happen anyways with older > > kernels on platforms that enumerate a memory range this way. > > Is "soft-reserved" then the right terminology for that? It sounds very > x86-64/e820 specific. Maybe a compressed for of "performance > differentiated memory" might be a better fit to expose to user space, no? No. The EFI "Specific Purpose" bit is an attribute independent of e820, it's x86-Linux that entangles those together. There is no requirement for platform firmware to use that designation even for drastic performance differentiation between ranges, and conversely there is no requirement that memory *with* that designation has any performance difference compared to the default memory pool. So it really is a reservation policy about a memory range to keep out of the buddy allocator by default. [..] > > Both, but note that PMEM is already hard-reserved by default. > > Soft-reserved is about a memory range that, for example, an > > administrator may want to reserve 100% for a weather simulation where > > if even a small amount of memory was stolen for the page cache the > > application may not meet its performance targets. It could also be a > > memory range that is so slow that only applications with higher > > latency tolerances would be prepared to consume it. > > > > In other words the soft-reserved memory can be used to indicate memory > > that is either too precious, or too slow for general purpose OS > > allocations. > > Right, so actually performance-differentiated in any way :) ... or not differentiated at all which is Joao's use case for example. [..] > > Numa node numbers / are how performance differentiated memory ranges > > are enumerated. The expectation is that all distinct performance > > memory targets have unique ACPI proximity domains and Linux numa node > > numbers as a result. > > Makes sense to me (although it's somehow weird, because memory of the > same socket/node would be represented via different NUMA nodes), thanks! Yes, numa ids as only physical socket identifiers is no longer a reliable assumption since the introduction of the ACPI HMAT.