From: John Hubbard <jhubbard@nvidia.com>
To: David Hildenbrand <david@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
Vivek Kasireddy <vivek.kasireddy@intel.com>,
Dave Airlie <airlied@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Christoph Hellwig <hch@infradead.org>,
Jason Gunthorpe <jgg@nvidia.com>, Peter Xu <peterx@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Dongwon Kim <dongwon.kim@intel.com>,
Hugh Dickins <hughd@google.com>,
Junxiao Chang <junxiao.chang@intel.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Oscar Salvador <osalvador@suse.de>,
<linux-stable@vger.kernel.org>
Subject: Re: [PATCH v2 1/1] [PATCH] mm/gup: avoid an unnecessary allocation call for FOLL_LONGTERM cases
Date: Tue, 5 Nov 2024 13:31:01 -0800 [thread overview]
Message-ID: <131cf9c8-ebc0-4cbb-b722-22fa8527bf3c@nvidia.com> (raw)
In-Reply-To: <80500348-e86a-4b8b-94a5-1953aa4ebe12@redhat.com>
On 11/5/24 12:47 AM, David Hildenbrand wrote:
> On 05.11.24 04:29, John Hubbard wrote:
...
>> return ret;
>> }
>> +static long
>> +check_and_migrate_movable_pages_or_folios(struct pages_or_folios *pofs)
>> +{
>> + LIST_HEAD(movable_folio_list);
>> + unsigned long collected;
>> +
>> + collected =
>> + collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
>
> Nit: We're allowed to use more than 80 characters :)
Yes, I'm aware. Most of gup.c stays nicely within 80 cols, so it's nice
to keep that if not too awkward....
>
> (I would prefer the old way it was split across more lines if we really want to split; this way here is less common)
>
OK, if I need to respin I'll apply this, to restore the old way. If
not, maybe Andrew can fix it up please?
diff --git a/mm/gup.c b/mm/gup.c
index 0f5121ad0b9f..0a22f7def83c 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2435,8 +2435,8 @@ check_and_migrate_movable_pages_or_folios(struct pages_or_folios *pofs)
LIST_HEAD(movable_folio_list);
unsigned long collected;
- collected =
- collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
+ collected = collect_longterm_unpinnable_folios(&movable_folio_list,
+ pofs);
if (!collected)
return 0;
>
> Thanks!
>
> Acked-by: David Hildenbrand <david@redhat.com>
>
Appreciate the ack, and of course the idea and implementation as well! :)
thanks,
--
John Hubbard
next prev parent reply other threads:[~2024-11-05 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 3:29 [PATCH v2 0/1] " John Hubbard
2024-11-05 3:29 ` [PATCH v2 1/1] [PATCH] " John Hubbard
2024-11-05 8:47 ` David Hildenbrand
2024-11-05 21:31 ` John Hubbard [this message]
2024-11-06 9:23 ` Oscar Salvador
2024-11-07 4:20 ` John Hubbard
2024-11-05 8:42 ` [PATCH v2 0/1] " David Hildenbrand
2024-11-07 4:57 ` John Hubbard
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=131cf9c8-ebc0-4cbb-b722-22fa8527bf3c@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=daniel.vetter@ffwll.ch \
--cc=david@redhat.com \
--cc=dongwon.kim@intel.com \
--cc=hch@infradead.org \
--cc=hughd@google.com \
--cc=jgg@nvidia.com \
--cc=junxiao.chang@intel.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-stable@vger.kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=osalvador@suse.de \
--cc=peterx@redhat.com \
--cc=vivek.kasireddy@intel.com \
--cc=willy@infradead.org \
/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