linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Jerome Glisse <j.glisse@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, jglisse@redhat.com, mgorman@suse.de,
	aarcange@redhat.com, riel@redhat.com, airlied@redhat.com,
	aneesh.kumar@linux.vnet.ibm.com,
	Cameron Buschardt <cabuschardt@nvidia.com>,
	Mark Hairgrove <mhairgrove@nvidia.com>,
	Geoffrey Gerfin <ggerfin@nvidia.com>,
	John McKenna <jmckenna@nvidia.com>,
	akpm@linux-foundation.org
Subject: Re: Interacting with coherent memory on external devices
Date: Wed, 22 Apr 2015 12:14:50 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.11.1504221206080.25607@gentwo.org> (raw)
In-Reply-To: <20150422163135.GA4062@gmail.com>

On Wed, 22 Apr 2015, Jerome Glisse wrote:

> Glibc hooks will not work, this is about having same address space on
> CPU and GPU/accelerator while allowing backing memory to be regular
> system memory or device memory all this in a transparent manner to
> userspace program and library.

If you control the address space used by malloc and provide your own
implementation then I do not see why this would not work.

> You also have to think at things like mmaped file, let say you have a
> big file on disk and you want to crunch number from its data, you do
> not want to copy it, instead you want to to the usual mmap and just
> have device driver do migration to device memory (how device driver
> make the decision is a different problem and this can be entirely
> leave to the userspace application or their can be heuristic or both).

If the data is on disk then you cannot access it. If its in the page cache
or in the device then you can mmap it. Not sure how you could avoid a copy
unless the device can direct read from disk via another controller.

> Glibc hooks do not work with share memory either and again this is
> a usecase we care about. You really have to think of let's have today
> applications start using those accelerators without the application
> even knowing about it.

Applications always have to be reworked. This does not look like a high
performance solution but some sort way of emulation for legacy code? HPC
codes are mostly written to the hardware and they will be modified as
needed to use maximum performance that the hardware will permit.

> So you would not know before hand what will end up being use by the
> GPU/accelerator and would need to be allocated from special memory.
> We do not want today model of using GPU, we want to provide tomorrow
> infrastructure for using GPU in a transparent way.

Urm... Then provide hardware that actually givse you a performance
benefit instead of proposing some weird software solution that
makes old software work? Transparency with the random varying latencies
that you propose will kill performance of MPI jobs as well as make the
system unusable for financial applications. This seems be wrong all
around.

> I understand that the application you care about wants to be clever
> and can make better decission and we intend to support that, but this
> does not need to be at the expense of all the others applications.
> Like i said numerous time the decission to migrate memory is a device
> driver decission and how the device driver make that decission can
> be entirely control by userspace through proper device driver API.

What application would be using this? HPC probably not given the
sensitivity to random latencies. Hadoop style stuff?

> Bottom line is we want today anonymous, share or file mapped memory
> to stay the only kind of memory that exist and we want to choose the
> backing store of each of those kind for better placement depending
> on how memory is use (again which can be in the total control of
> the application). But we do not want to introduce a third kind of
> disjoint memory to userspace, this is today situation and we want
> to move forward to tomorrow solution.

