From: Qi Zheng <qi.zheng@linux.dev>
To: akpm@linux-foundation.org, david@fromorbit.com, tkhai@ya.ru,
vbabka@suse.cz, roman.gushchin@linux.dev, djwong@kernel.org,
brauner@kernel.org, paulmck@kernel.org, tytso@mit.edu
Cc: airlied@gmail.com, daniel@ffwll.ch, robdclark@gmail.com,
quic_abhinavk@quicinc.com, dmitry.baryshkov@linaro.org,
sean@poorly.run, marijn.suijten@somainline.org, robh@kernel.org,
tomeu.vizoso@collabora.com, steven.price@arm.com,
alyssa.rosenzweig@collabora.com, agk@redhat.com,
snitzer@kernel.org, song@kernel.org, colyli@suse.de,
kent.overstreet@gmail.com, namit@vmware.com,
gregkh@linuxfoundation.org, mst@redhat.com, david@redhat.com,
jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
viro@zeniv.linux.org.uk, adilger.kernel@dilger.ca, jack@suse.com,
chuck.lever@oracle.com, neilb@suse.de, kolga@netapp.com,
minchan@kernel.org, senozhatsky@chromium.org, clm@fb.com,
josef@toxicpanda.com, dsterba@suse.com, christian.koenig@amd.com,
ray.huang@amd.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, dm-devel@redhat.com,
linux-raid@vger.kernel.org, linux-bcache@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-nfs@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-btrfs@vger.kernel.org,
Qi Zheng <zhengqi.arch@bytedance.com>
Subject: [PATCH 01/29] mm: shrinker: add shrinker::private_data field
Date: Thu, 22 Jun 2023 08:24:26 +0000 [thread overview]
Message-ID: <20230622082454.4090236-2-qi.zheng@linux.dev> (raw)
In-Reply-To: <20230622082454.4090236-1-qi.zheng@linux.dev>
From: Qi Zheng <zhengqi.arch@bytedance.com>
To prepare for the dynamic allocation of shrinker instances
embedded in other structures, add a private_data field to
struct shrinker, so that we can use shrinker::private_data
to record and get the original embedded structure.
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
---
include/linux/shrinker.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index 224293b2dd06..43e6fcabbf51 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -70,6 +70,8 @@ struct shrinker {
int seeks; /* seeks to recreate an obj */
unsigned flags;
+ void *private_data;
+
/* These are for internal use */
struct list_head list;
#ifdef CONFIG_MEMCG
--
2.30.2
next prev parent reply other threads:[~2023-06-22 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 8:24 [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink Qi Zheng
2023-06-22 8:24 ` Qi Zheng [this message]
2023-06-22 8:24 ` [PATCH 02/29] mm: vmscan: introduce some helpers for dynamically allocating shrinker Qi Zheng
2023-06-22 8:31 ` [External] [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink Qi Zheng
-- strict thread matches above, loose matches on Subject: below --
2023-06-22 8:39 Qi Zheng
2023-06-22 8:39 ` [PATCH 01/29] mm: shrinker: add shrinker::private_data field Qi Zheng
2023-06-22 8:53 [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink Qi Zheng
2023-06-22 8:53 ` [PATCH 01/29] mm: shrinker: add shrinker::private_data field Qi Zheng
2023-06-22 14:47 ` Vlastimil Babka
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=20230622082454.4090236-2-qi.zheng@linux.dev \
--to=qi.zheng@linux.dev \
--cc=adilger.kernel@dilger.ca \
--cc=agk@redhat.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alyssa.rosenzweig@collabora.com \
--cc=brauner@kernel.org \
--cc=christian.koenig@amd.com \
--cc=chuck.lever@oracle.com \
--cc=clm@fb.com \
--cc=colyli@suse.de \
--cc=daniel@ffwll.ch \
--cc=david@fromorbit.com \
--cc=david@redhat.com \
--cc=djwong@kernel.org \
--cc=dm-devel@redhat.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=dsterba@suse.com \
--cc=freedreno@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jack@suse.com \
--cc=jasowang@redhat.com \
--cc=josef@toxicpanda.com \
--cc=kent.overstreet@gmail.com \
--cc=kolga@netapp.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=minchan@kernel.org \
--cc=mst@redhat.com \
--cc=namit@vmware.com \
--cc=neilb@suse.de \
--cc=paulmck@kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=ray.huang@amd.com \
--cc=robdclark@gmail.com \
--cc=robh@kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=sean@poorly.run \
--cc=senozhatsky@chromium.org \
--cc=snitzer@kernel.org \
--cc=song@kernel.org \
--cc=steven.price@arm.com \
--cc=tkhai@ya.ru \
--cc=tomeu.vizoso@collabora.com \
--cc=tytso@mit.edu \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuanzhuo@linux.alibaba.com \
--cc=zhengqi.arch@bytedance.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).