pakmarkthub / dragon

A host-based framework that transparently extends the GPU addressable global memory space beyond the host memory using NVM-backed data pointers
https://ft.ornl.gov/research/dragon
MIT License
58 stars 20 forks source link

About page-fault #5

Closed weishuo2 closed 4 years ago

weishuo2 commented 4 years ago

I am doing things related to page-fault-handler in the GPU driver.But limited to my own environment, I cannot run the dragon completely. So could you tell me in which file the relevant code to intercept GPU pages-fault in the GPU driver is?And where is the dragon's processing code or keywords when the page is missing? Sorry for bothering you so many times, thanks very much.

pakmarkthub commented 4 years ago

Hi @weishuo2,

My apologies for the late reply. We are reaching the end of the year and work has become busier.

GPU driver composes of multiple smaller drivers. I am going to talk about the UVM driver here.

UVM driver mainly handles page faults from GPU and CPU on managed memory. It is also responsible for data movement between GPU memory and system memory. The page-fault handling code is spread throughout the entire driver.

For starter, I recommend you to look at:

  1. uvm8_va_block.c: uvm_va_block_make_resident would give you a general idea on how UVM driver moves data around.
  2. Search for "*bottom_half*" functions. These functions are the entries of page-fault signals from GPU.
  3. After you apply the patch provided in this repository, look inside uvm8_nvmgpu.c. That file contains the core functions for integrating GPU memory, system memory, and storage address spaces.