Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2189888imu; Thu, 10 Jan 2019 09:43:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN6lDdN/XKVeuAqnUfyIX8CST1dDx1hYhXiUeiupFza1UzUmhYbRYrxeLfJ3Z4XIsRC8Yq/E X-Received: by 2002:a63:4002:: with SMTP id n2mr10092922pga.137.1547142213334; Thu, 10 Jan 2019 09:43:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547142213; cv=none; d=google.com; s=arc-20160816; b=qpBLE4hcNVDTVAa4uCPqDodaJBVxy2f5Cp/7vaEtGdrh9O6hfDBSIBQew9gFh2mHLd DidRzF8/sg+sd2tCCT6owYwAArCjHYLB638+7jhOBfEt5FTljksTzA7RBtmG3NOV2jPm q0TqhC2VfaBB+4GrAB0Y0jScKulHPnxYNKhNuL7QkC5F6GRNSc75R3JnynSi/iHjWmpQ RHfpAaJV1vdKrmcIwfapdMYx9rLfGpaNEFsXbAgit2WM0VsPvHAfAXrvOvSF1JqHKL8f 72RoXSXr8B8Bdpvn1JFUpG1MVrVHJmrHfvLf+ESfGb2nyqK3mZvxh99EC9KcdRgLmhVD PMhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=9a3eFfbaT8vDYva3IjQioRihGSsMlLf/tiqVgKkvJHE=; b=UVQCoTAJC2b+Hb0lLiYi2ViNkAVFwfhMa6rpVKfKrxwJtu0YxP+hMFuBtjYMOjDTwQ znsWX1bCBGEHcL6oIdksPQ24HZnT6lCQd+fTwRzSoi1jLUJcqCL4EiVcJ2oa74LrT6lr Uz5WSnrSTVax2o/s1rQlsuBZUJYrApUsLtyckmzBgpSg9SZQpcsUUltrOySBy4WjlQwV bYsGsc27qKChnHLNRmZgaiyXJ5VeY5qPSPhqAG896pxB2zsZ+SzoegKnQizVhs+KiO6t 2C/x/Ts4w9lI2mfDNXTv4dYGJmwEpYj7OV2D7Jee+27MO3cNdMR7c4NtBcKFI1JFh6yI pvxQ== 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; dmarc=fail (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 a3si3589418pga.297.2019.01.10.09.43.17; Thu, 10 Jan 2019 09:43:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730570AbfAJRmF (ORCPT + 99 others); Thu, 10 Jan 2019 12:42:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40530 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730497AbfAJRmE (ORCPT ); Thu, 10 Jan 2019 12:42:04 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD347C0C5A4E; Thu, 10 Jan 2019 17:42:03 +0000 (UTC) Received: from redhat.com (unknown [10.20.6.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D5DF05C6C1; Thu, 10 Jan 2019 17:42:01 +0000 (UTC) Date: Thu, 10 Jan 2019 12:42:00 -0500 From: Jerome Glisse To: Michal Hocko Cc: Andrea Arcangeli , Huang Ying , Zhang Yi , kvm@vger.kernel.org, Dave Hansen , Liu Jingqi , Yao Yuan , Fan Du , Dong Eddie , LKML , Linux Memory Management List , Peng Dong , Andrew Morton , Fengguang Wu , Dan Williams , linux-accelerators@lists.ozlabs.org, Mel Gorman Subject: Re: [RFC][PATCH v2 00/21] PMEM NUMA node and hotness accounting/migration Message-ID: <20190110174159.GD4394@redhat.com> References: <20181228050806.ewpxtwo3fpw7h3lq@wfg-t540p.sh.intel.com> <20181228084105.GQ16738@dhcp22.suse.cz> <20181228094208.7lgxhha34zpqu4db@wfg-t540p.sh.intel.com> <20181228121515.GS16738@dhcp22.suse.cz> <20181228133111.zromvopkfcg3m5oy@wfg-t540p.sh.intel.com> <20181228195224.GY16738@dhcp22.suse.cz> <20190102122110.00000206@huawei.com> <20190108145256.GX31793@dhcp22.suse.cz> <20190110155317.GB4394@redhat.com> <20190110164248.GO31793@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190110164248.GO31793@dhcp22.suse.cz> User-Agent: Mutt/1.10.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 10 Jan 2019 17:42:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 10, 2019 at 05:42:48PM +0100, Michal Hocko wrote: > On Thu 10-01-19 10:53:17, Jerome Glisse wrote: > > On Tue, Jan 08, 2019 at 03:52:56PM +0100, Michal Hocko wrote: > > > On Wed 02-01-19 12:21:10, Jonathan Cameron wrote: > > > [...] > > > > So ideally I'd love this set to head in a direction that helps me tick off > > > > at least some of the above usecases and hopefully have some visibility on > > > > how to address the others moving forwards, > > > > > > Is it sufficient to have such a memory marked as movable (aka only have > > > ZONE_MOVABLE)? That should rule out most of the kernel allocations and > > > it fits the "balance by migration" concept. > > > > This would not work for GPU, GPU driver really want to be in total > > control of their memory yet sometimes they want to migrate some part > > of the process to their memory. > > But that also means that GPU doesn't really fit the model discussed > here, right? I thought HMM is the way to manage such a memory. HMM provides the plumbing and tools to manage but right now the patchset for nouveau expose API through nouveau device file as nouveau ioctl. This is not a good long term solution when you want to mix and match multiple GPUs memory (possibly from different vendors). Then you get each device driver implementing their own mem policy infrastructure and without any coordination between devices/drivers. While it is _mostly_ ok for single GPU case, it is seriously crippling for the multi-GPUs or multi-devices cases (for instance when you chain network and GPU together or GPU and storage). People have been asking for a single common API to manage both regular memory and device memory. As anyway the common case is you move things around depending on which devices/CPUs is working on the dataset. Cheers, J?r?me