Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1216070ybl; Tue, 13 Aug 2019 09:06:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHyZMLff0cIW+/pxaPP5BDI1autG+/d39z5JL4IUcx7eT9ZwXb07bk2EjnRqlkIPKA66EB X-Received: by 2002:a62:2c93:: with SMTP id s141mr24495698pfs.114.1565712376105; Tue, 13 Aug 2019 09:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565712376; cv=none; d=google.com; s=arc-20160816; b=Hqdwp2MkkKjkHMs5kKwXTUFYRRpbtSEvwqbrX8aBTJQmwlwaR8erJRSbTfdd5T8XRD XDyCJnQ7Zp56wQGxKqViIk0ioIQ45EpWqX9yhW1i7FdWvsVQDTfZm7d5Cd+Jdewtd+NP t776S75hfkK00gnK6vKPbMLwErsznlLl2Hb9vsw535ovnUGCvymng9xlRaepKceQZSbV 9nqNBGB5cTR+NL42Tulp7QKZpg5miP7ide1dir+HrEIkC4GK70y9z7aE8rHWCUxGt4na o7xOftK14d1IZO9E+NUK9SePvp8bddk4p6OPYW00ctivrXWoMon7OtPTf4ZZj2d+0vY8 l3rA== 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:dkim-signature; bh=/DG06eqM38QIeCr7IhG3JFD4cD2ewwaHEcvvXfdRS3I=; b=M0bl6F0OBo29SreGSnkeVgMkNtfr8AOrsObJGMjntaJvHYR4ImDSsfAvt4iwKoKShh f4JW0lY0BVATqpTHt3gQ8ldLCrEELjFPtAHyWKOzkRYv3Rmg5SAHScCklaLDxn0uCRJO qwlfGb0NvfImHD9jfT1zSMLd9qdd3aoV4hGXl2ND8LYuWF5dj+w1JrvaZm/lZpIF0ncQ FdkmNQ4XSlbOG/ktjT9CXhyAIyMefL/EJSAhbv/8wV3iCRRpfSTqF7D5ltLe3eoGJb/S 7c72xqhVyCytbHssqke5ia6bmkuHmGFzSnCk4f44PxmQ7iNHHCmPE/DNGHYiJsTrS40b q3dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=ppUSosWQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f26si54168075pfk.81.2019.08.13.09.06.00; Tue, 13 Aug 2019 09:06:16 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=ppUSosWQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729724AbfHMOpU (ORCPT + 99 others); Tue, 13 Aug 2019 10:45:20 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:33493 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729712AbfHMOpU (ORCPT ); Tue, 13 Aug 2019 10:45:20 -0400 Received: by mail-pl1-f193.google.com with SMTP id c14so49282233plo.0 for ; Tue, 13 Aug 2019 07:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/DG06eqM38QIeCr7IhG3JFD4cD2ewwaHEcvvXfdRS3I=; b=ppUSosWQ6sQWFc0IxI3Nzmy6G6kGbMK13Q7JBH1pQcc9bf+4UAFK5wkEfJuEq2XyLj t9OBW+rPflJtJfIti+xJcNkoJHWUhFO5WsWzjJhB0nxVuJKsG+dJW/Jt+/IPwEjq5jsr aZ9axBTFOg1N2CPyUZAQwMx0PG5wxwoentHNI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/DG06eqM38QIeCr7IhG3JFD4cD2ewwaHEcvvXfdRS3I=; b=gkLcL6egH2EeKe6ig7lszkkv+E533jffYQOjerkg3DCOs8n4uGrMJgtQv5zxSsCPnH ZmPHaexAxF2vTZ2rHAa9qLGASMD+hJMSVCZ6bBLwv0i40F0C2zVM/OAkVgUyrnbImE97 XJ0aK+sBLvepiJ6ztf8bFjMc3vIlKOFGJMBLSVU20FGopkkbyUj/QBw0V6sPmC+c70x4 ioNZmtsyFsWGateoEb67zWAjc3WtsOlJC2oyzfbi2U3AAB9M+Vsh21WxhO6tRXWh6Wue srX78VLP3DFIQyodM7Z1z9Bv/OzaO05M0J60cn5P4FmGpKGUUxTsKGVt1i2is90Bw8N4 MDbQ== X-Gm-Message-State: APjAAAUPEIifABvZaQ6N4ljtW1mnuXbgfbRd1UHc9PirZOUuiOB8GEp8 Jrgqc4ji7rj0IZW5ulmCcR8HfQ== X-Received: by 2002:a17:902:a508:: with SMTP id s8mr14768087plq.280.1565707519367; Tue, 13 Aug 2019 07:45:19 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id k22sm117365235pfk.157.2019.08.13.07.45.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 13 Aug 2019 07:45:18 -0700 (PDT) Date: Tue, 13 Aug 2019 10:45:17 -0400 From: Joel Fernandes To: Michal Hocko Cc: Andrew Morton , linux-kernel@vger.kernel.org, Alexey Dobriyan , 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, Robin Murphy , Roman Gushchin , Stephen Rothwell , surenb@google.com, Thomas Gleixner , tkjos@google.com, Vladimir Davydov , Vlastimil Babka , Will Deacon Subject: Re: [PATCH v5 1/6] mm/page_idle: Add per-pid idle page tracking using virtual index Message-ID: <20190813144517.GE258732@google.com> References: <20190807171559.182301-1-joel@joelfernandes.org> <20190807130402.49c9ea8bf144d2f83bfeb353@linux-foundation.org> <20190807204530.GB90900@google.com> <20190807135840.92b852e980a9593fe91fbf59@linux-foundation.org> <20190807213105.GA14622@google.com> <20190808080044.GA18351@dhcp22.suse.cz> <20190812145620.GB224541@google.com> <20190813091430.GE17933@dhcp22.suse.cz> <20190813135152.GC258732@google.com> <20190813141432.GL17933@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190813141432.GL17933@dhcp22.suse.cz> 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, Aug 13, 2019 at 04:14:32PM +0200, Michal Hocko wrote: [snip] > > > If the API is flawed then this is likely going > > > to kick us later and will be hard to fix. I am still not convinced about > > > the swap part of the thing TBH. > > > > Ok, then let us discuss it. As I mentioned before, without this we lose the > > access information due to MADVISE or swapping. Minchan and Konstantin both > > suggested it that's why I also added it (other than me also realizing that it > > is neeed). > > I have described my concerns about the general idle bit behavior after > unmapping pointing to discrepancy with !anon pages. And I believe those > haven't been addressed yet. You are referring to this post right? https://lkml.org/lkml/2019/8/6/637 Specifically your question was: How are you going to handle situation when the page is unmapped and refaulted again (e.g. a normal reclaim of a pagecache)? Currently I don't know how to implement that. Would it work if I stored the page-idle bit information in the pte of the file page (after the page is unmapped by reclaim?). Also, this could be a future extension - the Android heap profiler does not need it right now. I know that's not a good argument but it is useful to say that it doesn't affect a real world usecase.. the swap issue on the other hand, is a real usecase. Since the profiler should not get affected by swapping or MADVISE_COLD hints. > Besides that I am still not seeing any > description of the usecase that would suffer from the lack of the > functionality in changelogs. You are talking about the swap usecase? The usecase is well layed out in v5 2/6. Did you see it? https://lore.kernel.org/patchwork/patch/1112283/ thanks, - Joel