Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754099AbdIEDg7 (ORCPT ); Mon, 4 Sep 2017 23:36:59 -0400 Received: from mail-ua0-f177.google.com ([209.85.217.177]:34873 "EHLO mail-ua0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753602AbdIEDg4 (ORCPT ); Mon, 4 Sep 2017 23:36:56 -0400 X-Google-Smtp-Source: ADKCNb7aKdVc9H7S2T3MlPDzhuEOiLvxSot3dFv2xe6dkAugkWM/IENDE3Xn1DJOqFw+nGg9kDEWxGjI8LlM7MP8Dec= MIME-Version: 1.0 In-Reply-To: <20170904155123.GA3161@redhat.com> References: <20170817000548.32038-1-jglisse@redhat.com> <20170817000548.32038-20-jglisse@redhat.com> <20170904155123.GA3161@redhat.com> From: Balbir Singh Date: Tue, 5 Sep 2017 13:36:55 +1000 Message-ID: Subject: Re: [HMM-v25 19/19] mm/hmm: add new helper to hotplug CDM memory region v3 To: Jerome Glisse Cc: Bob Liu , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , linux-mm , John Hubbard , Dan Williams , David Nellans , majiuyue , "xieyisheng (A)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v853b4aV030866 Content-Length: 1482 Lines: 33 On Tue, Sep 5, 2017 at 1:51 AM, Jerome Glisse wrote: > On Mon, Sep 04, 2017 at 11:09:14AM +0800, Bob Liu wrote: >> On 2017/8/17 8:05, Jérôme Glisse wrote: >> > Unlike unaddressable memory, coherent device memory has a real >> > resource associated with it on the system (as CPU can address >> > it). Add a new helper to hotplug such memory within the HMM >> > framework. >> > >> >> Got an new question, coherent device( e.g CCIX) memory are likely reported to OS >> through ACPI and recognized as NUMA memory node. >> Then how can their memory be captured and managed by HMM framework? >> > > Only platform that has such memory today is powerpc and it is not reported > as regular memory by the firmware hence why they need this helper. > > I don't think anyone has defined anything yet for x86 and acpi. As this is > memory on PCIE like interface then i don't expect it to be reported as NUMA > memory node but as io range like any regular PCIE resources. Device driver > through capabilities flags would then figure out if the link between the > device and CPU is CCIX capable if so it can use this helper to hotplug it > as device memory. Yep, the arch needs to do the right thing at hotplug time, which is 1. Don't online the memory as a NUMA node 2. Use the HMM-CDM API's to map the memory to ZONE DEVICE via the driver Like Jerome said and we tried as well, the NUMA approach needs more agreement and discussion and probable extensions Balbir Singh