From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] drm/msm/gem: Add modparam to disable shrinker blocking
Date: Mon, 14 Sep 2026 09:55:56 +0200 [thread overview]
Message-ID: <12b7dc43-b9c6-4cd5-bfaf-fac8bddd7352@oss.qualcomm.com> (raw)
In-Reply-To: <20260912145922.24115-2-robin.clark@oss.qualcomm.com>
On 9/12/26 4:59 PM, Rob Clark wrote:
> Normally if we are under enough memory pressure, the shrinker will
> eventually start waiting for BOs to become idle. In some very latency
> sensitive use-cases this is undesirable.
>
> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/msm_gem_shrinker.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> index 3514d5c84989..83ee032cb21d 100644
> --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
> +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> @@ -19,6 +19,10 @@ static bool enable_eviction = true;
> MODULE_PARM_DESC(enable_eviction, "Enable swappable GEM buffers");
> module_param(enable_eviction, bool, 0600);
>
> +static bool eviction_can_block = true;
> +MODULE_PARM_DESC(eviction_can_block, "Enable blocking for GEM buffer to become idle for eviction");
> +module_param(eviction_can_block, bool, 0600);
> +
> static bool can_swap(void)
> {
> return enable_eviction && get_nr_swap_pages() > 0;
> @@ -26,6 +30,8 @@ static bool can_swap(void)
>
> static bool can_block(struct shrink_control *sc)
> {
> + if (!eviction_can_block)
> + return false;
> return (sc->gfp_mask & __GFP_DIRECT_RECLAIM) ||
> (current_is_kswapd() && (sc->gfp_mask & __GFP_KSWAPD_RECLAIM));
> }
This is just a guess, but can we always keep both and jump out
of msm_gem_shrinker_scan() early if we can satistfy nr_to_scan
without locking?
Konrad
next prev parent reply other threads:[~2026-09-14 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 14:59 [PATCH v2 1/2] drm/msm: Enable THP for GEM buffers Rob Clark
2026-09-12 14:59 ` [PATCH v2 2/2] drm/msm/gem: Add modparam to disable shrinker blocking Rob Clark
2026-09-12 15:13 ` sashiko-bot
2026-09-14 7:55 ` Konrad Dybcio [this message]
2026-09-14 13:11 ` Rob Clark
2026-09-12 15:12 ` [PATCH v2 1/2] drm/msm: Enable THP for GEM buffers sashiko-bot
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=12b7dc43-b9c6-4cd5-bfaf-fac8bddd7352@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.