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 878C0C6FA82 for ; Wed, 14 Sep 2022 14:37:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0CB3A8D0003; Wed, 14 Sep 2022 10:37:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 07B608D0001; Wed, 14 Sep 2022 10:37:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E86188D0003; Wed, 14 Sep 2022 10:37:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D24268D0001 for ; Wed, 14 Sep 2022 10:37:15 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id AA259160938 for ; Wed, 14 Sep 2022 14:37:15 +0000 (UTC) X-FDA: 79910943630.04.49825A6 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) by imf03.hostedemail.com (Postfix) with ESMTP id F317120098 for ; Wed, 14 Sep 2022 14:37:14 +0000 (UTC) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-1280590722dso41551832fac.1 for ; Wed, 14 Sep 2022 07:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=LVKzlmP/G0PqWNO0u32O0oQ6Jt6/5xnFA05eO88+5ww=; b=IODi9yixigDEJYjVdRQovl05Uf/txqrG+I5FQgUJ3TaOT++NZ4GbWlT4wjArCK9osI 2pyS+C11gnYhftlFitPtmpj3iUQsQbVakh1J7hcmq4ccEAuju/D5oj7nEfWzW/4QZAET 3AqjyUGIsy7hMSbfc5eR7uh2BNFaqHRZxulDAzql9PnQtv++8dkp8uvfOefbzxP9N7az jnYH26AAsstkI5I0UvfQvOveNmgV7tribbLqeeVI56wSnasZ1wvUs0TXkPo3l+ajTXLm 9oc/abf8MVdiU9w/uw/F1ONAq7uZYBfxdEVSZ4V3BBELBZhVDOm6oWIL9q2M5Pr0Y/Ua 2EHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=LVKzlmP/G0PqWNO0u32O0oQ6Jt6/5xnFA05eO88+5ww=; b=1M3oSlqZaDDvlfbkKol2tAJL+E24kDNfwOVFyvncWdsnfeCpQccrQAIWybOPiY8Qgp PhWmKc1yh6WHffyHDj7dKRM9Jub3uWqBBiIW28yjFYo1JIKPZaAiw3zH/hQeQAz//vbi JH6OLfYecOF0u/WlVYwl4L53JvaGk0Yhh+BXat0hZbnZURoz118Kvr/ziPfU8MBi5PTS R97I9OZN1fm8nc20U7SVoVvD3hgLjNvJzFf4raDtY/VRVeDV5ui7PoHNpxnJIUmoaTln KOZocMwuXmx5e8dzVEDk/CkUAC/rEQ8EFWpzVBYiH1XVnPS9SkdB9cw9o0KiCfS4ID1a zqKQ== X-Gm-Message-State: ACgBeo0r9ouZGRw/ue/RrPM3VB57fcN+S48oOY2fdAvDHDci5TRcoFNV J9q5CmETtxE8R6Zbcw9/SvxR9T2edYIT9ArAZtA= X-Google-Smtp-Source: AA6agR7l6g2d3kTOdIT2TZkfgBpJLU1P6Cx6S5aS+ouejkp31RIFhj0iLLOVZQcoklzYf9Q1cHhKq/E5/ax901LN2s8= X-Received: by 2002:a05:6870:d1c5:b0:127:4089:929d with SMTP id b5-20020a056870d1c500b001274089929dmr2551809oac.203.1663166234235; Wed, 14 Sep 2022 07:37:14 -0700 (PDT) MIME-Version: 1.0 References: <20220815071134.74551-1-yang.yang29@zte.com.cn> In-Reply-To: <20220815071134.74551-1-yang.yang29@zte.com.cn> From: Joonsoo Kim Date: Wed, 14 Sep 2022 23:37:02 +0900 Message-ID: Subject: Re: [PATCH v2 1/2] delayacct: support re-entrance detection of thrashing accounting To: cgel.zte@gmail.com Cc: bsingharora@gmail.com, akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, mingo@redhat.com, bristot@redhat.com, vschneid@redhat.com, willy@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Yang Yang , Ran Xiaokai , wangyong Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663166235; a=rsa-sha256; cv=none; b=RYaUXTY+4CdEZmKb/5v6Bs5LkyyTT1qQAW+0ZxbpPzC7ml/c3HsXYg2eDFicZpIpa2lMUd OuIpb08oeZnWd4hksOqJ72ic8xsfXzR14vD5Q4u5xdpbJZYdX6Yx/wxzOigzjuafZX6d06 AejBGmy8ht5U8KXWeDgtEy5f4O/Z6H4= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=IODi9yix; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of js1304@gmail.com designates 209.85.160.47 as permitted sender) smtp.mailfrom=js1304@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663166235; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LVKzlmP/G0PqWNO0u32O0oQ6Jt6/5xnFA05eO88+5ww=; b=0dVqdf3gAA4jDwgm/xiuBIwBejkMEsVyLn9wzJvIWc84IM7lgFNCYRSGCXUYsDkH3zoYU7 N76rni1IadMaVfcri8IzVtDHgc99QWUvkkHNKLWivVfAJkofkMlv+TkR8BULTtEnE3y3L9 UkHC3aGvk82fnHxueL81SGaiTM8Bt9Q= X-Stat-Signature: dxpajek6cteyna1kknbpchkifa5w61b5 X-Rspamd-Queue-Id: F317120098 X-Rspamd-Server: rspam03 X-Rspam-User: Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=IODi9yix; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of js1304@gmail.com designates 209.85.160.47 as permitted sender) smtp.mailfrom=js1304@gmail.com X-HE-Tag: 1663166234-680364 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: 2022=EB=85=84 8=EC=9B=94 15=EC=9D=BC (=EC=9B=94) =EC=98=A4=ED=9B=84 4:14, <= cgel.zte@gmail.com>=EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > From: Yang Yang > > Once upon a time, we only support accounting thrashing of page cache. > Then Joonsoo introduced workingset detection for anonymous pages and > we gained the ability to account thrashing of them[1]. > > For page cache thrashing accounting, there is no suitable place to do > it in fs level likes swap_readpage(). So we have to do it in > folio_wait_bit_common(). > > Then for anonymous pages thrashing accounting, we have to do it in > both swap_readpage() and folio_wait_bit_common(). This likes PSI, > so we should let thrashing accounting supports re-entrance detection. > > This patch is to prepare complete thrashing accounting, and is based > on patch "filemap: make the accounting of thrashing more consistent". > > [1] commit aae466b0052e ("mm/swap: implement workingset detection for ano= nymous LRU") > > Signed-off-by: Yang Yang > Signed-off-by: CGEL ZTE > Reviewed-by: Andrew Morton > Reviewed-by: Ran Xiaokai > Reviewed-by: wangyong > Cc: Joonsoo Kim Acked-by: Joonsoo Kim