[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1bee21f5-6c59-49c4-ad3b-74e6a0ad6ac8@redhat.com>
Date: Thu, 5 Jun 2025 09:47:02 +0200
From: David Hildenbrand <david@...hat.com>
To: lizhe.67@...edance.com
Cc: akpm@...ux-foundation.org, dev.jain@....com, jgg@...pe.ca,
jhubbard@...dia.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
muchun.song@...ux.dev, peterx@...hat.com
Subject: Re: [PATCH v3] gup: optimize longterm pin_user_pages() for large
folio
On 05.06.25 09:39, lizhe.67@...edance.com wrote:
> On Thu, 5 Jun 2025 11:34:30 +0800, lizhe.67@...edance.com wrote:
>
>> @@ -2324,16 +2349,12 @@ static void collect_longterm_unpinnable_folios(
>> struct list_head *movable_folio_list,
>> struct pages_or_folios *pofs)
>> {
>> - struct folio *prev_folio = NULL;
>> bool drain_allow = true;
>> - unsigned long i;
>> -
>> - for (i = 0; i < pofs->nr_entries; i++) {
>> - struct folio *folio = pofs_get_folio(pofs, i);
>> + struct folio *folio;
>> + long i = 0;
>>
>> - if (folio == prev_folio)
>> - continue;
>> - prev_folio = folio;
>> + for (folio = pofs_get_folio(pofs, i); folio;
>> + folio = pofs_next_folio(folio, pofs, &i)) {
>
> Hi David, I used three tabs for indentation here, but it doesn't seem to be
> the effect you wanted. Did you mean that the indentation could be achieved
> through tags and spaces, so that the folio on this line would be positioned
> directly below the folio on the previous line
Yes, that's what we do for these cases.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists