mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ralph Campbell <rcampbell@nvidia.com>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: <nouveau@lists.freedesktop.org>, <linux-rdma@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Jerome Glisse <jglisse@redhat.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	Christoph Hellwig <hch@lst.de>, Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [PATCH] nouveau/hmm: fix nouveau_dmem_chunk allocations
Date: Thu, 23 Apr 2020 11:32:31 -0700	[thread overview]
Message-ID: <a4a405d7-c136-b479-2bbe-5a2304f59c99@nvidia.com> (raw)
In-Reply-To: <20200423121744.GY11945@mellanox.com>


On 4/23/20 5:17 AM, Jason Gunthorpe wrote:
> On Tue, Apr 21, 2020 at 04:11:07PM -0700, Ralph Campbell wrote:
>> In nouveau_dmem_init(), a number of struct nouveau_dmem_chunk are allocated
>> and put on the dmem->chunk_empty list. Then in nouveau_dmem_pages_alloc(),
>> a nouveau_dmem_chunk is removed from the list and GPU memory is allocated.
>> However, the nouveau_dmem_chunk is never removed from the chunk_empty
>> list nor placed on the chunk_free or chunk_full lists. This results
>> in only one chunk ever being actually used (2MB) and quickly leads to
>> migration to device private memory failures.
>>
>> Fix this by having just one list of free device private pages and if no
>> pages are free, allocate a chunk of device private pages and GPU memory.
>>
>> Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
>> ---
>>   drivers/gpu/drm/nouveau/nouveau_dmem.c | 304 +++++++++----------------
>>   1 file changed, 112 insertions(+), 192 deletions(-)
> 
> Does this generate any conflicts with my series to rework
> hmm_range_fault?
> 
> Jason

I based it on top of your series and the patch that Ben already has queued
("nouveau/hmm: map pages after migration") so it shouldn't have any conflicts.

I guess I should have mentioned that in a cover letter.

      reply	other threads:[~2020-04-23 18:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 23:11 Ralph Campbell
2020-04-23 12:17 ` Jason Gunthorpe
2020-04-23 18:32   ` Ralph Campbell [this message]

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=a4a405d7-c136-b479-2bbe-5a2304f59c99@nvidia.com \
    --to=rcampbell@nvidia.com \
    --cc=bskeggs@redhat.com \
    --cc=hch@lst.de \
    --cc=jgg@mellanox.com \
    --cc=jglisse@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.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

all inboxes | Powered by JetHome®