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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 E8517C3524E for ; Wed, 19 Feb 2020 20:01:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBB5824672 for ; Wed, 19 Feb 2020 20:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582142486; bh=+/l+ISz2zmfaggvLJhJywVyRv2xWn2G7HKyyyAOP1zk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=OPhmc7BsO81O4lvCt9kBMEFJAKd2PienzZwRA3srAsrZcdt9l060bANR4TwMP9d5H NUVD3197teT+2gefKhmQ2wACnC33Ck+tLhcdrU9sUfiDIlq5GGs71xymNrYqLzlj6W YoxRtbdpegyb6YXqIhz0uhvuY7KTowleyTRcqoxs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727227AbgBSUBZ (ORCPT ); Wed, 19 Feb 2020 15:01:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:44578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726648AbgBSUBZ (ORCPT ); Wed, 19 Feb 2020 15:01:25 -0500 Received: from X1 (nat-ab2241.sltdut.senawave.net [162.218.216.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C3C22465D; Wed, 19 Feb 2020 20:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582142484; bh=+/l+ISz2zmfaggvLJhJywVyRv2xWn2G7HKyyyAOP1zk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ysUl2peu2TUtF2DeG5aaTwij408wk5ZqzOvM/nzBNQoGIjSTenXrYh35ZV85FWdNt +R/M+on8VzJe9wapKRHpCjBGvvCiTuZYjf3zwBukBopk4MqZPszAqx9qHt8XIfafup Wlp2YKQfFdz+Oi2Flp0YYH2B67nKage1rIlUy/cU= Date: Wed, 19 Feb 2020 12:01:23 -0800 From: Andrew Morton To: Minchan Kim Cc: 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 , sj38.park@gmail.com, alexander.h.duyck@linux.intel.com, Jann Horn Subject: Re: [PATCH v6 0/7] introduce memory hinting API for external process Message-Id: <20200219120123.07dda51c29006a892059ccde@linux-foundation.org> In-Reply-To: <20200219014433.88424-1-minchan@kernel.org> References: <20200219014433.88424-1-minchan@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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.