From: "Jürgen Groß" <jgross@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Jason Andryuk <jandryuk@gmail.com>,
xen-devel <xen-devel@lists.xenproject.org>,
open list <linux-kernel@vger.kernel.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH 2/2] xen: don't use page->lru for ZONE_DEVICE memory
Date: Thu, 10 Dec 2020 12:25:51 +0100 [thread overview]
Message-ID: <7425aed6-ff6f-873a-b629-b9c7058e9b13@suse.com> (raw)
In-Reply-To: <20201210111454.dxykvyktzwr3fjyk@Air-de-Roger>
[-- Attachment #1.1.1: Type: text/plain, Size: 1439 bytes --]
On 10.12.20 12:14, Roger Pau Monné wrote:
> On Tue, Dec 08, 2020 at 07:45:00AM +0100, Jürgen Groß wrote:
>> On 07.12.20 21:48, Jason Andryuk wrote:
>>> On Mon, Dec 7, 2020 at 8:30 AM Juergen Gross <jgross@suse.com> wrote:
>>>>
>>>> Commit 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated
>>>> memory") introduced usage of ZONE_DEVICE memory for foreign memory
>>>> mappings.
>>>>
>>>> Unfortunately this collides with using page->lru for Xen backend
>>>> private page caches.
>>>>
>>>> Fix that by using page->zone_device_data instead.
>>>>
>>>> Fixes: 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory")
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>
>>> Would it make sense to add BUG_ON(is_zone_device_page(page)) and the
>>> opposite as appropriate to cache_enq?
>>
>> No, I don't think so. At least in the CONFIG_ZONE_DEVICE case the
>> initial list in a PV dom0 is populated from extra memory (basically
>> the same, but not marked as zone device memory explicitly).
>
> I assume it's fine for us to then use page->zone_device_data even if
> the page is not explicitly marked as ZONE_DEVICE memory?
I think so, yes, as we are owner of that page and we were fine to use
lru, too.
>
> If that's fine, add my:
>
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
>
> To both patches, and thank you very much for fixing this!
UR welcome. :-)
Juergen
[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2020-12-10 11:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 13:30 [PATCH 0/2] xen: fix using ZONE_DEVICE memory for foreign mappings Juergen Gross
2020-12-07 13:30 ` [PATCH 1/2] xen: add helpers for caching grant mapping pages Juergen Gross
2020-12-07 23:52 ` boris.ostrovsky
2020-12-07 13:30 ` [PATCH 2/2] xen: don't use page->lru for ZONE_DEVICE memory Juergen Gross
2020-12-07 20:48 ` Jason Andryuk
2020-12-08 6:45 ` Jürgen Groß
2020-12-10 11:14 ` Roger Pau Monné
2020-12-10 11:25 ` Jürgen Groß [this message]
2020-12-10 13:30 ` Jason Andryuk
2020-12-07 23:56 ` boris.ostrovsky
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=7425aed6-ff6f-873a-b629-b9c7058e9b13@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jandryuk@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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®