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=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 3DF09C11D00 for ; Thu, 20 Feb 2020 09:17:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0380824654 for ; Thu, 20 Feb 2020 09:17:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="jXYZt7ec" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0380824654 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8DE8F6B0005; Thu, 20 Feb 2020 04:17:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 88EE36B0006; Thu, 20 Feb 2020 04:17:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77E2F6B0007; Thu, 20 Feb 2020 04:17:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) by kanga.kvack.org (Postfix) with ESMTP id 5E31F6B0005 for ; Thu, 20 Feb 2020 04:17:10 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3851B613B for ; Thu, 20 Feb 2020 09:17:10 +0000 (UTC) X-FDA: 76509951420.22.dogs10_216dbeadf142c X-HE-Tag: dogs10_216dbeadf142c X-Filterd-Recvd-Size: 5070 Received: from smtp-fw-6001.amazon.com (smtp-fw-6001.amazon.com [52.95.48.154]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 20 Feb 2020 09:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1582190230; x=1613726230; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=3DR/UH6MEPv43yGUiIRitijjOdGjwQGa0V2AAfInCYM=; b=jXYZt7ecjO//M2DtZFe7S/88uwuivVGtxYP3w9IjYHXziFkxMPac4syI EWmZDMaR9G5fERwQUBrT8aq1hlnq/C56fODq1+OFLaBVuHjywne3dGBe2 s0fI66AolilQBh16dLwToq9TucNLCTg5tAkg8aALGNMMjwtU/fB+aoGNf M=; IronPort-SDR: wz79lME026lmGTeEOVhzNMQUXbePBwBbna1HEI5VzRyyhMCftsQsZad6YIlel6EqMNx4l17IFr UdYdDtsWdvnQ== X-IronPort-AV: E=Sophos;i="5.70,463,1574121600"; d="scan'208";a="18729860" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2c-397e131e.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 20 Feb 2020 09:16:56 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2c-397e131e.us-west-2.amazon.com (Postfix) with ESMTPS id 537CAA2660; Thu, 20 Feb 2020 09:16:54 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Thu, 20 Feb 2020 09:16:54 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.161.45) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 20 Feb 2020 09:16:45 +0000 From: SeongJae Park To: Andrew Morton CC: Minchan Kim , LKML , linux-mm , , , Suren Baghdasaryan , Tim Murray , Daniel Colascione , Sandeep Patil , Sonny Rao , Brian Geffon , Michal Hocko , Johannes Weiner , Shakeel Butt , John Dias , Joel Fernandes , , , Jann Horn Subject: Re: Re: [PATCH v6 0/7] introduce memory hinting API for external process Date: Thu, 20 Feb 2020 10:16:31 +0100 Message-ID: <20200220091631.31949-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200219120123.07dda51c29006a892059ccde@linux-foundation.org> (raw) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.45] X-ClientProxiedBy: EX13D06UWA002.ant.amazon.com (10.43.160.143) To EX13D31EUA001.ant.amazon.com (10.43.165.15) 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, 19 Feb 2020 12:01:23 -0800 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? > > 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. I personally have interest in and hope successful development/merge of this patchset. The interested usecases of 'madvise_process()' for me is optimizations of general memory-intensive workloads having dynamic data access patterns on hierarchical memory systems (e.g., multi-tier memory or fast storage based swap devices). In more detail, I'm already using a part of this patchset for my RFC patchset implementing Data Access Monitoring-based Operation Schemes[1]. For my specific case, I don't need new system call but only target task argument, though. Once in a past, before joining my current company, I tried using 'madvise()' to optimize some scientific HPC programs. The improvement results were clear, but optimizing each of the workloads was challenging and time-consuming. I believe this new systemcall to be very helpful for such cases, either. [1] https://lore.kernel.org/linux-mm/20200218085309.18346-1-sjpark@amazon.com/ Thanks, SeongJae Park