Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp851307ybt; Wed, 24 Jun 2020 12:51:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7M481SnPS9g3GGGP6bwHh7vC5+5yRLkQRHx0PouNyOXblw6zcfqtJByzfKjxR536IrYSx X-Received: by 2002:a17:906:7e04:: with SMTP id e4mr17987650ejr.502.1593028296345; Wed, 24 Jun 2020 12:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593028296; cv=none; d=google.com; s=arc-20160816; b=TZTHUlDAE6ZQdN/M9WpnctOLn5neee0AgSk7XlNkzAlzbEQVPGvtB0M1aqWpYVBDip vRjJOFglFXTfMVXA3ykOb8VYpE5WT0ZkFf3RyCoMm/uO/djAVUMMRWAu3ujp3R7OKqZU 0nU4S8CFQsWWRc8TrFvWp6gRvlD/zWuXDeO/t71dezx4iR2bM6Emn0nyQ/ruxTeQp7TT w3+0A95EyJdhhMkZRiQnGnLHMSRagJ3DxHaF5Ob76TmABTLhaz24nqdbYJe4oRtJiWaU LqwULNzXcVLkAAEQEXw/V4rjzS+29nBsOUwxBC3e+PJSpodbtEcuP7QLANZ3sdNsexKm Dcgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3Mj/yGW8ONhMxbR5CzLVYmCwJL3rVsa9cPjWbMT8ulQ=; b=Hebv8/R3pFLpQHiTl46v2ZuWjj9mDsiPNYMdL4P/6uxdCNq5Y0PjQvENOwswt3eiYg PqkChj8XPKdlZ86K5r60TyQZy1WQos4XnTE05WMMXFhEr/zt7U3Tl24Gq7cj+FomuKGG 9Usl7CeEmNONAbLBQkRSN5Qm6S6rTQ8lrHEamM7tHUkDDkLUMUH3HbZ0u8aaAlYWYHfw cEonCtgmLjfaNYAVBeB9gQ2lUu4H+7JE2jzhlK5gWKGjJM5lKySafTapOFgGvE0ibhuH pFfBR42Yay+bS0Y5YzsFOtsBzfeJ4sw/ePtrzlMerWfej8uFEcHJ0//anKvRHWLE3hwS 0KaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vseo1ugw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr21si19738942ejc.489.2020.06.24.12.51.13; Wed, 24 Jun 2020 12:51:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vseo1ugw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406218AbgFXTuH (ORCPT + 99 others); Wed, 24 Jun 2020 15:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406135AbgFXTuH (ORCPT ); Wed, 24 Jun 2020 15:50:07 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16CCC061573 for ; Wed, 24 Jun 2020 12:50:05 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id e4so3939304ljn.4 for ; Wed, 24 Jun 2020 12:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3Mj/yGW8ONhMxbR5CzLVYmCwJL3rVsa9cPjWbMT8ulQ=; b=vseo1ugwSe07vU6fNV+JbKP9by/udSjVA5IT0zkPX7pFiMBPaFBYaWQ8WB848kLusW zTm3R7GgTQVkhLJx+TNR9JZ+kngWxts6hqUjaVpjlO4Yo9fe1euCzE8EuytjCFAAwJzD dGnsX68/9ZmKzLcOYeXJZ/uS85JEbAC4q8tz7CSz5vR9BNnr6e/Wn1o+1h+BgMi+kY9H KyyMManllNA83kr1JJ16gZZQWrtDF7rCl+zxeDbbj7ebibXRwJIIkF8Pe6rsAlxg8Ews ovfSU643OKssf1/3HwOFOT7Mc+kiN4g/r99hjZi9uHAEQiW4kFEgX9pWmcJ6APA+zE9H 1XWQ== 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; bh=3Mj/yGW8ONhMxbR5CzLVYmCwJL3rVsa9cPjWbMT8ulQ=; b=Cs4EdghFPVWB5LjEZkVTCxKSMa9kLayoN1zoMJd1RZNFc49FLOTjDWcm1XKMPyKaEP MFhzkpuAxs+nnMc4USk5uc4ueYa/tu6EYFomwFLEXlUIILyeYlu6Yq3K8Kidqz+8xoX/ 0hJW33Elm0XZgNHOpciHP6DMk6e37zVBt4xtojzdnMiB3WH464Xlo569XjCqu5TI5R4O xa+Guajhqq0EqxzyCX31kiVPrjG8VeY187ktvFdnmxY30at8Z/LfhBTnTxasoO9251Zk TUkFYahnat6k8f3kqRtoowP1BvePLrYFqPBqAXSwlwCNF9w2B2fVhoq7j5ML/R3yFX6Q AASQ== X-Gm-Message-State: AOAM531yrTmpv0z+ewvg1SHbSIx74BV11QEuZXecZtNX76GC6y5HDl71 J/JE9ZLiy+hUVynHA8Awa0x+Wu1itfGZf8vhYnHU1aeg X-Received: by 2002:a2e:9ac4:: with SMTP id p4mr16110312ljj.446.1593028203877; Wed, 24 Jun 2020 12:50:03 -0700 (PDT) MIME-Version: 1.0 References: <1593020612-13051-1-git-send-email-yang.shi@linux.alibaba.com> In-Reply-To: <1593020612-13051-1-git-send-email-yang.shi@linux.alibaba.com> From: Shakeel Butt Date: Wed, 24 Jun 2020 12:49:52 -0700 Message-ID: Subject: Re: [PATCH] mm: filemap: clear idle flag for writes To: Yang Shi Cc: Johannes Weiner , Rik van Riel , gavin.dg@linux.alibaba.com, Andrew Morton , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 10:43 AM Yang Shi wrote: > > Since commit bbddabe2e436aa7869b3ac5248df5c14ddde0cbf ("mm: filemap: > only do access activations on reads"), mark_page_accessed() is called > for reads only. But the idle flag is cleared by mark_page_accessed() so > the idle flag won't get cleared if the page is write accessed only. > > Basically idle page tracking is used to estimate workingset size of > workload, noticeable size of workingset might be missed if the idle flag > is not maintained correctly. > > It seems good enough to just clear idle flag for write operations. > > Fixes: bbddabe2e436 ("mm: filemap: only do access activations on reads") > Cc: Johannes Weiner > Cc: Rik van Riel > Cc: Shakeel Butt > Reported-by: Gang Deng > Signed-off-by: Yang Shi Reviewed-by: Shakeel Butt