[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <131cf9c8-ebc0-4cbb-b722-22fa8527bf3c@nvidia.com>
Date: Tue, 5 Nov 2024 13:31:01 -0800
From: John Hubbard <jhubbard@...dia.com>
To: David Hildenbrand <david@...hat.com>, Andrew Morton
<akpm@...ux-foundation.org>
CC: LKML <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>, Vivek Kasireddy
<vivek.kasireddy@...el.com>, Dave Airlie <airlied@...hat.com>, Gerd Hoffmann
<kraxel@...hat.com>, Matthew Wilcox <willy@...radead.org>, Christoph Hellwig
<hch@...radead.org>, Jason Gunthorpe <jgg@...dia.com>, Peter Xu
<peterx@...hat.com>, Arnd Bergmann <arnd@...db.de>, Daniel Vetter
<daniel.vetter@...ll.ch>, Dongwon Kim <dongwon.kim@...el.com>, Hugh Dickins
<hughd@...gle.com>, Junxiao Chang <junxiao.chang@...el.com>, Mike Kravetz
<mike.kravetz@...cle.com>, Oscar Salvador <osalvador@...e.de>,
<linux-stable@...r.kernel.org>
Subject: Re: [PATCH v2 1/1] [PATCH] mm/gup: avoid an unnecessary allocation
call for FOLL_LONGTERM cases
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@...hat.com>
>
Appreciate the ack, and of course the idea and implementation as well! :)
thanks,
--
John Hubbard
Powered by blists - more mailing lists