Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3934042ybh; Tue, 6 Aug 2019 03:48:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrs+eEc/lt+akGhNzMjkvFCGYM89quOgdO1QZlgvNCn/JTw9ccCLrvGqdCIuGBF+f/5QfL X-Received: by 2002:a62:b411:: with SMTP id h17mr2876980pfn.99.1565088530230; Tue, 06 Aug 2019 03:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565088530; cv=none; d=google.com; s=arc-20160816; b=xz/sWTzsZ082Yts5t7wiGzJgXpwqgxPnW88kRvVudHOX2Kw9IW04vFPrJpm6gb5GsT sERxcSfH9gBO/Gj/PFsfn31YrPDB0Qw4PWhJNZZDsI1G1cvhMAmsKAshmmLWovVqRey+ TU26jcsmmkejzCUS5eyGWeU2HWcr+JEYN35909OAOdj4k517eQ45BmvzUbqjegje52dP vYTjy+IMM+qe5HLLSAGmmUG8SYIztkcaI9luvyW4+lA7koU0rOsChA0UQNQPBQuo4uOO bp6QBkpvNHVniTLsfldKVqLSJZIclNKwrZneDt1Z1fqPM49cEpTnSAa/pUjvPeXcucdn xzVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9l07xguLsmumbO3r6+6QNpZxDkbKD+pBUTJaKO0rO1c=; b=Nydi/SFawE5/ujBJWE6oFLbtIBftMcgko2/vpj4dDS6A9qB/13KE23DQi6jqkhQ4J7 NwqwgCdSOC1mUDEvEYp9/p863bWy+YU0tfZh+cTZbAfeiqqH/jzRvrjtCPI/1mXp8xa9 pkFxtgKMScyr5Pv2HoDlq8yqeyG8ChmUZoIWmr/bM0hDbxH/B75TF/OXwzh49UuKWoSy L7rb6wkqUHBQVEv/JtFEQC+RJwSX1xxwaKD286KQJnt0/wQZINRi9S/PZPP7NrCdmICi UTqlBPRujciAoYtRInymF8MPTKL8EIrCo1EWzuXxKoR/xLEgn5JG8VJKnNKUkwpvxJ4j /wLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i19si48090211pfa.232.2019.08.06.03.48.35; Tue, 06 Aug 2019 03:48:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732711AbfHFKr7 (ORCPT + 99 others); Tue, 6 Aug 2019 06:47:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:42398 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728845AbfHFKr7 (ORCPT ); Tue, 6 Aug 2019 06:47:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 73D9CAFCC; Tue, 6 Aug 2019 10:47:57 +0000 (UTC) Date: Tue, 6 Aug 2019 12:47:55 +0200 From: Michal Hocko To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, Robin Murphy , Alexey Dobriyan , Andrew Morton , Borislav Petkov , Brendan Gregg , Catalin Marinas , Christian Hansen , dancol@google.com, fmayer@google.com, "H. Peter Anvin" , Ingo Molnar , Jonathan Corbet , Kees Cook , kernel-team@android.com, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Mike Rapoport , minchan@kernel.org, namhyung@google.com, paulmck@linux.ibm.com, Roman Gushchin , Stephen Rothwell , surenb@google.com, Thomas Gleixner , tkjos@google.com, Vladimir Davydov , Vlastimil Babka , Will Deacon Subject: Re: [PATCH v4 3/5] [RFC] arm64: Add support for idle bit in swap PTE Message-ID: <20190806104755.GR11812@dhcp22.suse.cz> References: <20190805170451.26009-1-joel@joelfernandes.org> <20190805170451.26009-3-joel@joelfernandes.org> <20190806084203.GJ11812@dhcp22.suse.cz> <20190806103627.GA218260@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190806103627.GA218260@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 06-08-19 06:36:27, Joel Fernandes wrote: > On Tue, Aug 06, 2019 at 10:42:03AM +0200, Michal Hocko wrote: > > On Mon 05-08-19 13:04:49, Joel Fernandes (Google) wrote: > > > This bit will be used by idle page tracking code to correctly identify > > > if a page that was swapped out was idle before it got swapped out. > > > Without this PTE bit, we lose information about if a page is idle or not > > > since the page frame gets unmapped. > > > > And why do we need that? Why cannot we simply assume all swapped out > > pages to be idle? They were certainly idle enough to be reclaimed, > > right? Or what does idle actualy mean here? > > Yes, but other than swapping, in Android a page can be forced to be swapped > out as well using the new hints that Minchan is adding? Yes and that is effectivelly making them idle, no? > Also, even if they were idle enough to be swapped, there is a chance that they > were marked as idle and *accessed* before the swapping. Due to swapping, the > "page was accessed since we last marked it as idle" information is lost. I am > able to verify this. > > Idle in this context means the same thing as in page idle tracking terms, the > page was not accessed by userspace since we last marked it as idle (using > /proc//page_idle). Please describe a usecase and why that information might be useful. -- Michal Hocko SUSE Labs