Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAB97C433F5 for ; Wed, 3 Nov 2021 11:25:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6950C6113B for ; Wed, 3 Nov 2021 11:25:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6950C6113B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78CB972D67; Wed, 3 Nov 2021 11:25:49 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id D020E72D67 for ; Wed, 3 Nov 2021 11:25:47 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: mwezdeck) with ESMTPSA id 384381F45615 From: Maksym Wezdecki To: David Airlie , Gerd Hoffmann Subject: [PATCH] drm/virtio: new ioctl for pinning and lazy pinning Date: Wed, 3 Nov 2021 12:25:34 +0100 Message-Id: <20211103112536.126855-1-maksym.wezdecki@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" First patch implements new ioctl. If there are no pages pinned to bo object, then pin it. Second patch implements concepts of lazy pin. Userspace must opt-in for not pinning pages. I would like to record this work here and investigate another possibility. Mainly, problem statement for this two patches is to reduce memory usage consumed by Guest. If we can avoid pinning pages for such resources like textures, then we can use staging buffer to upload texture data to host.