From: Vlastimil Babka <vbabka@suse.cz>
To: John Hubbard <jhubbard@nvidia.com>,
Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, linux-stable@vger.kernel.org,
Vivek Kasireddy <vivek.kasireddy@intel.com>,
David Hildenbrand <david@redhat.com>,
Dave Airlie <airlied@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Matthew Wilcox <willy@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>
Subject: Re: [PATCH] mm/gup: restore the ability to pin more than 2GB at a time
Date: Wed, 30 Oct 2024 12:03:10 +0100 [thread overview]
Message-ID: <87124c1d-5b95-4499-aa4b-22f2ecd376bc@suse.cz> (raw)
In-Reply-To: <ea81f12a-95a3-4b9d-90e7-53a5d9c910be@nvidia.com>
On 10/30/24 05:39, John Hubbard wrote:
> On 10/29/24 9:33 PM, Christoph Hellwig wrote:
>> On Tue, Oct 29, 2024 at 09:30:41PM -0700, John Hubbard wrote:
>>> I do, yes. And what happens is that when you use GPUs, drivers like
>>> to pin system memory, and then point the GPU page tables to that
>>> memory. For older GPUs that don't support replayable page faults,
>>> that's required.
>>>
>>> So this behavior has been around forever.
>>>
>>> The customer was qualifying their software and noticed that before
>>> Linux 6.10, they could allocate >2GB, and with 6.11, they could
>>> not.
>>>
>>> Whether it is "wise" for user space to allocate that much at once
>>> is a reasonable question, but at least one place is (or was!) doing
>>> it.
>>
>> Still missing a callchain, which make me suspect that it is your weird
>> out of tree driver, in which case this simply does not matter.
>>
>
> I expect I could piece together something with Nouveau, given enough
> time and help from Ben Skeggs and Danillo and all...
>
> Yes, this originated with the out of tree driver. But it never occurred
> to me that upstream be uninterested in an obvious fix to an obvious
> regression.
It might be a regression even if you don't try to pin over 2GB. high-order
(>costly order) allocations can fail and/or cause disruptive
reclaim/compaction cycles even below MAX_PAGE_ORDER and it's better to use
kvmalloc if physical contiguity is not needed, it will attempt the physical
kmalloc() allocation with __GFP_NORETRY (little disruption) and fallback to
vmalloc() quickly.
Of course if there's a way to avoid the allocation completely, even beter.
>
> thanks,
next prev parent reply other threads:[~2024-10-30 11:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 3:01 John Hubbard
2024-10-30 4:21 ` Christoph Hellwig
2024-10-30 4:30 ` John Hubbard
2024-10-30 4:33 ` Christoph Hellwig
2024-10-30 4:39 ` John Hubbard
2024-10-30 4:42 ` Christoph Hellwig
2024-10-30 4:44 ` John Hubbard
2024-10-30 6:18 ` Alistair Popple
2024-10-30 6:50 ` John Hubbard
2024-10-30 8:34 ` David Hildenbrand
2024-10-30 9:01 ` David Hildenbrand
2024-10-30 18:34 ` John Hubbard
2024-10-31 0:02 ` Jason Gunthorpe
2024-10-31 0:17 ` John Hubbard
2024-10-31 0:25 ` Jason Gunthorpe
2024-10-31 0:47 ` John Hubbard
2024-10-30 12:04 ` Jason Gunthorpe
2024-10-30 17:25 ` John Hubbard
2024-10-30 11:59 ` Jason Gunthorpe
2024-10-30 11:03 ` Vlastimil Babka [this message]
2024-10-30 17:29 ` John Hubbard
2024-10-30 17:42 ` Vlastimil Babka
2024-10-30 17:49 ` 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=87124c1d-5b95-4499-aa4b-22f2ecd376bc@suse.cz \
--to=vbabka@suse.cz \
--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=jhubbard@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