Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp7189300ybf; Fri, 6 Mar 2020 12:08:39 -0800 (PST) X-Google-Smtp-Source: ADFU+vvnNGoGT+kYRyDhjkHvvIo9xs+XUJUVGzb4nBK7FBCtmjTc0VoHjQUAQtXB5QevhkJubSZi X-Received: by 2002:aca:e106:: with SMTP id y6mr3857268oig.131.1583525319700; Fri, 06 Mar 2020 12:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583525319; cv=none; d=google.com; s=arc-20160816; b=gEbjtutoFa9PN8FaLsxYtHpYsoJWu3qekai2r4V/dpWJngXhkYCHPZ1PIhO0ms2sY2 k8+QifnQrEFHHl/mNnnh4nLzIIoEftT6lVVVfF1lQnwERs+C72OnOW46O2dcmdy3LTeS PtfAs0epsF4C826t3eLUvJVvrFdKtzaYcQ8G8zb2mwwnlSfeVPX2mOiTkwHQkaaAegGp RQ6+z5/buKVJ80/xtnzo174fu7KScmysmWbmqvdt6AyYhCRGucMBCc69fcY34vRHKmOP HFQrG3caw5SElZjKNXEozVnHAvKgzJRAhd+fGNCHu1TYRQMXgQ3LrCzux/XWvhvz52Ek tYWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature; bh=+YIIYWVi7RdgKfAy7yTaNL+3yMfo1EDUARXKVoiNRlk=; b=Ts9kl+sJ/qXTgJNm5T2fFqpf6HG1olskpGMRBkKDhJPUYvQxvgF5fj8HS74jC1vIXG XDzRIBmOtYrl+BM4yiUeuf+ywzkLgvfErFTOK62P38nSpE2MR1HwVed2Y8YzhSx/94tl 9Q6zBcbMHtY+s9cn3+ERDnSn9jVKsSrBrVMd509BAx0XGeCnpYQKfzWzE5QLmO6oxQis ZWQCFJyYQUbbb29qRsB2r3Br0R3jWJ0LbDI+YvuHAhr+xNVC7c6+dOHRzbYzbk8DnIow OsmAwrNyWscwpiYsUCf8XjSsfhHI5ay4HbPyjEHcAJn2iDv+e6EBc1Q2a8NQ+Ab33loY 3BAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iORSAA+d; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si1953649oth.163.2020.03.06.12.08.27; Fri, 06 Mar 2020 12:08:39 -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=@redhat.com header.s=mimecast20190719 header.b=iORSAA+d; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbgCFUHp (ORCPT + 99 others); Fri, 6 Mar 2020 15:07:45 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:44824 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726162AbgCFUHp (ORCPT ); Fri, 6 Mar 2020 15:07:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583525264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+YIIYWVi7RdgKfAy7yTaNL+3yMfo1EDUARXKVoiNRlk=; b=iORSAA+dvGs8kGAy7INVNjSgZaeQlvWI0LcSQIeTCrDSFzVoNo2lizxJGSc4gpQvEeF4Ii ywln5Q2Gx4dT0F37AfPsTsHjoWhmXSxNLzskAkYcIS4bJg7X8hsY0OJa56/m/6XBEXyf2K ueAbIihO24iciP2EbmdSq2CsakVLOyQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-299-9S-s0OdCNB2jyIvWkNZXNg-1; Fri, 06 Mar 2020 15:07:35 -0500 X-MC-Unique: 9S-s0OdCNB2jyIvWkNZXNg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BB225184C804; Fri, 6 Mar 2020 20:07:32 +0000 (UTC) Received: from segfault.boston.devel.redhat.com (segfault.boston.devel.redhat.com [10.19.60.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB79A1001B2D; Fri, 6 Mar 2020 20:07:29 +0000 (UTC) From: Jeff Moyer To: Dan Williams Cc: linux-acpi@vger.kernel.org, Jason Gunthorpe , Peter Zijlstra , Ard Biesheuvel , Jonathan Cameron , Borislav Petkov , Wei Yang , x86@kernel.org, "H. Peter Anvin" , Brice Goglin , Thomas Gleixner , Ingo Molnar , Dave Hansen , "Rafael J. Wysocki" , Ard Biesheuvel , Andy Lutomirski , Tom Lendacky , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] Manual definition of Soft Reserved memory devices References: <158318759687.2216124.4684754859068906007.stgit@dwillia2-desk3.amr.corp.intel.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 Date: Fri, 06 Mar 2020 15:07:28 -0500 In-Reply-To: <158318759687.2216124.4684754859068906007.stgit@dwillia2-desk3.amr.corp.intel.com> (Dan Williams's message of "Mon, 02 Mar 2020 14:19:57 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dan Williams writes: > Given the current dearth of systems that supply an ACPI HMAT table, and > the utility of being able to manually define device-dax "hmem" instances > via the efi_fake_mem= option, relax the requirements for creating these > devices. Specifically, add an option (numa=nohmat) to optionally disable > consideration of the HMAT and update efi_fake_mem= to behave like > memmap=nn!ss in terms of delimiting device boundaries. So, am I correct in deducing that your primary motivation is testing without hardware/firmware support? This looks like a bit of a hack to me, and I think maybe it would be better to just emulate the HMAT using qemu. I don't have a strong objection, though. -Jeff > > All review welcome of course, but the E820 changes want an x86 > maintainer ack, the efi_fake_mem update needs Ard, and Rafael has > previously shepherded the HMAT changes. For the changes to > kernel/resource.c, where there is no clear maintainer, I just copied the > last few people to make thoughtful changes in that area. I am happy to > take these through the nvdimm tree along with these prerequisites > already in -next: > > b2ca916ce392 ACPI: NUMA: Up-level "map to online node" functionality > 4fcbe96e4d0b mm/numa: Skip NUMA_NO_NODE and online nodes in numa_map_to_online_node() > 575e23b6e13c powerpc/papr_scm: Switch to numa_map_to_online_node() > 1e5d8e1e47af x86/mm: Introduce CONFIG_NUMA_KEEP_MEMINFO > 5d30f92e7631 x86/NUMA: Provide a range-to-target_node lookup facility > 7b27a8622f80 libnvdimm/e820: Retrieve and populate correct 'target_node' info > > Tested with: > > numa=nohmat efi_fake_mem=4G@9G:0x40000,4G@13G:0x40000 > > ...to create to device-dax instances: > > # daxctl list -RDu > [ > { > "path":"\/platform\/hmem.1", > "id":1, > "size":"4.00 GiB (4.29 GB)", > "align":2097152, > "devices":[ > { > "chardev":"dax1.0", > "size":"4.00 GiB (4.29 GB)", > "target_node":3, > "mode":"devdax" > } > ] > }, > { > "path":"\/platform\/hmem.0", > "id":0, > "size":"4.00 GiB (4.29 GB)", > "align":2097152, > "devices":[ > { > "chardev":"dax0.0", > "size":"4.00 GiB (4.29 GB)", > "target_node":2, > "mode":"devdax" > } > ] > } > ] > > --- > > Dan Williams (5): > ACPI: NUMA: Add 'nohmat' option > efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance > ACPI: HMAT: Refactor hmat_register_target_device to hmem_register_device > resource: Report parent to walk_iomem_res_desc() callback > ACPI: HMAT: Attach a device for each soft-reserved range > > > arch/x86/kernel/e820.c | 16 +++++- > arch/x86/mm/numa.c | 4 + > drivers/acpi/numa/hmat.c | 71 +++----------------------- > drivers/dax/Kconfig | 5 ++ > drivers/dax/Makefile | 3 - > drivers/dax/hmem/Makefile | 6 ++ > drivers/dax/hmem/device.c | 97 +++++++++++++++++++++++++++++++++++ > drivers/dax/hmem/hmem.c | 2 - > drivers/firmware/efi/x86_fake_mem.c | 12 +++- > include/acpi/acpi_numa.h | 1 > include/linux/dax.h | 8 +++ > kernel/resource.c | 1 > 12 files changed, 156 insertions(+), 70 deletions(-) > create mode 100644 drivers/dax/hmem/Makefile > create mode 100644 drivers/dax/hmem/device.c > rename drivers/dax/{hmem.c => hmem/hmem.c} (98%) > > base-commit: 7b27a8622f802761d5c6abd6c37b22312a35343c