HMM: mm add helper to update page table when migrating memory v2.
Quoted 6 lines
This is a multi-stage process, first we save and replace page table entry with special HMM entry, also flushing tlb in the process. If we run into non allocated entry we either use the zero page or we allocate new page. For swaped entry we try to swap them in.
Please elaborate why swap entry is handled this way.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Hillf Danton
Quoted 6 lines
This is a multi-stage process, first we save and replace page table entry with special HMM entry, also flushing tlb in the process. If we run into non allocated entry we either use the zero page or we allocate new page. For swaped entry we try to swap them in.
Please elaborate why swap entry is handled this way.
So first, this is only when you have a device then use HMM and a device that use memory migration. So far it only make sense for discrete GPUs. So regular workload that do not use a GPUs with HMM are not impacted and will not go throught this code path.
Now, here we are migrating memory because the device driver is asking for it, so presumably we are expecting that the device will use that memory hence we want to swap in anything that have been swap to disk. Once it is swap in memory we copy it to device memory and free the pages. So in the end we only need to allocate a page temporarily until we move things to the device.
Cheers,
Jerome
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 12 lines
Quoted 6 lines
Quoted 5 lines
This is a multi-stage process, first we save and replace page table entry with special HMM entry, also flushing tlb in the process. If we run into non allocated entry we either use the zero page or we allocate new page. For swaped entry we try to swap them in.
Please elaborate why swap entry is handled this way.
So first, this is only when you have a device then use HMM and a device that use memory migration. So far it only make sense for discrete GPUs. So regular workload that do not use a GPUs with HMM are not impacted and will not go throught this code path.
Quoted 7 lines
Now, here we are migrating memory because the device driver is asking for it, so presumably we are expecting that the device will use that memory hence we want to swap in anything that have been swap to disk. Once it is swap in memory we copy it to device memory and free the pages. So in the end we only need to allocate a page temporarily until we move things to the device.
I prefer it is in log message.
thanks
Hillf
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>