Received: by 10.223.164.202 with SMTP id h10csp1417335wrb; Wed, 15 Nov 2017 20:13:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMZU6++R/xVumThLQX6SRbStPfbQijKq+ba6983au5YZo7nw2XrBDykZ4dHTAkFUHot7+p06 X-Received: by 10.99.119.73 with SMTP id s70mr353574pgc.451.1510805581253; Wed, 15 Nov 2017 20:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510805581; cv=none; d=google.com; s=arc-20160816; b=HBifsyAPokOW4mvTA65zpaf8rZFINFZlY6b1drCh52IKpBvmBhH6etZDaKXhVAqo+i eAdtS/0l4F0vqfnseZaRvp63oMfKilU1QjkwL1iitSJqydL5q5CTCYEBGRxY0Htvvjrn K5rpxTyfFuUuUaKjiX/9k9AnrV7M8ILpXRm04D6SonSJ32U05AeLdAYr7bfGEu+8Pa+u AhcnrkmUNWgccAhuSElcEjRhBwun7T+swia7QKuvSvJOTqCGr7TiuBRsoIJPOtxWRcQ4 EoBjOlabCQV6n35nWAZc+GQ5261STWtCHAhtotXNUwKwEHePQZNHfao+FYSBkE0L8njI yepg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ho5MA1iwF3YfLNiNhn0qEojyaRPaBnc4cUoRnGEPEFQ=; b=IsTT59Kj8YD/4j1EQMR0hbFxpJ/kvxJiZfSjXJWH9zHO5bJ53Wccg6Gdaa9bUCXGp8 jNYhY7z0qG8LSpSZ6VGXdgHARkrw3P/TEimE87L3fcaDN8ixbVhOb6NGCYw7u5E7M5qb VxnZdKxSwyLjjKC6MEdLsqUAH3kDlyDH/2M66MmjM0AqfiGK3oGngGjl+02JNBTvF05/ 3y3RE3+Y/bD8poKByahjmz2lk55XR3wTFfNMH/mB3tHe3mh6TQKmBmRYFsX8OypFSGRW YZQ2DzmBZfeLhruSDEH3j8l9sCiF5/Eo1I1hBYIzINpgsVX57qfuGLVHR/cVG9+3Gy2X u1Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VZ0J9HrN; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si168001pll.461.2017.11.15.20.12.36; Wed, 15 Nov 2017 20:13:01 -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=@gmail.com header.s=20161025 header.b=VZ0J9HrN; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933109AbdKPCKQ (ORCPT + 90 others); Wed, 15 Nov 2017 21:10:16 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:33326 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754555AbdKPCKK (ORCPT ); Wed, 15 Nov 2017 21:10:10 -0500 Received: by mail-wm0-f42.google.com with SMTP id r68so325191wmr.0 for ; Wed, 15 Nov 2017 18:10:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ho5MA1iwF3YfLNiNhn0qEojyaRPaBnc4cUoRnGEPEFQ=; b=VZ0J9HrNAqpRtBabpVRJyReJDGhkJ3W8MOiGa9x5s2laCfEc5bX8n4xLHsaMDHfQ8Z svMtScMYUdKAh0XEBltPSVPT3wWgAGlhyUjDx957PFfVy0SHnUAq5Bp5N3oz22DWgb8S Fl+RVcHlskdHO9yTMKC46y0r9DMTOFA0nJqFCI/MTjfB4K1vAM7szUwZwatayTm43vGr 4T0on9D7vnUBEXrrJ8VyHTWZQY9okvebzzEPjoxLp539duj9J36jA+r8QYzzzZ4vwTPW PcMOOhC1w8Wfo6soVPCJHqSreFLUXBLbhC1nwALDAT2lTAvSRLpS4Q+JLyA9pDj0XUz9 U5iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ho5MA1iwF3YfLNiNhn0qEojyaRPaBnc4cUoRnGEPEFQ=; b=GZUm6t9gB4DJCYMYw9SvYOlTMwEKruzfw4bYyn3SE5VZeVOqkGxB4uZHjFTrEiEIzz M5PrIqMgIaKA0B0EZCoKncZ2ieFwF5s7HzgjfHtdEI/l4Muhcv/fnHN1qONJTqRMIlif aISoNT0RXZapGVgQseEw1kje+cHk78eCVSV2bdSPH/hiS7gDUyN9zm2uEKXtt26/9jRj GH2lwl1r+aKld2H7dMdcRlBiZPxrSz0GJEvNBBpaqrQlUZJDwxvVIvbPTB9sAS9prFCg +YWlQzV8PGAJHAMSyeG1k/wu3FZDpN497y8pxg63l3qEDamW+gvY/6K9kQuD47J/1SvV nBQw== X-Gm-Message-State: AJaThX72MiMCcp57yRnw9RQzyr6WW1TOVIJhdQSR5r23npOgIB00fyDE 3IrUlZvm1uvw84l7Z/vz0AXQg/AvvLRfDbbp7gs= X-Received: by 10.28.183.132 with SMTP id h126mr247064wmf.17.1510798209204; Wed, 15 Nov 2017 18:10:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.197.14 with HTTP; Wed, 15 Nov 2017 18:10:08 -0800 (PST) In-Reply-To: <20171012153721.GA2986@redhat.com> References: <20170721014106.GB25991@redhat.com> <20170905193644.GD19397@redhat.com> <20170911233649.GA4892@redhat.com> <20170926161635.GA3216@redhat.com> <0d7273c3-181c-6d68-3c5f-fa518e782374@huawei.com> <20170930224927.GC6775@redhat.com> <20171012153721.GA2986@redhat.com> From: chet l Date: Wed, 15 Nov 2017 18:10:08 -0800 Message-ID: Subject: Re: [PATCH 0/6] Cache coherent device memory (CDM) with HMM v5 To: Jerome Glisse Cc: Bob Liu , Bob Liu , Dan Williams , "linux-kernel@vger.kernel.org" , Linux MM , John Hubbard , David Nellans , Balbir Singh , Michal Hocko , Andrew Morton 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 >> You may think it as a CCIX device or CAPI device. >> The requirement is eliminate any extra copy. >> A typical usecase/requirement is malloc() and madvise() allocate from >> device memory, then CPU write data to device memory directly and >> trigger device to read the data/do calculation. > > I suggest you rely on the device driver userspace API to do a migration after malloc > then. Something like: > ptr = malloc(size); > my_device_migrate(ptr, size); > > Which would call an ioctl of the device driver which itself would migrate memory or > allocate device memory for the range if pointer return by malloc is not yet back by > any pages. > So for CCIX, I don't think there is going to be an inline device driver that would allocate any memory for you. The expansion memory will become part of the system memory as part of the boot process. So, if the host DDR is 256GB and the CCIX expansion memory is 4GB, the total system mem will be 260GB. Assume that the 'mm' is taught to mark/anoint the ZONE_DEVICE(or ZONE_XXX) range from 256 to 260 GB. Then, for kmalloc it(mm) won't use the ZONE_DEV range. But for a malloc, it will/can use that range. > There has been several discussions already about madvise/mbind/set_mempolicy/ > move_pages and at this time i don't think we want to add or change any of them to > understand device memory. My personal opinion is that we first need to have enough We will visit these APIs when we are more closer to building exotic CCIX devices. And the plan is to present/express the CCIX proximity attributes just like a NUMA node-proximity attribute today. That way there would be minimal disruptions to the existing OS ecosystem. Chetan From 1581066728146512122@xxx Thu Oct 12 15:38:51 +0000 2017 X-GM-THRID: 1572843623662560165 X-Gmail-Labels: Inbox,Category Forums