lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <382d50a2-8e47-5e0f-726b-f077be5b8bc6@collabora.com>
Date:   Tue, 7 Jun 2022 18:33:55 +0300
From:   Dmitry Osipenko <dmitry.osipenko@...labora.com>
To:     Christian König <ckoenig.leichtzumerken@...il.com>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     David Airlie <airlied@...ux.ie>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        dri-devel@...ts.freedesktop.org,
        Gurchetan Singh <gurchetansingh@...omium.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Gerd Hoffmann <kraxel@...hat.com>,
        Dmitry Osipenko <digetx@...il.com>, kernel@...labora.com,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Rob Herring <robh@...nel.org>,
        Daniel Stone <daniel@...ishbar.org>,
        Steven Price <steven.price@....com>,
        Gustavo Padovan <gustavo.padovan@...labora.com>,
        Alyssa Rosenzweig <alyssa.rosenzweig@...labora.com>,
        virtualization@...ts.linux-foundation.org,
        Chia-I Wu <olvaffe@...il.com>, linux-media@...r.kernel.org,
        intel-gfx@...ts.freedesktop.org,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        linaro-mm-sig@...ts.linaro.org,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        linux-tegra@...r.kernel.org,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        Daniel Almeida <daniel.almeida@...labora.com>,
        amd-gfx@...ts.freedesktop.org,
        Tomeu Vizoso <tomeu.vizoso@...labora.com>,
        Gert Wollny <gert.wollny@...labora.com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        Emil Velikov <emil.l.velikov@...il.com>,
        linux-kernel@...r.kernel.org, Tomasz Figa <tfiga@...omium.org>,
        Rob Clark <robdclark@...il.com>, Qiang Yu <yuq825@...il.com>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Alex Deucher <alexander.deucher@....com>,
        Robin Murphy <robin.murphy@....com>,
        Christian König <christian.koenig@....com>
Subject: Re: [PATCH v6 17/22] drm/shmem-helper: Add generic memory shrinker

On 6/6/22 13:57, Christian König wrote:
> Am 05.06.22 um 18:47 schrieb Daniel Vetter:
>> On Fri, 27 May 2022 at 01:55, Dmitry Osipenko
>> <dmitry.osipenko@...labora.com> wrote:
>>> Introduce a common DRM SHMEM shrinker framework that allows to reduce
>>> code duplication among DRM drivers by replacing theirs custom shrinker
>>> implementations with the generic shrinker.
>>>
>>> In order to start using DRM SHMEM shrinker drivers should:
>>>
>>> 1. Implement new evict() shmem object callback.
>>> 2. Register shrinker using drm_gem_shmem_shrinker_register(drm_device).
>>> 3. Use drm_gem_shmem_set_purgeable(shmem) and alike API functions to
>>>     activate shrinking of shmem GEMs.
>>>
>>> This patch is based on a ideas borrowed from Rob's Clark MSM shrinker,
>>> Thomas' Zimmermann variant of SHMEM shrinker and Intel's i915 shrinker.
>>>
>>> Signed-off-by: Daniel Almeida <daniel.almeida@...labora.com>
>>> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@...labora.com>
>> So I guess I get a price for being blind since forever, because this
>> thing existed since at least 2013. I just stumbled over
>> llist_lru.[hc], a purpose built list helper for shrinkers. I think we
>> should try to adopt that so that our gpu shrinkers look more like
>> shrinkers for everything else.
> 
> What the heck are you talking about?
> 
> I can't find any llist_lru.[hc] in the linux kernel sources.

I think Daniel meant this:

https://elixir.bootlin.com/linux/v5.19-rc1/source/include/linux/list_lru.h

https://elixir.bootlin.com/linux/v5.19-rc1/source/mm/list_lru.c


-- 
Best regards,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