From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AACAC04EB8 for ; Tue, 4 Dec 2018 19:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 271472082B for ; Tue, 4 Dec 2018 19:11:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 271472082B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726196AbeLDTLh (ORCPT ); Tue, 4 Dec 2018 14:11:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54972 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbeLDTLg (ORCPT ); Tue, 4 Dec 2018 14:11:36 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EEA013001E5A; Tue, 4 Dec 2018 19:11:35 +0000 (UTC) Received: from redhat.com (unknown [10.20.6.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D1ED51F8; Tue, 4 Dec 2018 19:11:32 +0000 (UTC) Date: Tue, 4 Dec 2018 14:11:31 -0500 From: Jerome Glisse To: Dave Hansen Cc: linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, "Rafael J . Wysocki" , Matthew Wilcox , Keith Busch , Dan Williams , Haggai Eran , Balbir Singh , "Aneesh Kumar K . V" , Benjamin Herrenschmidt , Felix Kuehling , Philip Yang , Christian =?iso-8859-1?Q?K=F6nig?= , Paul Blinzer , Logan Gunthorpe , John Hubbard , Ralph Campbell , Michal Hocko , Jonathan Cameron , Mark Hairgrove , Vivek Kini , Mel Gorman , Dave Airlie , Ben Skeggs , Andrea Arcangeli , Rik van Riel , Ben Woodard , linux-acpi@vger.kernel.org Subject: Re: [RFC PATCH 00/14] Heterogeneous Memory System (HMS) and hbind() Message-ID: <20181204191130.GF2937@redhat.com> References: <20181203233509.20671-1-jglisse@redhat.com> <9d745b99-22e3-c1b5-bf4f-d3e83113f57b@intel.com> <20181204184919.GD2937@redhat.com> <64cf873c-9e1e-f3b0-4869-7e0ebab10452@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <64cf873c-9e1e-f3b0-4869-7e0ebab10452@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Dec 2018 19:11:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 04, 2018 at 10:54:10AM -0800, Dave Hansen wrote: > On 12/4/18 10:49 AM, Jerome Glisse wrote: > > Policy is same kind of story, this email is long enough now :) But > > i can write one down if you want. > > Yes, please. I'd love to see the code. > > We'll do the same on the "HMAT" side and we can compare notes. Example use case ? Example use are: Application create a range of virtual address with mmap() for the input dataset. Application knows it will use GPU on it directly so it calls hbind() to set a policy for the range to use GPU memory for any new allocation for the range. Application directly stream the dataset to GPU memory through the virtual address range thanks to the policy. Application create a range of virtual address with mmap() to store the output result of GPU jobs its about to launch. It binds the range of virtual address to GPU memory so that allocation use GPU memory for the range. Application can also use policy binding as a slow migration path ie set a policy to a new target memory so that new allocation are directed to this new target. Or do you want example userspace program like the one in the last patch of this serie ? Cheers, Jérôme