From: lizhe.67@bytedance.com
To: david@redhat.com, akpm@linux-foundation.org
Cc: dev.jain@arm.com, jgg@ziepe.ca, jhubbard@nvidia.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
lizhe.67@bytedance.com, muchun.song@linux.dev, peterx@redhat.com
Subject: Re: [PATCH v4] gup: optimize longterm pin_user_pages() for large folio
Date: Fri, 6 Jun 2025 16:27:13 +0800 [thread overview]
Message-ID: <20250606082713.87113-1-lizhe.67@bytedance.com> (raw)
In-Reply-To: <6f0ee0d4-60a9-4453-a08e-2353b234dac1@redhat.com>
On Fri, 6 Jun 2025 09:58:45 +0200, david@redhat.com wrote:
> On 06.06.25 09:37, lizhe.67@bytedance.com wrote:
> > On Fri, 6 Jun 2025 10:37:42 +0800, david@redhat.com wrote:
> >
> >>> * Returns the number of collected folios. Return value is always >= 0.
> >>> */
> >>> @@ -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)) {
> >>
> >> Nit: indentation is still off?
> >
> > In my editor (vim with ts=4), after applying this patch, the folio on
> > this line would be positioned directly below the folio on the previous
> > line.
>
> Documentation/process/coding-style.rst
>
> "Tabs are 8 characters"
>
> :)
>
> Good choice on using vim. This is what I have in my .vimrc regarding tabs
>
> set tabstop=8
> set shiftwidth=8
> set noexpandtab
>
> set smartindent
> set cindent
I truly appreciate your correction and guidance. I sincerely apologize
for the formatting issue that I've caused.
I noticed that Andrew has already integrated this patch into the mm-new
branch. I'm just wondering if there's still a need for me to send out a
v5 patch. I'm happy to do whatever is necessary to ensure everything is
in order.
Thanks,
Zhe
next prev parent reply other threads:[~2025-06-06 8:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 2:37 lizhe.67
2025-06-06 7:21 ` David Hildenbrand
2025-06-06 7:37 ` lizhe.67
2025-06-06 7:58 ` David Hildenbrand
2025-06-06 8:27 ` lizhe.67 [this message]
2025-06-06 8:50 ` David Hildenbrand
2025-06-06 8:58 ` lizhe.67
2025-06-08 17:10 ` David Laight
2025-06-06 9:19 ` 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=20250606082713.87113-1-lizhe.67@bytedance.com \
--to=lizhe.67@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--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=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