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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95ADBC433C1 for ; Mon, 22 Mar 2021 06:10:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 150E46191F for ; Mon, 22 Mar 2021 06:10:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 150E46191F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DED078D0002; Mon, 22 Mar 2021 01:51:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D74928D0001; Mon, 22 Mar 2021 01:51:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7A128D0002; Mon, 22 Mar 2021 01:51:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 966B28D0001 for ; Mon, 22 Mar 2021 01:51:12 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F33566C37 for ; Mon, 22 Mar 2021 06:10:02 +0000 (UTC) X-FDA: 77946484644.17.92EB1CE Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by imf30.hostedemail.com (Postfix) with ESMTP id 76AD8E0011DD for ; Mon, 22 Mar 2021 06:10:02 +0000 (UTC) Received: by mail-il1-f174.google.com with SMTP id y17so2137908ila.6 for ; Sun, 21 Mar 2021 23:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Q+s1MiLMwx0bam3J6ExtRojLRZ6PSv31/x1AmahgfS8=; b=ISXPF8Sg8ajKIlAgfB6lB6CjajMUZdeB5dj5uFXcuUGHsznyrC3Ygf42nAnrgIqjzY 6L/1vtu5i2BouZWc233qsj9xKmETcXm8mC7KP3vSDO0sN/ZVB5Us+Loow6qpSguCf0Ll PV6KNnoTryuLt3AeSGQy2X7BrMlSghE+vfYoxbZbelplZuyLh/CKlnxEWTITXRg1VivL J5rgmMEJXOtiKFyekXHh5NHIsuRxEAxgvfKFwCFoauJc6lvBd8m/clIl+BWcGoQox5du 93gFZCm+lMRRhFPaynDcAcTZ+xX2JG9hun0+3MwDVeN2uOja5OAFrfwL3EFEk/2eWX+7 XZWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Q+s1MiLMwx0bam3J6ExtRojLRZ6PSv31/x1AmahgfS8=; b=F7DMSoyeTRa3dX37Iu4lEgJ+n1sJnVQxJJ2T7j8I/1gA2QZudDhElPhXleS31z01/G KGTgDZp4wFm8YjudDT29gsK+lbm4Ly/5zZKudqEPrdgOf+A4a3bxwqeiWTYZHNn5Cicg sWEfMuuv+GrlKKu2mZEIEombEXnl8oFwT0f4M3MVWBE+U5z0wgA5dl1wwxPlmUSHZWKg wEj/ljgJ/JsOzvalM06p6ErO6yZUo15Z3ELgzlgHVYujZEPTamAgQLUZjbd58teT60MK IPjbJmxj3AtrCn8bJJjglvpYRysBdx1Kdi5EobUhwZS4jQ9CqdYrr1tGcSbqKvMvmh/7 Sp6g== X-Gm-Message-State: AOAM530wPVeK9WYCAxEhqjcdV79CH//6xGRTFIEseEqGmw1s3Uux9pzv XxDWPRnqtBB2So9G0ls83xj8SQ== X-Google-Smtp-Source: ABdhPJzDexgLwHM4O3mCR+nFOjO61au1zX2EwG3zFu94761WO2LWa+vfsdNeyZz0QzQuKC+KG/T4Fg== X-Received: by 2002:a05:6e02:188f:: with SMTP id o15mr3466697ilu.178.1616393401589; Sun, 21 Mar 2021 23:10:01 -0700 (PDT) Received: from google.com ([2620:15c:183:200:44ef:831f:a5ff:abb6]) by smtp.gmail.com with ESMTPSA id e6sm6912822ioq.13.2021.03.21.23.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Mar 2021 23:10:00 -0700 (PDT) Date: Mon, 22 Mar 2021 00:09:56 -0600 From: Yu Zhao To: Alex Shi Cc: linux-mm@kvack.org, Andrew Morton , Dave Hansen , Hillf Danton , Johannes Weiner , Joonsoo Kim , Matthew Wilcox , Mel Gorman , Michal Hocko , Roman Gushchin , Vlastimil Babka , Wei Yang , Yang Shi , Ying Huang , linux-kernel@vger.kernel.org, page-reclaim@google.com Subject: Re: [PATCH v1 14/14] mm: multigenerational lru: documentation Message-ID: References: <20210313075747.3781593-1-yuzhao@google.com> <20210313075747.3781593-15-yuzhao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 76AD8E0011DD X-Stat-Signature: unb6gowa1sa7zexufupsxqr67srx9arf Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=mail-il1-f174.google.com; client-ip=209.85.166.174 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616393402-15563 Content-Transfer-Encoding: quoted-printable 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 Fri, Mar 19, 2021 at 05:31:20PM +0800, Alex Shi wrote: >=20 >=20 > =E5=9C=A8 2021/3/13 =E4=B8=8B=E5=8D=883:57, Yu Zhao =E5=86=99=E9=81=93: > > +Recipes > > +------- > > +:Android on ARMv8.1+: ``X=3D4``, ``N=3D0`` > > + > > +:Android on pre-ARMv8.1 CPUs: Not recommended due to the lack of > > + ``ARM64_HW_AFDBM`` > > + > > +:Laptops running Chrome on x86_64: ``X=3D7``, ``N=3D2`` > > + > > +:Working set estimation: Write ``+ memcg_id node_id gen [swappiness]= `` > > + to ``/sys/kernel/debug/lru_gen`` to account referenced pages to > > + generation ``max_gen`` and create the next generation ``max_gen+1``= . > > + ``gen`` must be equal to ``max_gen`` in order to avoid races. A swa= p > > + file and a non-zero swappiness value are required to scan anon page= s. > > + If swapping is not desired, set ``vm.swappiness`` to ``0`` and > > + overwrite it with a non-zero ``swappiness``. > > + > > +:Proactive reclaim: Write ``- memcg_id node_id gen [swappiness] > > + [nr_to_reclaim]`` to ``/sys/kernel/debug/lru_gen`` to evict > > + generations less than or equal to ``gen``. ``gen`` must be less tha= n > > + ``max_gen-1`` as ``max_gen`` and ``max_gen-1`` are active generatio= ns > > + and therefore protected from the eviction. ``nr_to_reclaim`` can be > > + used to limit the number of pages to be evicted. Multiple command > > + lines are supported, so does concatenation with delimiters ``,`` an= d > > + ``;``. > > + >=20 > These are difficult options for users, especially for 'races' involving= . > Is it possible to simplify them for end users? They look simple for a few lruvecs, but do become human-unfriendly on servers that have thousands of lruvecs. It's certainly possible simplify them, but we'd have to sacrifice some flexibility. Any particular idea in mind?