Linux-NVDIMM Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: zhoucm1 <david1.zhou@amd.com>
To: "Christian König" <christian.koenig@amd.com>,
	"Haggai Eran  <haggaie@mellanox.com>,
	Jason Gunthorpe" <jgunthorpe@obsidianresearch.com>,
	"Yu, Qiang" <Qiang.Yu@amd.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	"Kuehling, Felix  <Felix.Kuehling@amd.com>,
	Serguei Sagalovitch" <serguei.sagalovitch@amd.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>, Sander, ,
	"Suravee  <Suravee.Suthikulpanit@amd.com>,
	linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"Deucher, Alexander  <Alexander.Deucher@amd.com>,
	Max Gurtovoy <maxg@mellanox.com>,
	Blinzer, Paul" <Paul.Blinzer@amd.com>,
	"Linux-media@vger.kernel.org" <Linux-media@vger.kernel.org>
Subject: Re: Enabling peer to peer device transactions for PCIe devices
Date: Mon, 28 Nov 2016 13:31:55 +0800	[thread overview]
Message-ID: <583BC14B.2040809@amd.com> (raw)
In-Reply-To: <0087fba9-7bcb-8bb3-c26e-4ef3e4970c34@amd.com>

+Qiang, who is working on it.

On 2016年11月27日 22:07, Christian König wrote:
> Am 27.11.2016 um 15:02 schrieb Haggai Eran:
>> On 11/25/2016 9:32 PM, Jason Gunthorpe wrote:
>>> On Fri, Nov 25, 2016 at 02:22:17PM +0100, Christian König wrote:
>>>
>>>>> Like you say below we have to handle short lived in the usual way, 
>>>>> and
>>>>> that covers basically every device except IB MRs, including the
>>>>> command queue on a NVMe drive.
>>>> Well a problem which wasn't mentioned so far is that while GPUs do 
>>>> have a
>>>> page table to mirror the CPU page table, they usually can't recover 
>>>> from
>>>> page faults.
>>>> So what we do is making sure that all memory accessed by the GPU 
>>>> Jobs stays
>>>> in place while those jobs run (pretty much the same pinning you do 
>>>> for the
>>>> DMA).
>>> Yes, it is DMA, so this is a valid approach.
>>>
>>> But, you don't need page faults from the GPU to do proper coherent
>>> page table mirroring. Basically when the driver submits the work to
>>> the GPU it 'faults' the pages into the CPU and mirror translation
>>> table (instead of pinning).
>>>
>>> Like in ODP, MMU notifiers/HMM are used to monitor for translation
>>> changes. If a change comes in the GPU driver checks if an executing
>>> command is touching those pages and blocks the MMU notifier until the
>>> command flushes, then unfaults the page (blocking future commands) and
>>> unblocks the mmu notifier.
>> I think blocking mmu notifiers against something that is basically
>> controlled by user-space can be problematic. This can block things like
>> memory reclaim. If you have user-space access to the device's queues,
>> user-space can block the mmu notifier forever.
> Really good point.
>
> I think this means the bare minimum if we don't have recoverable page 
> faults is to have preemption support like Felix described in his 
> answer as well.
>
> Going to keep that in mind,
> Christian.
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2016-11-28  5:31 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 20:36 Enabling peer to peer device transactions for PCIe devices Deucher, Alexander
2016-11-22 18:11 ` Dan Williams
2016-11-22 18:59   ` Serguei Sagalovitch
2016-11-22 20:01     ` Dan Williams
2016-11-22 20:10       ` Daniel Vetter
2016-11-22 20:24         ` Dan Williams
2016-11-22 20:35         ` Serguei Sagalovitch
2016-11-22 21:03           ` Daniel Vetter
2016-11-22 21:13             ` Serguei Sagalovitch
2016-11-22 21:21             ` Dan Williams
2016-11-22 22:21               ` Sagalovitch, Serguei
2016-11-23  7:49               ` Daniel Vetter
2016-11-23  8:51                 ` Christian König
2016-11-23 19:27                   ` Serguei Sagalovitch
2016-11-23 17:03                 ` Dave Hansen
2016-11-23 17:13     ` Logan Gunthorpe
2016-11-23 17:27       ` Bart Van Assche
2016-11-23 18:40         ` Dan Williams
2016-11-23 19:12           ` Jason Gunthorpe
2016-11-23 19:24             ` Serguei Sagalovitch
2016-11-23 19:06         ` Serguei Sagalovitch
2016-11-23 19:05       ` Jason Gunthorpe
2016-11-23 19:14         ` Serguei Sagalovitch
2016-11-23 19:32           ` Jason Gunthorpe
2016-11-23 19:58             ` Serguei Sagalovitch
2016-11-23 20:33               ` Jason Gunthorpe
2016-11-23 21:11                 ` Logan Gunthorpe
2016-11-23 21:55                   ` Jason Gunthorpe
2016-11-23 22:42                     ` Dan Williams
2016-11-23 23:25                       ` Jason Gunthorpe
2016-11-24  9:45                         ` Christian König
2016-11-24 16:26                           ` Jason Gunthorpe
2016-11-24 17:00                             ` Serguei Sagalovitch
2016-11-24 17:55                           ` Logan Gunthorpe
2016-11-25 13:06                             ` Christian König
2016-11-25 16:45                               ` Logan Gunthorpe
2016-11-25 17:20                                 ` Serguei Sagalovitch
2016-11-25 20:26                                   ` Felix Kuehling
2016-11-25 20:48                                     ` Serguei Sagalovitch
2016-11-24  0:40                     ` Sagalovitch, Serguei
2016-11-24 16:24                       ` Jason Gunthorpe
2016-11-24  1:25                     ` Logan Gunthorpe
2016-11-24 16:42                       ` Jason Gunthorpe
2016-11-24 18:11                         ` Logan Gunthorpe
2016-11-25  7:58                           ` Christoph Hellwig
2016-11-25 19:41                             ` Jason Gunthorpe
2016-11-25 17:59                           ` Serguei Sagalovitch
2016-11-25 13:22                         ` Christian König
2016-11-25 17:16                           ` Serguei Sagalovitch
2016-11-25 19:34                             ` Jason Gunthorpe
2016-11-25 19:49                               ` Serguei Sagalovitch
2016-11-25 20:19                                 ` Jason Gunthorpe
2016-11-25 23:41                               ` Alex Deucher
2016-11-25 19:32                           ` Jason Gunthorpe
2016-11-25 20:40                             ` Christian König
2016-11-25 20:51                               ` Felix Kuehling
2016-11-25 21:18                               ` Jason Gunthorpe
2016-11-27  8:16                             ` Haggai Eran
2016-11-27 14:02                             ` Haggai Eran
2016-11-27 14:07                               ` Christian König
2016-11-28  5:31                                 ` zhoucm1 [this message]
2016-11-28 14:48                               ` Serguei Sagalovitch
     [not found]                                 ` <314e9ef7-f60e-bf6b-d488-c585f1ea60e8-5C7GfCeVMHo@public.gmane.org>
