Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp379495pxp; Wed, 9 Mar 2022 05:02:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNg/YMHfA5IP1nenOaKbIfAa/6z3MC5FY7/56+uLCKpBP+BWx/XCXub5OuWXPffdm1HF62 X-Received: by 2002:a63:ea0e:0:b0:37d:f227:ec57 with SMTP id c14-20020a63ea0e000000b0037df227ec57mr17923400pgi.441.1646830955691; Wed, 09 Mar 2022 05:02:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646830955; cv=none; d=google.com; s=arc-20160816; b=fCA4CGzKyncB8Ki0LWCwKgHkHeaDKFEytiR6yepJ8RtIMmsz/LrPbDL02pRvrRnfZ9 hITKdcwVF2nmVOp/irsl1AtrEjgHRR97IdZzhPAUyg29jxJfQJvoj5+ZOTjm9hJ20xEJ KIxXDdqvpyJj1paqzVH6nKF+Nx409HtNx+mfpUyafOLDkiwWK0tKEFp9aHuxiM7qC3o1 ONKw/lQEsbwIYbrrDHr55vARFrNBLqvDTQlr/Bcz4QcafE0YsJlTGZMBF11LuM3tLMjX QaABBi3HO24DoHnyNPidX+W4FdZ7sgpOIoJyDjC5OTlW5IoqoRomz30nNbLZNU4v0rGY +v/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=uOUrXfglzqQFTjTgP5hFxUlYRR7320G347ZhYiZBfBM=; b=RsDtq4o83UJ7hKE/JqGHhjdoA0tTUnZtgYzMAdMIB5pigKJ8dhQbL+5h5XvTEH6Dh8 T6p7vpzxauFpUTYitz1qLw2tUZjNrXCYf6CtUrHVi4fKjkPC+Vui94CSwGM2eA3Dm7s7 578YvClLeQJIxtB99fhGJwRsnUX+AQtpth+BeGFH0X9GYfevclgqGw65JFMqQR5Nt8Bx bsZT1yTHSOSt78mO2tKfzgCzrfONVnQcCnS6w6PydvG/C+TsOyqPOD2VhPX4qaVNttni S0aF2XNyuITr/0GHo7GFK0jz19PlO3Iffk8TV9qZsvi9a4Hhz/MRRinVej0A31zcRAOR ks2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dhtEPY66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my15-20020a17090b4c8f00b001bd14e03065si5532544pjb.61.2022.03.09.05.01.59; Wed, 09 Mar 2022 05:02:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dhtEPY66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232431AbiCIL42 (ORCPT + 99 others); Wed, 9 Mar 2022 06:56:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbiCIL40 (ORCPT ); Wed, 9 Mar 2022 06:56:26 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9352760078 for ; Wed, 9 Mar 2022 03:55:27 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id 8E7501F44A74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1646826925; bh=PynJJsoLYdl1Gvc0xzkLN+51ws0jXntVzWj+p9ce160=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dhtEPY66d4f949FzrfR1Gz129VcXzngI9xCwPitlNnWdd/t1ySgyteRFbpRcI03Hr kGYqsPdcvyWV9vc8TrTHTapgcflALoPO0AP4fvXBOyQDp5PriQZqU2VuSy/sPCvFT2 3L4WmNNQsf01RrZAC/C3oafVO+EByoZMbfmY+bjxawYde9QrkHUsWiaflrxixu0EXt jz9uVUsdPTPE2WwXgn5Idz0s5x5UyeoFKZc3Z3hb4WJSs605WkaDmUKYQX7ssc9NFH 9mbbab1IPlEMnzF1mnz4z8cm4vSuH7tTnI/I0wCU5X5Z8vtx1xkpmNwxO1/A45ECij ICu6WWaVn4+Yg== Message-ID: Date: Wed, 9 Mar 2022 14:55:21 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver Content-Language: en-US To: Thomas Zimmermann , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny Cc: Tomeu Vizoso , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Gustavo Padovan , dri-devel@lists.freedesktop.org, Dmitry Osipenko References: <20220308131725.60607-1-dmitry.osipenko@collabora.com> <4ce1e172-799c-cba3-0a72-4a6fdf2c6d2f@suse.de> From: Dmitry Osipenko In-Reply-To: <4ce1e172-799c-cba3-0a72-4a6fdf2c6d2f@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 3/9/22 11:59, Thomas Zimmermann wrote: > Hi > > Am 08.03.22 um 14:17 schrieb Dmitry Osipenko: >> Hello, >> >> This patchset introduces memory shrinker for the VirtIO-GPU DRM driver. >> During OOM, the shrinker will release BOs that are marked as "not needed" >> by userspace using the new madvise IOCTL. The userspace in this case is >> the Mesa VirGL driver, it will mark the cached BOs as "not needed", >> allowing kernel driver to release memory of the cached shmem BOs on >> lowmem >> situations, preventing OOM kills. > > Virtio-gpu is build on top of GEM shmem helpers. I have a prototype > patchset that adds a shrinker to these helpers. If you want to go > further, you could implement something like that instead. Panfrost and > lima also have their own shrinker and could certainly be converted to > the gem-shmem shrinker. I had a thought that it could be possible to unify shrinkers into a common DRM framework. Could you please give me a link to yours prototype patchset?