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=-8.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 6DA1EC35254 for ; Wed, 19 Feb 2020 21:05:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 178E924672 for ; Wed, 19 Feb 2020 21:05:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="M2AFVg5v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 178E924672 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8693A6B0005; Wed, 19 Feb 2020 16:05:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 819D46B0006; Wed, 19 Feb 2020 16:05:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7577A6B0007; Wed, 19 Feb 2020 16:05:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id 5EC276B0005 for ; Wed, 19 Feb 2020 16:05:40 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 2C3E2180AD817 for ; Wed, 19 Feb 2020 21:05:40 +0000 (UTC) X-FDA: 76508108040.02.feet54_3166e6cd51e51 X-HE-Tag: feet54_3166e6cd51e51 X-Filterd-Recvd-Size: 4739 Received: from mail-ua1-f68.google.com (mail-ua1-f68.google.com [209.85.222.68]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 21:05:39 +0000 (UTC) Received: by mail-ua1-f68.google.com with SMTP id 73so761513uac.6 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=RqJ7ji5WHRJwOShR2XCMgBxuOSXcktCc+gJT10onIVmPIhi3a7KxbOq+XOSxF9VTeg 9rFxIHErJJrlU8GKdqlcaOYJ6vwbAJiw+DVaHagu3D6IUAuKoNAJt2DGQmLKgipyh1SC 2CpFC9flD8SIWYt3LFytXPyms0UZXe/nI8DYpgP+tlZwL9Wscj2Tkaf6VosfCRsSfHpP 3E6gehH7p2l6fknXIN03Wy9vBeyKwBrVqG1NrrwuUxXW6oJxmOXD7jByI/dLKepYWPaB yFvxLFbrov6mC6z3grnG2Z0tjtroMb4aTVIV4/h9Aqwhgzbm+hE8zHU76+39h7E8Mn3u pPDQ== X-Gm-Message-State: APjAAAUd5PQZOfmFtAaQBcodAMVmrJ2ofWtyOaEdfNltfOJVkgVTXv8X WsjPn9qrNCLqVzBLw8B6/1aMws9bx8hNkvPRxkP41Q== X-Google-Smtp-Source: APXvYqyF757Ew+pQ4E0xwgB8qcfQWw35zjjmEjMj+nIZ6Tie14cLrBVfS3I6x1GGc2ULc3K0ofDrC/N30QBzYaDoDsk= 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" 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 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. > >