Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2687466pxu; Mon, 7 Dec 2020 12:52:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYtgt1mbVZDmy/eLXbp6C5Vzofl9PNbu8dL3Sjds8cOrqwHzFb2r4kLWJ1+7d7NpAW+awA X-Received: by 2002:a50:d887:: with SMTP id p7mr14055760edj.149.1607374334803; Mon, 07 Dec 2020 12:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607374334; cv=none; d=google.com; s=arc-20160816; b=z6eafNxPqfzK2nVmUlbJTKsNvJKtmh2FCREIszwu5wowPzFGRZQYDLPgjj8mJYy8No VBnMfDkQC03hZm1PKYM40LQosD5lxRqW4DNcPKmachmMbGkhEpj5ls+aPvsjBIIHD+GR lcr60ytWZmdNeGlBTbKXOCdg/z7vZxiVicXEKeg09cw2tg26TzUGBgYSizFgNhTzhJHS 9KGIXtLH9ZbuRCFXrYe7lOpe2OzsMdvTneoGWLdYd9li8+mm0cvQdarFbvsv0BhbiV9L wcyLu0IlYVCiWqrSh39hpn3AJDl8TkYwAGWqLEqbtW+d7WTd80tbbEc44GGGGOnx1BhA TMjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=afeBzrAkz5BwizCHeAJgvDbsOemFkWApafPEH+e5coo=; b=aK4ekI6jx3jk0RyH+d7o8ja1sP9qMbqyEq+kuYP7QnlR5iAGR87xw39oRhXjVLM3HQ iRIUmw2ngApE30QgIJKTqV5nPaKuEsrDM3bmlZcUPzD9gPduC8WpU1kKSDFRHKppLsuY 9PnIPxy60VudpEGpZLPjWRNb+aC3vc2MzVMpD3AB3Dd+sdE3wmAk4mtu9Kc3LAHnyDjr JEQtXNjOGXdAUJjq5fYXSzFEwT/5wsfmcmEhwE3nef0Wx0mTcnyK5vDzKfpfeQ9gXfYG wLyJ8TQwmd+ijgLGp3QWv2bIFGhb+i2W6S/clM4Pe6W3xM+vipeP8EZcWQn/EB5NsDpZ 3TaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MvYUbDa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu26si8794336edb.284.2020.12.07.12.51.51; Mon, 07 Dec 2020 12:52:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MvYUbDa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727669AbgLGUtD (ORCPT + 99 others); Mon, 7 Dec 2020 15:49:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727612AbgLGUtD (ORCPT ); Mon, 7 Dec 2020 15:49:03 -0500 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3493C061257 for ; Mon, 7 Dec 2020 12:48:21 -0800 (PST) Received: by mail-lj1-x243.google.com with SMTP id t22so16594906ljk.0 for ; Mon, 07 Dec 2020 12:48:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=afeBzrAkz5BwizCHeAJgvDbsOemFkWApafPEH+e5coo=; b=MvYUbDa0VUimGq7DOGdUVu7dwP7LEF2c3QsAWimh87QwX6Nv62K9zLhFFVLn9qBZac SPFcpd1egvO5SmP1TWr17dth5GA8Xk9bwLt62acxeqFQkA7Ma/6fAj+4oKYPHChpgFAc 6XXBxW93B3u11eAa8Sr/erm+EJuO63LFruir3fMCB/telhLRjG+3w+lzyEwcS0auKbme g7aVUrv10BGIV8btAjzhMMOUft24h7/jP4KOqscuqXZ6gcLw8+PftjN7G5T4aE7WfFs8 JiCkYcIWL+nY1SOW0pH1lKeUDGsURRRIWavwwOR9ZiiHw/pQiCWHXayr1KMAs61R1dDC CczQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=afeBzrAkz5BwizCHeAJgvDbsOemFkWApafPEH+e5coo=; b=GD8aJsY/cdVrkzEeum+4n3mFoKPoLBm/birDcDe4zCEQII9Olzv5KHIJAzRz2Pojyw zG4YbgNiZnIeuYyqHlB+yT6jBKJudDGtFuRbYkaAE56fNyBGCm1kP2CrPrV+p7AKOaac 3Uqes9woa47EOmDY2UlMNSlnnPFSttOorbbQq0RTrgwmVQeONy/J6/j07VGxyHHdBbj/ asd//wFss8mtiz34Wh6x9Ps6g6ESmtfWzTC1VlUCVuSRw0EFoR0fqES9cyFgtcLWzECq W5583FaAKtTk7Qjzlm9GVg19XL2bQbvwIy8SF3IQUa1OXVClKRKPI9k+Ufl/bRi2pTbW XzsQ== X-Gm-Message-State: AOAM532sFEzSrfHiq5rrijzSQPb8oelmyt6bQBPeCRlKM3UX9kAlpBdq yYMjBRBpMaKWrV7Ezb0qzJF2e8bgPL7Qhqp2Y0I= X-Received: by 2002:a2e:9747:: with SMTP id f7mr3313388ljj.262.1607374100396; Mon, 07 Dec 2020 12:48:20 -0800 (PST) MIME-Version: 1.0 References: <20201207133024.16621-1-jgross@suse.com> <20201207133024.16621-3-jgross@suse.com> In-Reply-To: <20201207133024.16621-3-jgross@suse.com> From: Jason Andryuk Date: Mon, 7 Dec 2020 15:48:09 -0500 Message-ID: Subject: Re: [PATCH 2/2] xen: don't use page->lru for ZONE_DEVICE memory To: Juergen Gross Cc: xen-devel , open list , Boris Ostrovsky , Stefano Stabellini Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 7, 2020 at 8:30 AM Juergen Gross 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 Would it make sense to add BUG_ON(is_zone_device_page(page)) and the opposite as appropriate to cache_enq? Either way: Reviewed-by: Jason Andryuk