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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03F2FC1975A for ; Thu, 12 Mar 2020 12:40:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AB840206E7 for ; Thu, 12 Mar 2020 12:40:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB840206E7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 19E226B0007; Thu, 12 Mar 2020 08:40:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 14EE76B0008; Thu, 12 Mar 2020 08:40:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03D546B000A; Thu, 12 Mar 2020 08:40:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id DDD2A6B0007 for ; Thu, 12 Mar 2020 08:40:31 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C50B6180AD822 for ; Thu, 12 Mar 2020 12:40:31 +0000 (UTC) X-FDA: 76586668662.02.home83_78f8798e19c4a X-HE-Tag: home83_78f8798e19c4a X-Filterd-Recvd-Size: 3153 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Mar 2020 12:40:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A46F4B1DE; Thu, 12 Mar 2020 12:40:28 +0000 (UTC) Subject: Re: [PATCH v7 2/7] mm: introduce external memory hinting API To: Minchan Kim Cc: Andrew Morton , LKML , linux-mm , linux-api@vger.kernel.org, oleksandr@redhat.com, Suren Baghdasaryan , Tim Murray , Daniel Colascione , Sandeep Patil , Sonny Rao , Brian Geffon , Michal Hocko , Johannes Weiner , Shakeel Butt , John Dias , Joel Fernandes , Jann Horn , alexander.h.duyck@linux.intel.com, sj38.park@gmail.com References: <20200302193630.68771-1-minchan@kernel.org> <20200302193630.68771-3-minchan@kernel.org> <20200310222008.GB72963@google.com> From: Vlastimil Babka Message-ID: <07109fb3-dcf3-0252-4515-7e476fadc259@suse.cz> Date: Thu, 12 Mar 2020 13:40:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200310222008.GB72963@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: On 3/10/20 11:20 PM, Minchan Kim wrote: > On Thu, Mar 05, 2020 at 07:15:10PM +0100, Vlastimil Babka wrote: >> On 3/2/20 8:36 PM, Minchan Kim wrote: >> > There is usecase that System Management Software(SMS) want to give >> > a memory hint like MADV_[COLD|PAGEEOUT] to other processes and >> > in the case of Android, it is the ActivityManagerService. >> > >> > It's similar in spirit to madvise(MADV_WONTNEED), but the information >> >> You mean MADV_DONTNEED? > > Mean to DONT_NEED's future version. What's that exactly? >> >> > required to make the reclaim decision is not known to the app. >> >> This seems to be mixing up the differences between MADV_DONTNEED and >> COLD/PAGEOUT and self-imposed vs external memory hints? > > Sorry, I don't understand what you want here. You say that process_madvise(MADV_[COLD|PAGEEOUT]) is similar to madvise(MADV_WONTNEED) but the difference is that the information required to make the reclaim decision is not known to the app. I see two differences. One is madvise vs process_madvise, which is explained by "reclaim decision is not known to the app." The other is MADV_WONTNEED vs MADV_[COLD|PAGEEOUT], which is... I'm not sure until you say what's "DONT_NEED's future version" :D Anyway I assume this part is from the versions where the new COLD and PAGEOUT flags were introduced together with external memory hinting API?