Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp266916ybh; Wed, 11 Mar 2020 00:28:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvtL0QV7U1eS4R0pJLUIxWJ3qZ5JHv3jSt2SOejOf5NeM48krAk7W3QkHlzCutW8RSwSf3S X-Received: by 2002:aca:aac1:: with SMTP id t184mr1038754oie.14.1583911716880; Wed, 11 Mar 2020 00:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583911716; cv=none; d=google.com; s=arc-20160816; b=s/74+nftjIvlE6I4nk9COmo+48k4RSHuBC2N1Cg3yq6hQJ4braKqFtCfJLaXs5W4QR oLNH0mtkrXGi/FWO/UprC4wizSEVBnhTsn/IO8nEtxIIy0r1k0bwnUukh7IRpZOCfF2o XIw/Vv7G7mVpMGQM4AFaQiowBnAf9XQUKR2ieuOinlEeG0okYl9/FWq3kAVF1zAhOheh qsj4vTYwbrqgQwe4DdmtvXmrNMX/b7iDeHU+t47ugYkRj0nUDGqS8HxKgbetrEDGJqyS 2jTcMIq5Xl/WMi3eRBMr+jBSuq4XR5nW9e7WRQvobA/LMGI+BDiLKf/ywHzR5MHBepxL TvNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Pc5Mex9AXuwKMivPB0YyFAGUk6142KI+to63osSlbss=; b=t+9wZR73tvuY/MF0otJxup+52pGTFBj9jOHCw9ONAUlzscnM/AsmnYn/RvJAdxyZHG RsMOM92pDlWDM5peT6TyMC/NOoyHcB6QpWLl6M6g+MaM4hX5QMlQGG4Z9V1clA1cMscm +kjUu8wbh8MKz/pvZKSYlN0nFm23dYMue7FSOJPqsh+tQ93cCXqiRrxiOEOhrCJ98LwX ioIItiAC/YlmXbtD8kcvb8D8MCfTd/37lxqOMP/ve+rb9HKIjZZUiQ9LdOKEzoNSm2VG BeM79F7Dz7+pkWZM4CzScjqJxK1ZJbjDm1OhTCIOHUGQh/RrOJ6a/aIeulJJzDvgm4ij ySUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eGAuB3hc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f18si780272oti.289.2020.03.11.00.28.24; Wed, 11 Mar 2020 00:28:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eGAuB3hc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbgCKH15 (ORCPT + 99 others); Wed, 11 Mar 2020 03:27:57 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:42005 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgCKH14 (ORCPT ); Wed, 11 Mar 2020 03:27:56 -0400 Received: by mail-qt1-f195.google.com with SMTP id g16so833908qtp.9 for ; Wed, 11 Mar 2020 00:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Pc5Mex9AXuwKMivPB0YyFAGUk6142KI+to63osSlbss=; b=eGAuB3hcNFclDpWz208wpYv2cT7ROTyL84UMBISbVQ/QAcsOFMLoNvZqI3NGZIgS+O qOrWSnIVkqKCwGUmn7XodtfoDG0lykRQQY10GHT9KHQFd6X0nWPpgOw287B2CILvlt0f KBeB2fcS7ZLy8MLvk5vWy7uCek6ROWhmZVcTApk6A72+jpqQLYLDhxlFs6YVEfSk9jEl 0++GuYV3d1Gw8WU6xhB5mHjiaWwBi2/9c8aKPBG0+jezbqINWFrVKkEa37u6C+QpuMdc PQ9BstwvcDSsD8Bb+MNYw8joMEsDPkWm1gR83hqvXO5JWp4io8eVOw4PC9BEeUr0Xh6f CbFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Pc5Mex9AXuwKMivPB0YyFAGUk6142KI+to63osSlbss=; b=OEQX0LIzIQsE9u/b547R1FkIXvs+arhckviCMCYkOvl4f4MrOZ5ozqwOKPDyw3Wun9 2RKxp6RWeFJKTdnD7qASCuNxoqkYd4DfFeJdbaYGunQEDyUX1cbtB+duIwj3Oi+oWmV4 KXYxwmvw0HU8HleZLNpT6ndXnSfD5fdyiZzTmbIBjr3eW9vFpBu77lHqL6U89I0OrMIN faVMdGRJaa5yo0ehG4G6Cut65mNIP/6uVXelRJEpcr7pQYNKugM60RkFNk+Svjo4D5FI Fn6OFWIINpn3gQcbFneEugu1knoj4m08oQbyNC8zgPryLX8d6H7eIkIijVIwZarIWoyP gV3g== X-Gm-Message-State: ANhLgQ39/bYfYfB/GUgGs8g8w00UC9cbh0nHB1qCPqlShNTjwdWJ49p0 F2t1rVxZ9KW354FghPm0/5a24JAsO3eTBT4Zj9yVhqzf7UM= X-Received: by 2002:ac8:2648:: with SMTP id v8mr1436779qtv.65.1583911675112; Wed, 11 Mar 2020 00:27:55 -0700 (PDT) MIME-Version: 1.0 References: <1582175513-22601-1-git-send-email-iamjoonsoo.kim@lge.com> <20200226193942.30049da9c090b466bdc5ec23@linux-foundation.org> <20200227134806.GC39625@cmpxchg.org> <20200227153639.951d6a42080e8d4227872e64@linux-foundation.org> In-Reply-To: From: Joonsoo Kim Date: Wed, 11 Mar 2020 16:27:44 +0900 Message-ID: Subject: Re: [PATCH v2 0/9] workingset protection/detection on the anonymous LRU list To: Andrew Morton Cc: Johannes Weiner , Linux Memory Management List , LKML , Michal Hocko , Hugh Dickins , Minchan Kim , Vlastimil Babka , Mel Gorman , kernel-team@lge.com, Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2020=EB=85=84 3=EC=9B=94 3=EC=9D=BC (=ED=99=94) =EC=98=A4=EC=A0=84 8:31, Jo= onsoo Kim =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > 2020=EB=85=84 2=EC=9B=94 28=EC=9D=BC (=EA=B8=88) =EC=98=A4=EC=A0=84 8:36,= Andrew Morton =EB=8B=98=EC=9D=B4 =EC=9E=91=EC= =84=B1: > > > > On Thu, 27 Feb 2020 08:48:06 -0500 Johannes Weiner = wrote: > > > > > > It sounds like the above simple aging changes provide most of the > > > > improvement, and that the workingset changes are less beneficial an= d a > > > > bit more risky/speculative? > > > > > > > > If so, would it be best for us to concentrate on the aging changes > > > > first, let that settle in and spread out and then turn attention to= the > > > > workingset changes? > > > > > > Those two patches work well for some workloads (like the benchmark), > > > but not for others. The full patchset makes sure both types work well= . > > > > > > Specifically, the existing aging strategy for anon assumes that most > > > anon pages allocated are hot. That's why they all start active and we > > > then do second-chance with the small inactive LRU to filter out the > > > few cold ones to swap out. This is true for many common workloads. > > > > > > The benchmark creates a larger-than-memory set of anon pages with a > > > flat access profile - to the VM a flood of one-off pages. Joonsoo's > > > first two patches allow the VM to usher those pages in and out of > > > memory very quickly, which explains the throughput boost. But it come= s > > > at the cost of reducing space available to hot anon pages, which will > > > regress others. > > > > > > Joonsoo's full patchset makes the VM support both types of workloads > > > well: by putting everything on the inactive list first, one-off pages > > > can move through the system without disturbing the hot pages. And by > > > supplementing the inactive list with non-resident information, he can > > > keep it tiny without the risk of one-off pages drowning out new hot > > > pages. He can retain today's level of active page protection and > > > detection, while allowing one-off pages to move through quickly. > > > > Helpful, thanks. > > > > At v2 with no evident review input I'd normally take a pass at this > > stage. But given all the potential benefits, perhaps I should be more > > aggressive here? > > I hope so. It would boost the review. :) Hello, Andrew. Would you like to tell me your plan about this patchset? Merging it into the next tree would accelerate the review and test. :) Thanks.