Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4036636pxf; Tue, 16 Mar 2021 04:18:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz14flICXvuLM3XZZvtu0RQzJxS+otCtE5CDYgua3ZbPI++rwxO9WujQkJoIrGU+QajN48F X-Received: by 2002:a17:906:1a4b:: with SMTP id j11mr29112064ejf.55.1615893512505; Tue, 16 Mar 2021 04:18:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615893512; cv=none; d=google.com; s=arc-20160816; b=0mD7OJrpnDyK9U62pDJhJikO2nzhpEZayheEaxwjqNmBjTn659wnqaEp5255rjX9Ky LmGgebgStf5sgDNESeFSAfaFF7HoEjI9p2oy2xi0+x0Okir93nZwWgphGfQhbBhuIXT2 W4uyDOUBNkMQu/1dcjMWrQE9JbDh24jbBligEs4B014xE9RDKVlMHDgLOL4TNzYlq2Zz cd6MfhqsdkqkB7U/MZEgFagWlw3is45/6sMj+JS6x/y1KZ6rr40JS0qoerGsriGYJjfs YaaGzrAKJLfitKdwqYrMCXHhjRKCKWCY18Y9Fy8eKASkM+dq+GSo0Yu4GDxoo/5Ikaa9 IzKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=bgkWZm363DufKPL1DnAT1DpHcRzk38SuXSTT+oEW4RM=; b=kLGb1YOXTSuujQN28e+3RyTLASuHrwImWnI9B2HsAE1q3uFV6UBEvhJjIus2z0xj5s ep+O0APDD2m60ZbfxioWarLCus5ITtbrJH+21bGSOpUUTXQl68BUqknWv2yJ96W3IZGb q5ss1HsA+lPd3R11/+xRUA8rN5FmAhh00xPUvW0Tz753+VkWYEhj6R0wmukk4unxvCPC COQnz2bhtC21UOvKt+WiQKlJ6JBNWr+tpHotmRIc/mnODrpCLhnM8mnSyK/7+qivKv3S X7vwFAb7xB08s67Nclx6MZxWGKqkbLVD6dLDk6dOQIgxZvPJ/imZYw1ijcrKzP+pIS0n S7uw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zd21si13403016ejb.634.2021.03.16.04.18.10; Tue, 16 Mar 2021 04:18:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234346AbhCPCHw (ORCPT + 99 others); Mon, 15 Mar 2021 22:07:52 -0400 Received: from mga05.intel.com ([192.55.52.43]:13311 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234123AbhCPCHp (ORCPT ); Mon, 15 Mar 2021 22:07:45 -0400 IronPort-SDR: O4d0QDeO/9Mjyf8u+Vs8EUlynSGik+3/RrqEUG5dU+bvC8MnlKQd7QWXusbmoi2tE6YoseCksV QJrExgSTPYGw== X-IronPort-AV: E=McAfee;i="6000,8403,9924"; a="274227362" X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="274227362" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 19:07:45 -0700 IronPort-SDR: d2eDvlHl+dgThSXmfUvknY+TyZ1uWkRIbfoaWox9BycBJ4AK71ppXLeGh+u5OdGz3hVAMoHuJ7 IZatz0beOQ6A== X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="412045481" Received: from unknown (HELO yhuang6-desk1.ccr.corp.intel.com) ([10.239.13.1]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 19:07:40 -0700 From: "Huang, Ying" To: Rik van Riel Cc: Yu Zhao , , Alex Shi , Andrew Morton , Dave Hansen , Hillf Danton , Johannes Weiner , Joonsoo Kim , Matthew Wilcox , Mel Gorman , Michal Hocko , Roman Gushchin , Vlastimil Babka , Wei Yang , Yang Shi , , Subject: Re: [PATCH v1 09/14] mm: multigenerational lru: mm_struct list References: <20210313075747.3781593-1-yuzhao@google.com> <20210313075747.3781593-10-yuzhao@google.com> <048e5e1e977e720c3f9fc536ac54beebcc8319f5.camel@surriel.com> Date: Tue, 16 Mar 2021 10:07:36 +0800 In-Reply-To: <048e5e1e977e720c3f9fc536ac54beebcc8319f5.camel@surriel.com> (Rik van Riel's message of "Mon, 15 Mar 2021 15:40:10 -0400") Message-ID: <87pmzzsvfb.fsf@yhuang6-desk1.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rik van Riel writes: > On Sat, 2021-03-13 at 00:57 -0700, Yu Zhao wrote: > >> +/* >> + * After pages are faulted in, they become the youngest generation. >> They must >> + * go through aging process twice before they can be evicted. After >> first scan, >> + * their accessed bit set during initial faults are cleared and they >> become the >> + * second youngest generation. And second scan makes sure they >> haven't been used >> + * since the first. >> + */ > > I have to wonder if the reductions in OOM kills and > low-memory tab discards is due to this aging policy > change, rather than from the switch to virtual scanning. If my understanding were correct, the temperature of the processes is considered in addition to that of the individual pages. That is, the pages of the processes that haven't been scheduled after the previous scanning will not be scanned. I guess that this helps OOM kills? If so, how about just take advantage of that information for OOM killing and page reclaiming? For example, if a process hasn't been scheduled for long time, just reclaim its private pages. Best Regards, Huang, Ying