linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: lizhe.67@bytedance.com
Cc: akpm@linux-foundation.org, dev.jain@arm.com, jgg@ziepe.ca,
	jhubbard@nvidia.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, muchun.song@linux.dev, peterx@redhat.com
Subject: Re: [PATCH v3] gup: optimize longterm pin_user_pages() for large folio
Date: Thu, 5 Jun 2025 09:47:02 +0200	[thread overview]
Message-ID: <1bee21f5-6c59-49c4-ad3b-74e6a0ad6ac8@redhat.com> (raw)
In-Reply-To: <20250605073950.1834-1-lizhe.67@bytedance.com>

On 05.06.25 09:39, lizhe.67@bytedance.com wrote:
> On Thu,  5 Jun 2025 11:34:30 +0800, lizhe.67@bytedance.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



  reply	other threads:[~2025-06-05  7:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05  3:34 [PATCH v3] gup: optimize longterm pin_user_pages() for large folio lizhe.67
2025-06-05  7:39 ` lizhe.67
2025-06-05  7:47   ` David Hildenbrand [this message]
2025-06-05  7:51 ` David Hildenbrand
2025-06-05  8:23   ` lizhe.67

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1bee21f5-6c59-49c4-ad3b-74e6a0ad6ac8@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dev.jain@arm.com \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizhe.67@bytedance.com \
    --cc=muchun.song@linux.dev \
    --cc=peterx@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).