2016-11-28 18:36                                   ` Haggai Eran
2016-11-28 16:57                               ` Jason Gunthorpe
     [not found]                                 ` <20161128165751.GB28381-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-28 18:19                                   ` Haggai Eran
     [not found]                                     ` <1480357179.19407.13.camel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-11-28 19:02                                       ` Jason Gunthorpe
     [not found]                                         ` <20161128190244.GA21975-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-30 10:45                                           ` Haggai Eran
     [not found]                                             ` <c0ddccf3-52ce-d883-a57a-70d8a1febf85-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-11-30 16:23                                               ` Jason Gunthorpe
     [not found]                                                 ` <20161130162353.GA24639-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-30 17:28                                                   ` Serguei Sagalovitch
     [not found]                                                     ` <2560aab2-426c-6e58-cb4f-77ec76e0c941-5C7GfCeVMHo@public.gmane.org>
2016-12-04  7:33                                                       ` Haggai Eran
2016-11-30 18:01                                                   ` Logan Gunthorpe
     [not found]                                                     ` <5f5b7989-84f5-737e-47c8-831f752d6280-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
2016-12-04  7:42                                                       ` Haggai Eran
     [not found]                                                         ` <c1ead8a0-6850-fc84-2793-b986f5c1f726-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-12-04 13:06                                                           ` Stephen Bates
2016-12-04 13:23                                                           ` Stephen Bates
     [not found]                                                             ` <61a2fb07344aacd81111449d222de66e.squirrel-2RFepEojUI2m/tTznewQxVaTQe2KTcn/@public.gmane.org>
2016-12-05 17:18                                                               ` Jason Gunthorpe
     [not found]                                                                 ` <20161205171830.GB27784-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-05 17:40                                                                   ` Dan Williams
     [not found]                                                                     ` <CAPcyv4hdMkXOxj9hUDpnftA7UTGDa498eBugdePp8EWr6S80gA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-05 18:02                                                                       ` Jason Gunthorpe
     [not found]                                                                         ` <20161205180231.GA28133-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-05 18:08                                                                           ` Dan Williams
     [not found]                                                                             ` <CAPcyv4iEXwvtDbZgnWzdKU6uN_sOGmXH1KtW_Nws6kUftJUigQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-05 18:39                                                                               ` Logan Gunthorpe
     [not found]                                                                                 ` <a3a1c239-297d-c091-7758-54acdf00f74e-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
2016-12-05 18:48                                                                                   ` Dan Williams
     [not found]                                                                                     ` <CAPcyv4iVHhOSxPrLMZ53Xw3CK+9cOWn9zEG8smMtqF_LAcKKpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-05 19:14                                                                                       ` Jason Gunthorpe
     [not found]                                                                                         ` <20161205191438.GA20464-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-05 19:27                                                                                           ` Logan Gunthorpe
     [not found]                                                                                             ` <10356964-c454-47fb-7fb3-8bf2a418b11b-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
2016-12-05 19:46                                                                                               ` Jason Gunthorpe
     [not found]                                                                                                 ` <20161205194614.GA21132-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-05 19:59                                                                                                   ` Logan Gunthorpe
