Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4417580ioa; Wed, 27 Apr 2022 03:30:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf8yzTfqxiGM9kCiTiDEi/RUurCVGUeGKfrRJ/t886MkgPrxfIxQTHJb5MBBO7fje2wwEU X-Received: by 2002:a63:4a02:0:b0:39d:b8ac:59a4 with SMTP id x2-20020a634a02000000b0039db8ac59a4mr23516517pga.464.1651055402588; Wed, 27 Apr 2022 03:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055402; cv=none; d=google.com; s=arc-20160816; b=tZvpMBYEaixmaZGmKF2UmGirP8kMwmyACujJr6osEKmOU/0D16dnexVDcWIDCKno7a PqqddKK29o3ka3v9KqNdC0BbbzOLhZ7FJ2I+EF8c5tEeJzkyqy+DLkAitwT4PlDsOBZm PVKs2Ht+KT9u2k/nX5aw7QTZ/jIbgRtv1bK2yqRHVZOrcVWc9DZ0KOcPkhUGd9EK4oSq 3jDUEtW8vW+w6HMzKtl5V6d7IrxTO/KQBmsmHqDO+eEEho80FwukKPcbKjFD36As5xHn RvcmKoKlNPc0mgX/x4grWkN6+19soimehsrutbl2q4tBc5BypSpWFF7rAZWMD+B9a2J8 C2Rw== 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:date:dkim-signature; bh=vCAdqtcSv+Uuvkd1gfYn6mJK/62p5uI0bhh5S33HH+o=; b=u87QAB7b96KBaRMasPDVFSi7LH1O9DTsa0xARbfkx+pahg2B5Z7ZIxXbr2FgWNdm0v QCQmvuMzRk68iIwX3jfxoqS3w/QLCPd8J8ElxdqEl8bX6CaSbs7fQ7xcbnmIs+I5v1rw GVn88vZHUbyciAvq1fGqj7PSUpQQTUrSqfroxYTqxatEUA8oSFRKpzGAIH874LtNRLiH ZyoeV1yW8XKtD4LGPQzCjn8x12ecCyrjbet6DWUv7KgIFKuV0/QSiLakP9t9rilHD3nx s187g11rwK0w9YiqTD7KMBzFMRlW0m6F9FV21DVf7YuitYItOcC9uXYTs2+7NSSIMkPW PgOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hKQNNTwM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d20-20020a170902729400b001587eff7923si1100388pll.612.2022.04.27.03.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:30:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hKQNNTwM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D42D53A5BFE; Wed, 27 Apr 2022 02:45:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352174AbiDZSlG (ORCPT + 99 others); Tue, 26 Apr 2022 14:41:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343969AbiDZSlB (ORCPT ); Tue, 26 Apr 2022 14:41:01 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4677F6A001 for ; Tue, 26 Apr 2022 11:37:52 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id kd11so5017560qvb.2 for ; Tue, 26 Apr 2022 11:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vCAdqtcSv+Uuvkd1gfYn6mJK/62p5uI0bhh5S33HH+o=; b=hKQNNTwMC0Pg+p4P7tiCPZm0cj9miN42hel47mSzB3H5BqCOYQKy7Zgic6zuztiAgp vHNLCSMVT1/3s+QBInq9vSSbcKTFlfOHgP508j701VpKAAWJgcj10GaL/8p4VPFl4tDm QwLt+xl51ubmMorzTvwDBSmQvMDAgJfDSrfg1XHY34ECBP4qmpYBZPKRrN8q4na8RHt1 UyScxb9ei5p4apSOlkbOpxhfSiehS+0Ke9bl9BrT6yKoml5Nl0Oj70D/X/ay8in9Wv/z mBdvrmnuSPeFggrdGJ5yQTR269+20YgTk/0BqFZfoLCwJTnSsHlEyTXjCRNOBzjBGkF4 kPCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vCAdqtcSv+Uuvkd1gfYn6mJK/62p5uI0bhh5S33HH+o=; b=tTbWvVzTUfz2q3i++F1dYrhnmu6O4HvhaaQXOLspn8kxFBXTG8rFdLQFUiVHAqeT1J 0T6yvnplSbozigefUgZ7l0CL7UNT249/T7N/1OXrAHpHHzlttihRszhKCDnpYeWMUc1S pZxizZOUBWMEHSAPVG6UYGegSK8EX4TcDWemIPGqBecl/CCOnhIkTj2uC/T4DDJ2cljY 5SY3sWwBngh/mAZkRRHrcYVKXOa0+gayUFEgy2XtYe9zxWePJqfuVzHoxw2vUWRMHGS6 +pApV1WY+g/Nx1aHTk4oBPFcuVxJsZvCxBaLccU+GBvEHkGmvigfWzcwiLKNRgE7/qgP qcLQ== X-Gm-Message-State: AOAM530oj21i3gd/5lDOOnTkguKOIt7wK1cpNjb581ihrAxwxF+UdnkU KW0huShtn2iFjyWvzvpk9Q== X-Received: by 2002:ad4:576f:0:b0:451:b403:2c3e with SMTP id r15-20020ad4576f000000b00451b4032c3emr16176767qvx.83.1650998272081; Tue, 26 Apr 2022 11:37:52 -0700 (PDT) Received: from moria.home.lan (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id x2-20020a379502000000b0069d14dabad6sm6851134qkd.79.2022.04.26.11.37.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 11:37:51 -0700 (PDT) Date: Tue, 26 Apr 2022 14:37:49 -0400 From: Kent Overstreet To: Roman Gushchin Cc: Dave Chinner , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Shi , Hillf Danton Subject: Re: [PATCH v2 0/7] mm: introduce shrinker debugfs interface Message-ID: <20220426183749.iumpdardzltpf23y@moria.home.lan> References: <20220422202644.799732-1-roman.gushchin@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 On Tue, Apr 26, 2022 at 09:41:34AM -0700, Roman Gushchin wrote: > My plan is to work on convert shrinkers API to bytes and experiment > with different LRU implementations. I find an ability to easily export > statistics and other data (which doesn't exist now) via debugfs useful > (and way more convenient than changing existing tracepoints), as well as > an ability to trigger scanning of individual shrinkers. If nobody else > seeing any value here, I'm fine to keep these patches private, no reason > to argue about the output format then. I don't think converting the shrinker API to bytes instead of object counts is such a great idea - that's going to introducing new rounding errors and new corner cases when we can't free the exact # of bytes requested. I was thinking along the lines of adding reporting for memory usage in bytes as either an additional thing the .count_objects reports, or a new callback.