-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pin_user_pages_fast instead of get_user_pages_fast in create_existing_sysmem(drivers/hv/dxgkrnl/dxgvmbus.c) #11095
Comments
Word from the source is that this is unsupported by design. (Forking a process using a vGPU that is) |
Can you elaborate on this? |
Hi @pmartincic , I'm not forking a process(child process) using a vGPU, I mean the parent process should still be able to use the vGPU. Regards, |
Ahhh, I'm sorry I misread what you wrote. That's my fault. I'll start the conversation internally again. |
Hi @pmartincic, Any updates? Thanks, |
Do you have a sample/repro/minimal app/code sample you can post? I don't work with/on these features normally, is a little out of my wheelhouse and I want to perform a sanity check before I pass it along. (Edit: they agree the parent process should still work) |
It's hard to put all sample codes here to reproduce the issue. What do you want to check? |
Hi @pmartincic, Have you guys seen these docs? https://github.com/torvalds/linux/blob/master/Documentation/core-api/pin_user_pages.rst#page-maybe-dma-pinned-the-whole-point-of-pinning Especially, the following
Regards, |
Trust but verify. I don't work on this area of the product. My plate is pretty full. I don't have time to write a repro. Somebody who does know this area is willing to look at it. I have a limited amount of political capital. This person helping owes me nothing and it's not their responsibility to do what I ask. I will pass this bug along to them if you give a repro that I can sanity check. |
I'm working on some closed source work on AMD hardware and It's hard for me to expose the codes. The bug is actually clear. |
You're missing the point. I'm probably not going to dig into this. The person I'm talking to who has the capacity to, would like a sample repro. For their sake please make one. |
Thanks,I got you point. But it's inconvenient for me to expose a sample to reproduce which includes some closed source parts. Can I talk with that person?If they have some questions. |
I create a repro demo and hide hardware driver specific details. You guys must use AMD gfx9 GPU and above. https://github.com/langyuxf/dxgkrnl_linux.git Thanks |
Hi @pmartincic @iourit, We observed similar issues under memory pressure. Pages acquired via get_user_pages_fast() are reclaimed by linux memory management system while GPU page tables are not updated accordingly. Then the GPU still operates on the original pages. Have you guys reproduced the issue? Thanks. Regards, |
This should be fixed with https://github.com/microsoft/WSL/releases/tag/2.2.3. |
Windows Version
10.0.22631.3085
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.133.1-1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
1, use mmap to allocate a PRIVATE + ANONYMOUS CPU memory
2, use dxgkio_create_allocation and the CPU memory to create a GPU allocation
3, fork a child process, then write to this memory from CPU side in parent process
Expected Behavior
The backing store physical pages of CPU VA in parent process should be still mapped in GPU page table.
Actual Behavior
Due to fork and write from parent process, copy-on-write is triggered, new physical pages are allocated for parent process
which are not mapped in GPU page table.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: