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=-5.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 5DD9EC433E0 for ; Wed, 24 Jun 2020 01:31:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A9D4206EB for ; Wed, 24 Jun 2020 01:31:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W0vTKcKu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A9D4206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7CA3F6B0002; Tue, 23 Jun 2020 21:31:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77A586B0003; Tue, 23 Jun 2020 21:31:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 668E76B0005; Tue, 23 Jun 2020 21:31:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id 4B8486B0002 for ; Tue, 23 Jun 2020 21:31:28 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C6F411EE6 for ; Wed, 24 Jun 2020 01:31:27 +0000 (UTC) X-FDA: 76962377814.25.crush29_220dcb426e40 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 8C63C1804E3A8 for ; Wed, 24 Jun 2020 01:31:27 +0000 (UTC) X-HE-Tag: crush29_220dcb426e40 X-Filterd-Recvd-Size: 5607 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 01:31:27 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id ne5so383160pjb.5 for ; Tue, 23 Jun 2020 18:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=STvVE6RZ3Y0xoSbwRDvBmVixkdJOr1NShciDYz9YwAM=; b=W0vTKcKu1k4LZL/79tI9ZWaSgDRT8dAnFbEzoztsZnuxsAdCwsWzGStWBp+QyRecCD CUpj6vHksbhJgjnx02F34EzU9VSZkoU+w0V/55gsApx6Jpw5WusaCp9GSfjQGbLUIjmN dhnNMzgXGSuy1Bl5Lsh2JdeS0x9Kc+IttH5obXsz2tQ6BHUdRYOP1aSTYrleoPNbXxHL Vil+Zf21VuwEdfSVf/OirWzjruOs1ePNLO44R4wC6m426c5cTRulwDPOyti+Oh0Q16Eg atT7+QCFMnsJy3yxnvWZ2NOKyqgbq6B3oBd86RRKLsITNob8O+MKM6eY768wVMLumQta /5Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=STvVE6RZ3Y0xoSbwRDvBmVixkdJOr1NShciDYz9YwAM=; b=bptswiLiCz0EN3VZ5/h8W5ZqOOT1XxOIeqJhVDERoG35VF9YA0jeBF6hUkJ86iWVtE uVT/zEPqUKzZHoBBRiSKxkVrM/RQDhlekkSvP6g3aZk9sXCgCBOAW04pg3vPJGymHh0T v93oUpWLKtJcOG8n04OMpJoX3B5an0+jY8LDk70CKIFJLlrTCPYEIp3rElbvIR4pLw6b bFEIscEa4Qkxrb5BcjjdfthGoOoeo2BaHo32sSVngie8cWf5Rp+1j1ZGji0K8NUpiUZ4 xo/iGNkLjOc8m5+9uFdVGV74GWfjaGoSOdcR2XRIQnzmxQKb6Mnv2iWpw9h351eHttZ0 FLug== X-Gm-Message-State: AOAM530RTvx0o+1nhje4M0HHi3PQAQtuEyL6IEMD/BiWjtnXIlGPsrDD gGWWS616RkOoLB/wE8OEN3Q= X-Google-Smtp-Source: ABdhPJyysnl8A9zV1eAdaECih+/1cO9iPnaZNXWpwZYi4TkGIOLdr794d0QrNa/rQMjmDGDb7OxyBA== X-Received: by 2002:a17:902:7208:: with SMTP id ba8mr26976478plb.217.1592962285863; Tue, 23 Jun 2020 18:31:25 -0700 (PDT) Received: from google.com ([2620:15c:211:1:3e01:2939:5992:52da]) by smtp.gmail.com with ESMTPSA id m20sm19512857pfk.52.2020.06.23.18.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 18:31:24 -0700 (PDT) Date: Tue, 23 Jun 2020 18:31:22 -0700 From: Minchan Kim To: Oleksandr Natalenko Cc: Andrew Morton , LKML , Christian Brauner , linux-mm , linux-api@vger.kernel.org, Suren Baghdasaryan , Tim Murray , 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, David Rientjes , Arjun Roy Subject: Re: [PATCH v8 0/4] introduce memory hinting API for external process Message-ID: <20200624013122.GA9502@google.com> References: <20200622192900.22757-1-minchan@kernel.org> <20200623090721.5owt4cxjji6isqe3@butterfly.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200623090721.5owt4cxjji6isqe3@butterfly.localdomain> X-Rspamd-Queue-Id: 8C63C1804E3A8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: Hi Oleksandr, On Tue, Jun 23, 2020 at 11:07:21AM +0200, Oleksandr Natalenko wrote: > On Mon, Jun 22, 2020 at 12:28:56PM -0700, 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. > > > > To solve the concern, this patch introduces new syscall - process_madvise(2). > > Bascially, it's same with madvise(2) syscall but it has some differences. > > > > 1. It needs pidfd of target process to provide the hint > > 2. It supports only MADV_{COLD|PAGEOUT} at this moment. > > Other hints in madvise will be opened when there are explicit requests from > > community to prevent unexpected bugs we couldn't support. > > 3. Only privileged processes can do something for other process's address > > space. > > > > For more detail of the new API, please see "mm: introduce external memory hinting API" > > description in this patchset. > > > > * from v7 - http://lore.kernel.org/r/20200302193630.68771-1-minchan@kernel.org > > * dropping pid support from new syscall and fold releated patches into syscall patch > > * dropping KSM patch by discussion - Oleksandr, I lost the discussion. > > Please resend the single patch against of the patchset if you resolves the discussion. > > https://lore.kernel.org/linux-api/20200302193630.68771-8-minchan@kernel.org/ > > What "next" tag this (v8) submission is based on please? It's against on v5.8-rc1-mmots-2020-06-20-21-44 from mmotm - https://github.com/hnaz/linux-mm.git