Frankly, I do not see any benefit here, nor a use case and I wonder who
would adopt this. The future requires higher performance and not more band
aid.



  reply	other threads:[~2015-04-22 17:14 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 21:44 Interacting with coherent memory on external devices Paul E. McKenney
2015-04-21 23:46 ` Jerome Glisse
2015-04-22  0:36   ` Benjamin Herrenschmidt
2015-04-22 12:42   ` Paul E. McKenney
2015-04-21 23:49 ` Christoph Lameter
2015-04-22  0:05   ` Jerome Glisse
2015-04-22  0:50     ` Christoph Lameter
2015-04-22  1:01       ` Benjamin Herrenschmidt
2015-04-22 13:35         ` Paul E. McKenney
2015-04-22 13:18       ` Paul E. McKenney
2015-04-22 16:16         ` Christoph Lameter
2015-04-22 17:07           ` Jerome Glisse
2015-04-22 18:17             ` Christoph Lameter
2015-04-22 18:52               ` Paul E. McKenney
2015-04-23 14:12                 ` Christoph Lameter
2015-04-23 19:24                   ` Paul E. McKenney
2015-04-24 14:01                     ` Christoph Lameter
2015-04-24 14:13                       ` Paul E. McKenney
2015-04-24 15:53                       ` Rik van Riel
2015-04-23  2:36               ` Benjamin Herrenschmidt
2015-04-23 14:10                 ` Christoph Lameter
2015-04-23 15:42                   ` Jerome Glisse
2015-04-24 14:04                     ` Christoph Lameter
2015-04-23 22:29                   ` Benjamin Herrenschmidt
2015-04-23  2:30           ` Benjamin Herrenschmidt
2015-04-23 14:25             ` Christoph Lameter
2015-04-23 15:25               ` Austin S Hemmelgarn
2015-04-23 19:33                 ` Paul E. McKenney
2015-04-24 14:12                   ` Christoph Lameter
2015-04-24 14:57                     ` Paul E. McKenney
2015-04-24 15:09                       ` Jerome Glisse
2015-04-25 11:20                         ` Paul E. McKenney
2015-04-24 15:52                       ` Christoph Lameter
2015-04-23 22:37                 ` Benjamin Herrenschmidt
2015-04-24 14:09                 ` Christoph Lameter
2015-04-23 16:04       ` Rik van Riel
2015-04-22  0:42   ` Benjamin Herrenschmidt
2015-04-22  0:57     ` Paul E. McKenney
2015-04-22  1:04       ` Benjamin Herrenschmidt
2015-04-22 15:25         ` Christoph Lameter
2015-04-22 16:31           ` Jerome Glisse
2015-04-22 17:14             ` Christoph Lameter [this message]
2015-04-22 19:07               ` Jerome Glisse
2015-04-23  2:34               ` Benjamin Herrenschmidt
2015-04-23 14:38                 ` Christoph Lameter
2015-04-23 16:11                   ` Jerome Glisse
2015-04-24 14:29                     ` Christoph Lameter
2015-04-24 15:08                       ` Jerome Glisse
2015-04-24 16:03                         ` Christoph Lameter
2015-04-24 16:43                           ` Jerome Glisse
2015-04-24 16:58                             ` Christoph Lameter
2015-04-24 17:19                               ` Jerome Glisse
2015-04-24 18:56                                 ` Christoph Lameter
2015-04-24 19:29                                   ` Jerome Glisse
2015-04-24 20:00                                     ` Christoph Lameter
2015-04-24 20:32                                       ` Jerome Glisse
2015-04-25 11:46                                       ` Paul E. McKenney
2015-04-27 15:08                                         ` Christoph Lameter
2015-04-27 15:47                                           ` Jerome Glisse
2015-04-27 16:17                                             ` Christoph Lameter
2015-04-27 16:29                                               ` Rik van Riel
2015-04-27 16:48                                                 ` Christoph Lameter
2015-04-27 23:54                                                   ` Benjamin Herrenschmidt
2015-05-13 14:10                                                     ` Vlastimil Babka
2015-05-13 23:38                                                       ` Benjamin Herrenschmidt
2015-05-14  7:39                                                         ` Vlastimil Babka
2015-05-14  7:51                                                           ` Benjamin Herrenschmidt
2015-05-28 18:18                                                             ` Paul E. McKenney
2015-04-27 16:43                                               ` Jerome Glisse
2015-04-27 16:51                                                 ` Christoph Lameter
2015-04-27 17:21                                                   ` Jerome Glisse
2015-04-27 19:26                                                     ` Christoph Lameter
2015-04-27 19:35                                                       ` Rik van Riel
2015-04-27 20:52                                                       ` Jerome Glisse
2015-04-28 14:18                                                         ` Christoph Lameter
2015-04-28 17:20                                                           ` Jerome Glisse
2015-04-27 16:15                                           ` Paul E. McKenney
2015-04-27 16:31                                             ` Christoph Lameter
2015-04-24 23:45                               ` Benjamin Herrenschmidt
2015-04-23 18:52                   ` Paul E. McKenney
2015-04-24 14:30                     ` Christoph Lameter
2015-04-24 14:54                       ` Paul E. McKenney
2015-04-24 15:49                         ` Christoph Lameter
2015-04-24 16:06                           ` Rik van Riel
2015-04-25 11:49                           ` Paul E. McKenney
2015-04-24 16:00                       ` Jerome Glisse
2015-04-24 16:08                       ` Rik van Riel
2015-04-23 17:28               ` Rik van Riel
2015-04-23  2:27           ` Benjamin Herrenschmidt
2015-04-23 14:20             ` Christoph Lameter
2015-04-23 16:22               ` Jerome Glisse
2015-04-24 18:41                 ` Oded Gabbay
2015-04-23 19:00               ` Paul E. McKenney
2015-04-22 15:20       ` Christoph Lameter
2015-04-25  2:32 ` Rik van Riel
2015-04-25  3:32   ` Benjamin Herrenschmidt
2015-04-25 11:55     ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.11.1504221206080.25607@gentwo.org \
    --to=cl@linux.com \
    --cc=aarcange@redhat.com \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=cabuschardt@nvidia.com \
    --cc=ggerfin@nvidia.com \
    --cc=j.glisse@gmail.com \
    --cc=jglisse@redhat.com \
    --cc=jmckenna@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhairgrove@nvidia.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).