Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp971948ybv; Wed, 19 Feb 2020 13:07:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzzJmIVRHvpXnbpICHfC3ZDpw3a1RFEagoK6VC59zf47Q+9hRXRhhGMpRmzOA/GhAXmfh1B X-Received: by 2002:a9d:63d6:: with SMTP id e22mr21392208otl.185.1582146422257; Wed, 19 Feb 2020 13:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582146422; cv=none; d=google.com; s=arc-20160816; b=td05RPYmW4aLV4k0btMZmP9z/9Z8ifQuGzFwpgx3VpowFJ7ujFbAIQaEU2f2ypEJ7H l5fW804AhaL1oSFVClyT4bQ3OjQroez+Q+A/0U26G4Dt7/SnhuGzEi0dRHc6SJVwiogT 8wwbU/3DlAmcBj6aBxfFuG+9Lf/4YjQf3TpB8M/Ee+UX04bKcOcAiEaAgp4L7szA5KGG V4p/jKW4oQBWDf04Oil8FdKMFeq8AKEvDlBmfQrQ/mIScd0oZeTBLHoWXRNTiyvBVhn/ 11oqHZ/jTWVRmxtye4rk7FUSlHBeDtQLK24pT8OSx0ZiX7OWCVXplnZ6Ppzt4qad225+ NoSg== 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=rt+9TBr746y3EZMJw1I5B3EZu8arYEFN5BR+od/TLHk=; b=u5LWdM4skrf7nqr/UHCSTrvqsGs8O8/F5VwVomcwIz12upAPUuiermD57mekx6ZvCl WlRmrvkjvHZzBoVph7Ni4iahgguPfNWhDo+YwZKgqo1KFbk2rWhbQv2pkbTFapM4PxG/ GfDNqdfJutdiLQxVRQ9k297gWkp/XoDGxdyNOKWIAgrMECoZfReP82GWj9OX9X0JWpV8 b7y4pIVYzLpoXWh2/m0D0JW+klt4BAueYljzaKs8Qsox6gmnxtv7YqDjx/ZYBAa0O1vY lKzVzJmx05ooBSybHiRq9nAW4FoX4zB6IMl/faKC0tP9MJPE2SFcII+BQMGYSyVypOU9 Shkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M2AFVg5v; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22si474154otq.132.2020.02.19.13.06.50; Wed, 19 Feb 2020 13:07:02 -0800 (PST) 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=@google.com header.s=20161025 header.b=M2AFVg5v; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727677AbgBSVFl (ORCPT + 99 others); Wed, 19 Feb 2020 16:05:41 -0500 Received: from mail-ua1-f66.google.com ([209.85.222.66]:34227 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726875AbgBSVFl (ORCPT ); Wed, 19 Feb 2020 16:05:41 -0500 Received: by mail-ua1-f66.google.com with SMTP id 1so770414uao.1 for ; Wed, 19 Feb 2020 13:05:39 -0800 (PST) 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=rt+9TBr746y3EZMJw1I5B3EZu8arYEFN5BR+od/TLHk=; b=M2AFVg5vlnRB3u0UzpK+hLhHk2mzBcRqt/6FJ1ZyF5r+AaBEx1gUxnRQSBOb0rzsyC OssyBFfAp6/IEb4RBw90uXsOGquHbiFdA522MeNyJB2f0frsziq3ldDADScxoHLDOIwK V6W4VIH3P43aqTC6dt4/ggCcYIxhLquDhGx5xo1MqBsqpvRW/rhYSUp3QnE1p/lrXuCX b5nzo1aS57ZMpuIbqh9o7gzTrOVuJzKHSZ4CHNyd/sCj/RRJlLgIqp2U4gPtkxn7CE2H Tk4t2hC5GVNf6S+sByLpwSYMsqe98h4r5qbRn0K4c6HsXz/6EDPWGEeKleNSQu5oF+vG qiCA== 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=rt+9TBr746y3EZMJw1I5B3EZu8arYEFN5BR+od/TLHk=; b=iwC2Hke/376Egt+tKUkcMXtj7SYraoW6HeYaaLP9N9Kr9uo96RkMOXe9mHe8PPYe9g 1cIU/yZkSeCBW4bylnK060IaWg+/wT+v9R30Kq+zO99Z15mjzICPatYLvqqVDPBgO5ze PXVg2fWi+aCByQSmHev1K3ecNwCGdIgZJzHAYLie3o6ixI0nqplb4LHpMiaIzlINntQD OtNfFGB9fJvvneARO2qAK6xpWDtZBwhCeBHGZCwtrGo3lBDdIYXQ/MAhauJmTYUOItoo ROMvnPdQu2q0iQ5FuwC7yLxig/+ZWyKZvdVRZUCw0FSY3lBxdtvVfkV1xYMHsJ3F3+EG xtiw== X-Gm-Message-State: APjAAAXC/pyaSg+L0+vYrAZrk6caKJxTr/P6fwc6fRdUcJAK6eWgsXSf QyccYtVuRgbYeZDaYJbVVGhmmxghn7m4tgiagJkYZQ== X-Received: by 2002:ab0:32cf:: with SMTP id f15mr14592717uao.42.1582146338347; Wed, 19 Feb 2020 13:05:38 -0800 (PST) MIME-Version: 1.0 References: <20200219014433.88424-1-minchan@kernel.org> <20200219120123.07dda51c29006a892059ccde@linux-foundation.org> In-Reply-To: <20200219120123.07dda51c29006a892059ccde@linux-foundation.org> From: Suren Baghdasaryan Date: Wed, 19 Feb 2020 13:05:27 -0800 Message-ID: Subject: Re: [PATCH v6 0/7] introduce memory hinting API for external process To: Andrew Morton Cc: Minchan Kim , LKML , linux-mm , linux-api@vger.kernel.org, oleksandr@redhat.com, Tim Murray , Daniel Colascione , Sandeep Patil , Sonny Rao , Brian Geffon , Michal Hocko , Johannes Weiner , Shakeel Butt , John Dias , Joel Fernandes , sj38.park@gmail.com, alexander.h.duyck@linux.intel.com, Jann Horn 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, Feb 19, 2020 at 12:01 PM Andrew Morton wrote: > > On Tue, 18 Feb 2020 17:44:26 -0800 Minchan Kim wrote: > > > Now, we have MADV_PAGEOUT and MADV_COLD as madvise hinting API. With that, > > application could give hints to kernel what memory range are preferred to be > > reclaimed. However, in some platform(e.g., Android), the information > > required to make the hinting decision is not known to the app. > > Instead, it is known to a centralized userspace daemon(e.g., ActivityManagerService), > > and that daemon must be able to initiate reclaim on its own without any app > > involvement. > > > > This patchset doesn't seem to be getting a lot of interest from other > potential users? It seems very specialized. Are there or will there > ever be any users of this apart from one Android daemon? Don't know if this can be considered another user since it's still in the Android realm of things. I'm interested in extending process_madvise() to support MADV_DONTNEED to expedite memory ripping of a process killed by Android Low Memory Killer. But for that I need process_madvise() to be accepted first. IIRC Crome team was interested in these madv hints as well at some point... > > Also, it doesn't terribly hard for ActivityManagerService to tell > another process "now run madvise with these arguments". Please explain > why this is not practical in ActivityManagerService and also within > other potential users of this syscall. > >