[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211117095041.GA9730@lst.de>
Date: Wed, 17 Nov 2021 10:50:41 +0100
From: Christoph Hellwig <hch@....de>
To: Alex Sierra <alex.sierra@....com>
Cc: akpm@...ux-foundation.org, Felix.Kuehling@....com,
linux-mm@...ck.org, rcampbell@...dia.com,
linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
hch@....de, jgg@...dia.com, jglisse@...hat.com, apopple@...dia.com,
willy@...radead.org
Subject: Re: [PATCH v1 1/9] mm: add zone device coherent type memory support
On Mon, Nov 15, 2021 at 01:30:18PM -0600, Alex Sierra wrote:
> @@ -5695,8 +5695,8 @@ static int mem_cgroup_move_account(struct page *page,
> * 2(MC_TARGET_SWAP): if the swap entry corresponding to this pte is a
> * target for charge migration. if @target is not NULL, the entry is stored
> * in target->ent.
> - * 3(MC_TARGET_DEVICE): like MC_TARGET_PAGE but page is MEMORY_DEVICE_PRIVATE
> - * (so ZONE_DEVICE page and thus not on the lru).
> + * 3(MC_TARGET_DEVICE): like MC_TARGET_PAGE but page is MEMORY_DEVICE_COHERENT
> + * or MEMORY_DEVICE_PRIVATE (so ZONE_DEVICE page and thus not on the lru).
Please avoid the overly long line. But I don't think we we need to mention
the exact enum, but rather do something like:
* 3(MC_TARGET_DEVICE): like MC_TARGET_PAGE but page is device memory and
* thus not on the lru.
> + switch (pgmap->type) {
> + case MEMORY_DEVICE_PRIVATE:
> + case MEMORY_DEVICE_COHERENT:
> /*
> * TODO: Handle HMM pages which may need coordination
> * with device-side memory.
This might be a good opportunity for doing a s/HMM/device/ here.
Powered by blists - more mailing lists