Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10589056rwd; Thu, 22 Jun 2023 01:56:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4OPRlsExmOH9y4K/0u/Q8cVUjWr2KoWLzMGtJIKbRA4UhRk5lfi+8y0i6+rG2ix/eTiFsi X-Received: by 2002:a17:90b:3a8a:b0:256:5efe:8880 with SMTP id om10-20020a17090b3a8a00b002565efe8880mr17303506pjb.11.1687424182633; Thu, 22 Jun 2023 01:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687424182; cv=none; d=google.com; s=arc-20160816; b=xPBHk87PTt07JW9pVn65QGn5edgPYdwt1dqkTv/kydeZKdFSHukCXuf1I2C5dFQ/mH 5uGITVk7rr/g79d8p6AyQyNlElis3WQTMRU7RdXfFaSEwIUNaNEBZ3B6Q6C/Fyk7rEbX W0gGJHLyD03DNpYl7ktAVvL4kIXgP5JZKbQmra8iiC9Q2r8R/ioA81oE1tyKzzXfd3UA zk59pzRa0gwjM9izLKMasSSwO/qzGVx5yIlp+GT0SvSoBcKV/SjEtCeai8iZ1JgOXkS6 QSrkbINsfoXZCsa2yZdOPbLBvl4jjPYkvTK9QgkaI4kmjQKdjT4ZTzUTqETKW3KIFqcm zp8w== 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=DFMKKDRv9BEw0wZ8UUzCf9pHUtxe8HkFUWg9bN69VRM=; b=FCIWBzLv/unddsNPDrHH3shw1588LLOqUg2cJa9kPVDO/Htkp3KeitsP1/Dh/KExln 8rVY/pJ/ZlvzZT3zLc8renvDOKGymsQScmo2nMCmK/Ch6OqFa/4rWKloIXThaxH8w9HU Oew8e7DQktMf3l2OcZnDk9GvDNynYxUEid852k0SMApoLBWWaXJiOoj5gjH6cDDw/jRN 68Sr9skz+YCkZiXt8I02kAL067jD0jd3m2q5E0VdaMnLgI6nYoakgvb6vTeE1eq37BZj si0K7PWV/FVedaaJuYX2Bu33gQe9SKvnFpN8KV3jDrOEIw9Eat2LfeLTVpQB0vw7oO1X QfHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=AuFJ2ff7; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fv4-20020a17090b0e8400b0025be132d177si13661990pjb.60.2023.06.22.01.56.06; Thu, 22 Jun 2023 01:56:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@bytedance.com header.s=google header.b=AuFJ2ff7; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbjFVIzC (ORCPT + 99 others); Thu, 22 Jun 2023 04:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231405AbjFVIyW (ORCPT ); Thu, 22 Jun 2023 04:54:22 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7BCA213D for ; Thu, 22 Jun 2023 01:54:11 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b5466bc5f8so9651695ad.1 for ; Thu, 22 Jun 2023 01:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1687424051; x=1690016051; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DFMKKDRv9BEw0wZ8UUzCf9pHUtxe8HkFUWg9bN69VRM=; b=AuFJ2ff77l/LXEOtYzZWEupZaAfbwt3boPeShk25fcGMwTsb6VlfqfAhMOVgIPnKgi eqcOSF5WVHBBVioigqwmY9UAoTi5JEhiUSGdMReu4dDGNOFEVgxVIc2OKO3nltUsVDLn bIiXH0DnqlXam4z90R2tFa6XgNVpJSLaIq6Gbf9RXLnB8BOaf0v/n1c1hG3kRZPk0MVc mjQpq7kQFhiCgtBijMi8fR+x4TAH8zuouOKbSAqWM+GHeJnchPRb4XIBJxswbiSbm3XO sXBcqfmZ/ARe540iNA/E7F7ZKvP/VvSbnbTILDPrN3l0DanjIGoHjsT1U12ioP3F05dG yTtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687424051; x=1690016051; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DFMKKDRv9BEw0wZ8UUzCf9pHUtxe8HkFUWg9bN69VRM=; b=Iqg/lpzd7OVVy2bjzYyis5ZtZotEripsGEQKPDfk6gUOLzlCYj4A1sBiHgZqFB2n5a AJZ/HyhwOkdoId9pb1WU/Kgwzql4EcRI5ot+UQW1y+gWXXAKbGENBuk3fw7hkZduFelv /a7TGeTATLDIdqIet/bm98hTfJh9gT2wMF2WEd19qhMoZdk9aew6yI5mTYkdcpVPSmJr wsPZH5nQOYaL0n9rTeW/sgg9uuB1hSlipFLaQyLSbiH1GTbyS+gypoI23ulpG5gzcb3M WkM/6H0euabTFSMS8rlj+qinh70eela4gQdIRo2K/oM1tIyUCJiY1uHOO6/evOeKLM1/ udAw== X-Gm-Message-State: AC+VfDwrZiq1DIZ86heLFqgZS5LduKvQ8+JfNVB0EMw+VZy6p5GfBItm PRobcSG/kvymV3Ga8NWmmUQnYQ== X-Received: by 2002:a17:902:f691:b0:1b3:d4bb:3515 with SMTP id l17-20020a170902f69100b001b3d4bb3515mr21827814plg.0.1687424051106; Thu, 22 Jun 2023 01:54:11 -0700 (PDT) Received: from C02DW0BEMD6R.bytedance.net ([139.177.225.254]) by smtp.gmail.com with ESMTPSA id h2-20020a170902f7c200b001b549fce345sm4806971plw.230.2023.06.22.01.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 01:54:10 -0700 (PDT) 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, 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 16:53:07 +0800 Message-Id: <20230622085335.77010-2-zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20230622085335.77010-1-zhengqi.arch@bytedance.com> References: <20230622085335.77010-1-zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-ext4@vger.kernel.org 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