2016-12-05 20:06                                                                                                   ` Christoph Hellwig
2016-12-06  8:06                                                                                       ` Stephen Bates
     [not found]                                                                                         ` <ac07a73f2601f6ca35cecc83c553feb0.squirrel-2RFepEojUI2m/tTznewQxVaTQe2KTcn/@public.gmane.org>
2016-12-06 16:38                                                                                           ` Jason Gunthorpe
     [not found]                                                                                             ` <20161206163850.GC28066-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-06 16:51                                                                                               ` Logan Gunthorpe
     [not found]                                                                                                 ` <ec136c34-417d-8a55-c176-2c1d759a5fb8-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
2016-12-06 17:28                                                                                                   ` Jason Gunthorpe
     [not found]                                                                                                     ` <20161206172838.GB19318-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-06 21:47                                                                                                       ` Logan Gunthorpe
     [not found]                                                                                                         ` <bedaa7a2-e42d-da83-5c2b-9d639b0397c5-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
2016-12-06 22:02                                                                                                           ` Dan Williams
2016-12-06 17:12                                                                                               ` Christoph Hellwig
2016-12-04  7:53                                                   ` Haggai Eran
2016-11-30 17:10                                               ` Deucher, Alexander
2016-11-28 18:20                                 ` Logan Gunthorpe
2016-11-28 19:35                                   ` Serguei Sagalovitch
2016-11-28 21:36                                     ` Logan Gunthorpe
2016-11-28 21:55                                       ` Serguei Sagalovitch
2016-11-28 22:24                                         ` Jason Gunthorpe
2017-01-05 18:39 ` Jerome Glisse
2017-01-05 19:01   ` Jason Gunthorpe
2017-01-05 19:54     ` Jerome Glisse
2017-01-05 20:07       ` Jason Gunthorpe
2017-01-05 20:19         ` Jerome Glisse
2017-01-05 22:42           ` Jason Gunthorpe
2017-01-05 23:23             ` Jerome Glisse
2017-01-06  0:30               ` Jason Gunthorpe
2017-01-06  0:41                 ` Serguei Sagalovitch
2017-01-06  1:58                 ` Jerome Glisse
2017-01-06 16:56                   ` Serguei Sagalovitch
2017-01-06 17:37                     ` Jerome Glisse
2017-01-06 18:26                       ` Jason Gunthorpe
2017-01-06 19:12                         ` Deucher, Alexander
2017-01-06 22:10                         ` Logan Gunthorpe
2017-01-12  4:54                           ` Stephen Bates
2017-01-12 15:11                             ` Jerome Glisse
2017-01-12 17:17                               ` Jason Gunthorpe
2017-01-13 13:04                               ` Christian König
2017-01-12 22:35                             ` Logan Gunthorpe
2017-01-06 15:08     ` Henrique Almeida
2017-10-20 12:36 ` Ludwig Petrosyan
2017-10-20 15:48   ` Logan Gunthorpe
2017-10-22  6:13     ` Petrosyan, Ludwig
2017-10-22 17:19       ` Logan Gunthorpe
2017-10-23 16:08       ` David Laight
2017-10-23 22:04         ` Logan Gunthorpe
2017-10-24  5:58           ` Petrosyan, Ludwig
2017-10-24 14:58             ` David Laight
2017-10-26 13:28               ` Petrosyan, Ludwig
  -- strict thread matches above, loose matches on Subject: below --
2017-07-11 15:10 lee fei

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=583BC14B.2040809@amd.com \
    --to=david1.zhou@amd.com \
    --cc=Linux-media@vger.kernel.org \
    --cc=Paul.Blinzer@amd.com \
    --cc=Qiang.Yu@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=serguei.sagalovitch@amd.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