dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
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: mst@redhat.com, jasowang@redhat.com,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org, linux-mm@kvack.org,
	song@kernel.org, dm-devel@redhat.com, ray.huang@amd.com,
	namit@vmware.com, marijn.suijten@somainline.org,
	airlied@gmail.com, agk@redhat.com, robh@kernel.org,
	senozhatsky@chromium.org, david@redhat.com, clm@fb.com,
	steven.price@arm.com, alyssa.rosenzweig@collabora.com,
	Qi Zheng <zhengqi.arch@bytedance.com>,
	josef@toxicpanda.com, linux-ext4@vger.kernel.org,
	kent.overstreet@gmail.com, xuanzhuo@linux.alibaba.com,
	linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	snitzer@kernel.org, quic_abhinavk@quicinc.com, colyli@suse.de,
	linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-bcache@vger.kernel.org, viro@zeniv.linux.org.uk,
	dsterba@suse.com, sean@poorly.run, linux-nfs@vger.kernel.org,
	tomeu.vizoso@collabora.com, kolga@netapp.com,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux-xfs@vger.kernel.org, minchan@kernel.org,
	robdclark@gmail.com, chuck.lever@oracle.com, daniel@ffwll.ch,
	jack@suse.com, dmitry.baryshkov@linaro.org,
	adilger.kernel@dilger.ca, freedreno@lists.freedesktop.org,
	christian.koenig@amd.com, linux-btrfs@vger.kernel.org
Subject: [dm-devel] [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

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  reply	other threads:[~2023-06-23  5:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22  8:24 [dm-devel] [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 ` [dm-devel] [PATCH 02/29] mm: vmscan: introduce some helpers for dynamically allocating shrinker Qi Zheng
2023-06-22  8:31 ` [dm-devel] [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 [dm-devel] " Qi Zheng
2023-06-22  8:39 ` [dm-devel] [PATCH 01/29] mm: shrinker: add shrinker::private_data field Qi Zheng
2023-06-22  8:53 [dm-devel] [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink Qi Zheng
2023-06-22  8:53 ` [dm-devel] [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=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).