Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp688146rdb; Thu, 30 Nov 2023 16:01:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9RDQloM71NVp2lIlcQj34iWhn5xzP7BkM/dZRXoQQ03EFPSfKIqftkXh6YcvCVQ89XTQZ X-Received: by 2002:a05:6870:9f0a:b0:1fa:1db1:4293 with SMTP id xl10-20020a0568709f0a00b001fa1db14293mr25637073oab.32.1701388897686; Thu, 30 Nov 2023 16:01:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701388897; cv=none; d=google.com; s=arc-20160816; b=qVz9/acpuy5G7leVvrGRMm9t1ljCGjsoJPOCtiJPhPMKMwXRbJRpPFFDctevwe0dkt jvvbuU37sEiDIFaZQFTHr/Nk5VHGkxcMP0oeKBmdrfkoAGgzH6f5FN2uhdh3P30javLd LEnnmLm6rbeJfIsYSVAYJ/08EWCm8v9FTnNVEHZ4+rZD/Zg7bRK7xFx6Wj5sUg1b7DN3 CxIn9AqZgFHndtXybq/Wz57pC1XLMWEtZDsM0saYW9dpS4/HZNs0aDNzJe6IQP/V1qrT 5p9oy9l/jJIo1Mo557ViI6tE1o8673arJblk0qUmbUz6KORNKMHpHmXWuT9OQqBjfjIa TW2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=1Ly5aykKHFfeWxXNnEM/rLM4wsOswGs38cnjAVJoN6U=; fh=N7Xw0Aj9gADxzKrliPPijP2tznBnhpdKgR28pNUz97w=; b=CqaRQNdJcc4zrefswVvu1RThr52Z98fvhFt+7vv7MSV5Px3z0+kwVpPYuFgr1MoWGC RPWKC72A8D1uWPQQmZ8mCs2i4ocXznhGVE+eppuaDUOgCU7s6u8gKq3csh72cil82Taj dbJN9GsZ1LfezQm0Va/hS6LZAA/QjBZvvoQkRT6DpeyFIP6Gc3IyL8CqDtHwxtkvygpl 4Z32UAaWW6MhudroFr87u1VQxJUBz3ZfxYfjfK2zUA/VJRcTZ6XDqa6yp1dYI6LJ2Wuf 26u4aLmBhAri2vsdEgzN2b7kc9yvLUYHSND7A8MkWcDy3zEAabDswB7XmlYF3Hk27Co9 6/Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=oy2SsPwA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j1-20020a056830270100b006ce14f20705si907093otu.64.2023.11.30.16.01.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 16:01:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=oy2SsPwA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 860748073864; Thu, 30 Nov 2023 16:00:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377335AbjLAAAV (ORCPT + 99 others); Thu, 30 Nov 2023 19:00:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377294AbjLAAAU (ORCPT ); Thu, 30 Nov 2023 19:00:20 -0500 Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8FD910E2 for ; Thu, 30 Nov 2023 16:00:26 -0800 (PST) Date: Thu, 30 Nov 2023 19:00:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1701388824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1Ly5aykKHFfeWxXNnEM/rLM4wsOswGs38cnjAVJoN6U=; b=oy2SsPwAS+wnMk6eQgAOX2ZsDsMdkgzCngfRilNcFjWaSrqowK94gyQKQqWyUZE1X1JCZ3 P6WoZubAsbHlA3q/LRExV9TuL97AC6IRoFydHo+bw3LND2ZBKUzh5qV1lLj0Bx7cPvPtPZ VfYRwDlDiPOLDQvDEutKQ+ONsaeJW3g= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Roman Gushchin Cc: Qi Zheng , Michal Hocko , Muchun Song , Linux-MM , linux-kernel@vger.kernel.org, Andrew Morton , Dave Chinner Subject: Re: [PATCH 2/7] mm: shrinker: Add a .to_text() method for shrinkers Message-ID: <20231201000020.2jwcdup7pklqoudf@moria.home.lan> References: <20231125003009.tbaxuquny43uwei3@moria.home.lan> <76A1EE85-B62C-49B3-889C-80F9A2A88040@linux.dev> <20231128035345.5c7yc7jnautjpfoc@moria.home.lan> <20231129231147.7msiocerq7phxnyu@moria.home.lan> <04f63966-af72-43ef-a65c-ff927064a3e4@bytedance.com> <20231130032149.ynap4ai47dj62fy3@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 30 Nov 2023 16:00:35 -0800 (PST) On Thu, Nov 30, 2023 at 11:01:23AM -0800, Roman Gushchin wrote: > Ok, a simple question then: > why can't you dump /proc/slabinfo after the OOM? > > Unlike anon memory, slab memory (fs caches in particular) should not be heavily > affected by killing some userspace task. Well, currently the show_mem report dumps slab info if unreclaimable slab usage is over some threshold (50%?). So it already does what you describe - sometimes. One of the patches in this series trims that down to make it more useful; reporting on only the top 10 slabs, by mmeory usage, in sorted order and with human readable units.