Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10585810rwd; Thu, 22 Jun 2023 01:52:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ64wGtJmCI5k72Tgze0rPsGXhoLBs1+XZOrO/HVFJ2HqBKug56L651yo3ZKrMjP8eSR/80D X-Received: by 2002:a92:de08:0:b0:342:299c:a2bd with SMTP id x8-20020a92de08000000b00342299ca2bdmr12616733ilm.27.1687423970900; Thu, 22 Jun 2023 01:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687423970; cv=none; d=google.com; s=arc-20160816; b=rBd9A/zWjHb8C8CUB9e6M2qcsf+Dhg48WvusYyZHL1vf0S5zhsQWMrQ5UnvHb7rvkb MwitNO2jbt4xErCGm42rpY1R1x6B/V0oVtPejMdV3MUQIJhBixaUnb+dO3q8K2ym4DgD TBtLrnjCmb06QBYTV8niW5Cb6KT5FSjWdGT7krz0yUnBLOuRkMqHBagvquFCXxbPXBpZ 5PiSz/uQeh+TBhtnd8Un4CHEDGnnsVVDbE9sDAZC1XQgjJa423uGZy383f18eU8Zr9K7 hxp00mRbnuAfVyf/zXl3tFCix7G9UK/F5BGabVlrUz/7EqTpCQJ1WxlRTy8a1vFgInSz 4hgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w53NcBmn/IPVgjrXh3hKsvtsk7tDad26SsdH585QToY=; b=WYPLY0RrqasNW4uX6nw7cNPxR5kicT9sdki+S9eGK82bdIVGV4EvK2uZbjvthNnirX JAZ+UOmcW35DAHwrtrPLfFux6zl/JDVJwss63OpF+qLNDu7mbnTXFFVka5eg494n+EZ/ jm6UI5ehfN8FKeZ9P4laK+XxF+cYWEMCztRt6LpxVwxhrERckW3v9o22dvER6N83VC/N 7jp3iT53gBCCxCMbxynQfaJQqYIf6FRiKF7/o/8mdokflXgy0OlsmhkFo2Kiy5c/mPLQ yunNI1O/KHAa628/pi41kOnNLM+9PmjSzwzh54shPUVXeWMksjPViR4Sw7aF8C7BD9ng AN5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uZy8afII; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a63db44000000b0055381e05244si2537226pgi.777.2023.06.22.01.52.39; Thu, 22 Jun 2023 01:52:50 -0700 (PDT) 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=@linux.dev header.s=key1 header.b=uZy8afII; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbjFVIkK (ORCPT + 99 others); Thu, 22 Jun 2023 04:40:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231197AbjFVIkH (ORCPT ); Thu, 22 Jun 2023 04:40:07 -0400 Received: from out-26.mta1.migadu.com (out-26.mta1.migadu.com [95.215.58.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081B71721 for ; Thu, 22 Jun 2023 01:40:06 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1687423205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w53NcBmn/IPVgjrXh3hKsvtsk7tDad26SsdH585QToY=; b=uZy8afIIaTcmGAVwL6Pco/ne9cw31HmEUrdetQu4BJTqJA7zlS9UK3eZ5SfX6giO4SjLQy PxnX2CgCeGRGVX7K17r1GkyPshe6W0lM18UnLTU7dFXZJdYjJyuXXudi6+jiw8yCyJhgh6 L8fjpIGb1fLrLDxLVbx48z8ApZZu3BE= From: Qi Zheng 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: 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 Subject: [PATCH 01/29] mm: shrinker: add shrinker::private_data field Date: Thu, 22 Jun 2023 08:39:04 +0000 Message-Id: <20230622083932.4090339-2-qi.zheng@linux.dev> In-Reply-To: <20230622083932.4090339-1-qi.zheng@linux.dev> References: <20230622083932.4090339-1-qi.zheng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 From: Qi Zheng 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 --- 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