Re: [RFC PATCH 3/5] mm/migrate: add migrate_folios_batch_move to batch the folio move operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 Jan 2025, at 6:47, Shivank Garg wrote:

> On 1/3/2025 10:54 PM, Zi Yan wrote:
>> This is a preparatory patch that enables batch copying for folios
>> undergoing migration. By enabling batch copying the folio content, we can
>> efficiently utilize the capabilities of DMA hardware or multi-threaded
>> folio copy. It also adds MIGRATE_NO_COPY back to migrate_mode, so that
>> folio copy will be skipped during metadata copy process and performed
>> in a batch later.
>>
>> Currently, the folio move operation is performed individually for each
>> folio in sequential manner:
>> for_each_folio() {
>>         Copy folio metadata like flags and mappings
>>         Copy the folio content from src to dst
>>         Update page tables with dst folio
>> }
>>
>> With this patch, we transition to a batch processing approach as shown
>> below:
>> for_each_folio() {
>>         Copy folio metadata like flags and mappings
>> }
>> Batch copy all src folios to dst
>> for_each_folio() {
>>         Update page tables with dst folios
>> }
>>
>> dst->private is used to store page states and possible anon_vma value,
>> thus needs to be cleared during metadata copy process. To avoid additional
>> memory allocation to store the data during batch copy process, src->private
>> is used to store the data after metadata copy process, since src is no
>> longer used.
>>
>> Originally-by: Shivank Garg <shivankg@xxxxxxx>
>> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
>> ---
>
> Hi Zi,
>
> Please retain my Signed-off-by for future posting of batch page migration
> patchset.
>
> I think we can separate out the MIGRATE_NO_COPY support into separate patch.

Sure. Will change them in the next version.

Best Regards,
Yan, Zi




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux