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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 507D3C10F25 for ; Wed, 11 Mar 2020 07:27:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F24A4208C3 for ; Wed, 11 Mar 2020 07:27:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eGAuB3hc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F24A4208C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 981076B0003; Wed, 11 Mar 2020 03:27:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9305E6B0006; Wed, 11 Mar 2020 03:27:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F7FA6B0007; Wed, 11 Mar 2020 03:27:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id 65B816B0003 for ; Wed, 11 Mar 2020 03:27:56 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EF05B5840 for ; Wed, 11 Mar 2020 07:27:55 +0000 (UTC) X-FDA: 76582252110.15.prose44_6252fdadfba61 X-HE-Tag: prose44_6252fdadfba61 X-Filterd-Recvd-Size: 5884 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Mar 2020 07:27:55 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id n5so837532qtv.7 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=tCv8oLSJ4m91N/f7EEkydnqC8l8ZDVhpoC2WRpcINzVvemB6/YgRzixRoKxsnPanYd pWuNr72o4ufGd1B5kZmafsfQl4zGd2pgOrANZhby4X6djEsm15kLfga300BKpsFtAlc0 YK6mNZsT+Mx+e8p0pu5rdcGDGfcrr9h25hUV1bymtgmjtEOj27x7vD0Egxy/tvfSVSoz aTto9NFk/sOvCWEFFWirxVwsXK0KMIIC3UAy8fBsS9nijL2OEwCTmYGhkW+0TC4GbRL5 nNrUu1+Pz2tCNYzPEXYwXeOwaf2vQdAE23hx7Jjz+xvE3RLNGgWemU1aQqrlghkW+PTS zHbg== X-Gm-Message-State: ANhLgQ0N6OIBjMYUSOWUE7GxCx9M5lE2kCrQBcC2GJ7VgXclv/H+Rpzi upslf6HkTUjuijIup8GQlemzpCdqX3lq54rCKRw= X-Google-Smtp-Source: ADFU+vsWDWVbIaf2kP232v4inTgsCNKdyKnggSQsjRlDfqtJmfCtGuo/lWsY9qjj5ub6nNwjIc6MGo5EzJIlTRCWrvo= 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 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: 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.