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 84485C3F2D1 for ; Mon, 2 Mar 2020 23:31:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2288024677 for ; Mon, 2 Mar 2020 23:31:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ghUc23XK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2288024677 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 7E1446B0005; Mon, 2 Mar 2020 18:31:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 792766B0006; Mon, 2 Mar 2020 18:31:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A68B6B0007; Mon, 2 Mar 2020 18:31:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id 4F57F6B0005 for ; Mon, 2 Mar 2020 18:31:38 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2A4D38248068 for ; Mon, 2 Mar 2020 23:31:38 +0000 (UTC) X-FDA: 76552021476.16.crack03_82a524b848b4c X-HE-Tag: crack03_82a524b848b4c X-Filterd-Recvd-Size: 5422 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Mon, 2 Mar 2020 23:31:37 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id h22so1628938qke.5 for ; Mon, 02 Mar 2020 15:31:37 -0800 (PST) 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=LfEjI0hAoE9B82/6Z0q5Bb5fihjTPDQQQvYu1xjHN2c=; b=ghUc23XKmujuq8C48Jy+mQxsTdVzke3AlaPts945PKwU9Xf5sR/OrN/cEg1QWIcbmH W/zNMBCVkqpSVXx8w5LNG/JObdnKDRu+k/qywKyrpzJhWCIjcG1ISNYRhC4rzhdrvYEk zp4pXSniwCBO+7zaMpjNUM570397o7P9sKuskpt7qNg32Ap7/D6jMXGqaVQg401PyoAX gcLx6Q20Y9B+d0bRmD6UhlhggGbtWZkPjYd+xMNCe85hPUmiWgyQ01I6sFxoTc/+RaBQ 1NOwdu5z5VSrpJLJTIsPxpSapMqFARCRoW0PrrMcm7bEQwwgbjEoS3sGapjtsBamHGIJ Z0yQ== 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=LfEjI0hAoE9B82/6Z0q5Bb5fihjTPDQQQvYu1xjHN2c=; b=rl3MXexjAfNEHzqrN+Zd3GDG2fxN5LOEtzOE2eE+YpOoDnFXWeZzGhdocodwyfjCL4 MmhGh37fF/5dllUpjrPdTN+HQ3j0C4r6FPlD9K7gjNTuPl2be+u6W8eB2IsazVnCc+H1 N8XrQsfDcmZzMksnU4k74SXmObrE+afFeygWiY7GcLsnEwCXpUtQfZ5m8HGBq563y9So mM3KzwTBxLK8BoKmSNJvnh0VtnuyzYAFEsgcPJXsl4W3vxvbgVmPtCvFBZePOikU15Mc MBtXdyimZfYUo+LTxbzLl6+hqeHjWIj/xtrUvSTE4k1461LLpyLxY5zkmjONHiPpS8Bc C0jA== X-Gm-Message-State: ANhLgQ30vdZ/NFVNJdJYXw3GKCS7y6gKaDjypKCvtqAt/j8j1kl+tej2 /NuO9/z6Gkmewi2YdogkynGWCgwhgZJvnPe+fSo= X-Google-Smtp-Source: ADFU+vugI1LhoilnSjySYvq7x6RcSLviSCgVaTa0JbdIchRxtWljlKbE9obvNPBVrrkDQmIUsm99VDq8FO5tg4icRj4= X-Received: by 2002:a37:aa88:: with SMTP id t130mr1660455qke.452.1583191896818; Mon, 02 Mar 2020 15:31:36 -0800 (PST) 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: <20200227153639.951d6a42080e8d4227872e64@linux-foundation.org> From: Joonsoo Kim Date: Tue, 3 Mar 2020 08:31:25 +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.000006, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 2020=EB=85=84 2=EC=9B=94 28=EC=9D=BC (=EA=B8=88) =EC=98=A4=EC=A0=84 8:36, A= ndrew Morton =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84= =B1: > > On Thu, 27 Feb 2020 08:48:06 -0500 Johannes Weiner w= rote: > > > > It sounds like the above simple aging changes provide most of the > > > improvement, and that the workingset changes are less beneficial and = 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 t= he > > > 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 comes > > 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. :) Thanks.