From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78FFEECAAD5 for ; Tue, 6 Sep 2022 11:40:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0ADD80279; Tue, 6 Sep 2022 07:40:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBA2B80224; Tue, 6 Sep 2022 07:40:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A825A80279; Tue, 6 Sep 2022 07:40:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 94D2080224 for ; Tue, 6 Sep 2022 07:40:56 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 63FF88022D for ; Tue, 6 Sep 2022 11:40:56 +0000 (UTC) X-FDA: 79881468912.21.3353291 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by imf18.hostedemail.com (Postfix) with ESMTP id 1C0CF1C006D for ; Tue, 6 Sep 2022 11:40:55 +0000 (UTC) Received: by mail-pg1-f174.google.com with SMTP id t70so4568264pgc.5 for ; Tue, 06 Sep 2022 04:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date; bh=zLIlU5WRN/qpc/luGxAkx8MLhJShGTdf13t85Wt12A0=; b=efebxuxDyVJ+HBbIqVJTWYN02z371rCOW39ThMtiUrXxkRMJo5y/R4IW1BYsezfxSS dbLo3aDSWkZ3buIgH+W3V5FWYp2pLQrP84A9O/3bqK0cBaJgprHqFt4M9rSCiuYnc8y3 HV4TEsnNjdQfhpOS5WDRHL8LjiNUJ+fb35F1iaP7DKi0iFru3xhCW1MrbGap/jeziMOC Q27Zn4X0fkLEZZcDsKhGzrPqWiGm83H1t04PrrvGeXZi+sHtRhUPR/RCFyCav6oPRloM +NWdQcmIzaUzI+ZuE7qcgXc6Pb6rS5Q8luniNlANvY84IC0P3XQjO7WTnqLBUdyUtIlJ VUMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date; bh=zLIlU5WRN/qpc/luGxAkx8MLhJShGTdf13t85Wt12A0=; b=IykQNPUsw9z6cCbT7+nPfg8S7JWVzf2DA4TI+EEGgkvxgpoGKCgFl+GkzQcBRfoyt7 CVPE0DhDi0TWzzx1e9C64vE17vnbgiTcLX0iPntYq1qlQvfR98tQ7qROaSfccy8z4fEJ xXidZvVI2DnDv7odQYnWfpqPOAWIRSsSlFeE55qdnoQRvpsyqgeamS5GJKZpx1Oglpob 9NHltclHtp4kdMbk4e+1/DLwMD4WQXUN+rOLpYSP/qPkB6VU8Mg0GMnXJf8BKezulYXF sqdPTTruQE3B4GHbRDoQM+wbsPJjZuMLbQ7vZJZmuvngBZ7GQKcRj2SAfn2sUGNqfhrN IKzw== X-Gm-Message-State: ACgBeo2lxe6+iEZjBKtDKrglR19sZcNMT0qWAa4Pn1OzRIIeuiFBT2FQ nI+tJK6WLmV6tnrbPZwDEC8= X-Google-Smtp-Source: AA6agR7+UBOMZ/AkV+sOu5uGrhLmnFa2ga5eqFjqkr6N/KL6vXSIVV7mrEpM7cGsezMaGjvvdFNcCQ== X-Received: by 2002:a63:1624:0:b0:430:c45:eb7d with SMTP id w36-20020a631624000000b004300c45eb7dmr27857067pgl.42.1662464454999; Tue, 06 Sep 2022 04:40:54 -0700 (PDT) Received: from localhost ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id 6-20020a620606000000b0053e3a6f7da4sm1197954pfg.12.2022.09.06.04.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 04:40:53 -0700 (PDT) Message-ID: <631731c5.620a0220.8387b.1974@mx.google.com> X-Google-Original-Message-ID: <20220906114051.GA337755@cgel.zte@gmail.com> Date: Tue, 6 Sep 2022 11:40:51 +0000 From: CGEL To: Johannes Weiner Cc: akpm@linux-foundation.org, tj@kernel.org, axboe@kernel.dk, vdavydov.dev@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgel Subject: Re: [RFC PATCH 1/2] psi: introduce memory.pressure.stat References: <20220801004205.1593100-1-ran.xiaokai@zte.com.cn> <20220817025945.GA84631@cgel.zte@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220817025945.GA84631@cgel.zte@gmail.com> ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=efebxuxD; spf=pass (imf18.hostedemail.com: domain of cgel.zte@gmail.com designates 209.85.215.174 as permitted sender) smtp.mailfrom=cgel.zte@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662464456; a=rsa-sha256; cv=none; b=nLnXWQ1fChUIybOaQ/3BL5luDLInUM4vntOiOh/JYlSUKF3VJsDcmoxgOhH4ULQuQV7fcQ 5+fMTNoEHapuXja4lrG/0p0yBqCFBtEBJYGtbauuE8Y5l6AtVfOjv8fFHn/JtU0IthVOos eCbnKnu1C6U2Tq9JXVMJcgeHiOota0E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662464456; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zLIlU5WRN/qpc/luGxAkx8MLhJShGTdf13t85Wt12A0=; b=DkZ7MpaShWMlCCW93d5XPop7NHJOYnaREh4+XwEb56PksfizFTMNcpRONBsLZdYyZuxJsL c/7TuFpfJBsG3LU5PJU5EZY1wVqR+GjDtnPymhmQPYOlfhQ1Bp0RTjXkILsCMjHqIgnwQL 9xA/paHJHnEEILSHH1DXlV04WFKdCvM= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 1C0CF1C006D X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=efebxuxD; spf=pass (imf18.hostedemail.com: domain of cgel.zte@gmail.com designates 209.85.215.174 as permitted sender) smtp.mailfrom=cgel.zte@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: dmxi5yzk34p3auutw3b8kok7o7sxkxm3 X-HE-Tag: 1662464455-744552 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Aug 17, 2022 at 02:59:48AM +0000, CGEL wrote: > On Wed, Aug 03, 2022 at 09:55:39AM -0400, Johannes Weiner wrote: > > On Mon, Aug 01, 2022 at 12:42:04AM +0000, cgel.zte@gmail.com wrote: > > > > This doubles the psi cache footprint on every context switch, wakeup, > > sleep, etc. in the scheduler. You're also adding more branches to > > those same paths. It'll measurably affect everybody who is using psi. > > > > Yet, in the years of using psi in production myself, I've never felt > > the need for what this patch provides. There are event counters for > > everything that contributes to pressure, and it's never been hard to > > rootcause spikes. There are also things like bpftrace that let you > > identify who is stalling for how long in order to do one-off tuning > > and systems introspection. > > > We think this patch is not for rootcause spikes, it's for automatic optimize > memory besides oomd, especially for sysctl adjustment. For example if we see > much pressure of direct reclaim the automatic optimize program might turn up > watermark_scale_factor. > The base idea is that this patch gives user a brief UI to know what kind of > memory pressure the system is suffering, and to optimize the system in a fine > grain. It could provide data for user to adjust watermark_boost_factor, > extfrag_threshold, compaction_proactiveness,transparent_hugepage/defrag, > swappiness, vfs_cache_pressure, madvise(), which may not easy for to do > before. > > It's not easy for automatic optimize program to use tools likes bpftrace or > ftrace to do this. > > While we may use CONFIG_PSI_XX or bootparam to turn on/off this patch to avoid > additional footprint for user who not need this. Hi Do you think this is praciseable?