Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3514383ybi; Mon, 27 May 2019 01:08:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVr0DNLYjcsSEzfc5I1lAYDSjH0S6J0P2sa8hGxtztILsfTXOyMylK4X5D98SOBeNcdWb7 X-Received: by 2002:a62:2cc2:: with SMTP id s185mr94458258pfs.106.1558944500852; Mon, 27 May 2019 01:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558944500; cv=none; d=google.com; s=arc-20160816; b=0euP5hf10BzgfnvKvl68n7ubj3oLzbY2e5pVIzDJRxex41oeYMrvFPeXP2o0rewSrL HN0OfzZ56LHEfeUBx3X2KoLwj3kSBkEs4DvVuERAcfBTVC+dwRbNJPZE3q8oMwzPvcRr ewI6iiMS5WWCwh6LhFcKBVDyCNiPoP6i7JSMAdl6GKSvPlHsjHsuPZAktQaMgukbAmvs w58qgL/C3gbCN0kRd4KB+ay21e2oEye9WYU2+82u7bJSTWT7XnSCTg880tWZBap23JjA skIgsoQ/MeMdKtMNMJq51fKbuDormbp4LlE4Yl9W85w5EjkZxxSzn5XXaFNYxa8aVa6B /Ppg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x5rdJRMBeOB+xgTMZzJ1Pck6b2K6E2/69q0AHxR6+/s=; b=qje0HfZTdwLP1gWBY/WbuY1H9zPFiVtcZratiLAJypNL8JjTpoRKCeKfQPaKbkTz3/ pGNCG+xuGaCUhw7egjLXqzlYnBVYYzhZr3XPl0tGvXGsDmLR+oSWRdSO9XCnAAbsxNnX ZgnT5D1OjfAnnLMjRopYDzxaqsZFnLSBaHM3Xcmry106PBuHfymzmCNKaRqqp2I5TZls COxGQo8do6EiYSIc/WFb1Mzos1AG+vrqDUc+X87qL3Jd8j7AEMYdZA74eRJ9Zz/1wMrz 6YQHfDBAjOISgnefi7VcfDE5cp+Sen+vMm+HmP4oNfOfwboHQp+54UNtb76jnQjirzU9 fy5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=cvbLWTuI; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cp18si18527344plb.196.2019.05.27.01.08.04; Mon, 27 May 2019 01:08:20 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20161025 header.b=cvbLWTuI; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbfE0IGW (ORCPT + 99 others); Mon, 27 May 2019 04:06:22 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39279 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfE0IGW (ORCPT ); Mon, 27 May 2019 04:06:22 -0400 Received: by mail-pl1-f193.google.com with SMTP id g9so6734097plm.6 for ; Mon, 27 May 2019 01:06:22 -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:user-agent; bh=x5rdJRMBeOB+xgTMZzJ1Pck6b2K6E2/69q0AHxR6+/s=; b=cvbLWTuIj7hifCDv34fIGfri4oZBxJy6aL2CNzKe9tHh3AdUqxPlw9JHMr/RmmAbCm LiNyDtBh3sTAw8Opw8Dx5pYuC0tS/9slXVrl7zo3Tp/pJ2eFCWw6asLPAZ2OVULhhbSl FxeJGvfma2snz5OPNYj625BHHYDG202pR+iBZAj8q0PRJFWHjkraE7F8JXYvd0t5ttCX lyi8aeH1gfmE6CwrURLqC4wfadIzFOxtuOBNSE4SZM3w1eVisSh6SJ0Ykh8V09rKDMRh 8/wPskQB72rTjGRB+Qg59EyvF5PaL7rJcQeSW5LssbD+RkJY/7fXej16ibogoXQPi/F2 v2Tg== 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:user-agent; bh=x5rdJRMBeOB+xgTMZzJ1Pck6b2K6E2/69q0AHxR6+/s=; b=esR3kdbKnryvrIBqw1Tx/aPJ42TqVtYhd4mmou/d6JCLBNH3tGOA0tDJcvzQ9tOnPQ 8LMy5d2VWVZY3NJ+7EL+qobcFUD984+ZxQ9nX/bOhMueN4Wxf5CyQBQXO601fMcRQfRH ZnKkfczOFZHU0vKCSxcZWbb2+pv5HHiKanZN3ihqgAOHNMY4dF4r859yMJy++ziqPXLR 2OYRvte+cojdNIUBeXTlxkRh7IPdFs/8EfaKX95W/Bie3y9S6srDRIVkTVhvwLJkAorb mG6Lmj6DZUeTCtfBHIcFsQfOVzASAU9Tml7Hm8bTjONwAYLEgsbZkAVEIl16p+dIWXEt UUNw== X-Gm-Message-State: APjAAAVEI3upyL/gweHQEGB5HEa7cfA8K3imtZfIIpWXERs6nT/TcRrD GsmX4MxbkTiadGy/SZufSJE= X-Received: by 2002:a17:902:f212:: with SMTP id gn18mr64846228plb.106.1558944381799; Mon, 27 May 2019 01:06:21 -0700 (PDT) Received: from google.com ([2401:fa00:d:0:98f1:8b3d:1f37:3e8]) by smtp.gmail.com with ESMTPSA id t15sm10712248pjb.6.2019.05.27.01.06.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 27 May 2019 01:06:19 -0700 (PDT) Date: Mon, 27 May 2019 17:06:14 +0900 From: Minchan Kim To: Daniel Colascione Cc: Christian Brauner , Andrew Morton , LKML , linux-mm , Michal Hocko , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Shakeel Butt , Sonny Rao , Brian Geffon , Jann Horn Subject: Re: [RFC 0/7] introduce memory hinting API for external process Message-ID: <20190527080614.GD6879@google.com> References: <20190522145216.jkimuudoxi6pder2@brauner.io> <20190522154823.hu77qbjho5weado5@brauner.io> <20190522160108.l5i7t4lkfy3tyx3z@brauner.io> <20190523130717.GA203306@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190523130717.GA203306@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 10:07:17PM +0900, Minchan Kim wrote: > On Wed, May 22, 2019 at 09:01:33AM -0700, Daniel Colascione wrote: > > On Wed, May 22, 2019 at 9:01 AM Christian Brauner wrote: > > > > > > On Wed, May 22, 2019 at 08:57:47AM -0700, Daniel Colascione wrote: > > > > On Wed, May 22, 2019 at 8:48 AM Christian Brauner wrote: > > > > > > > > > > On Wed, May 22, 2019 at 08:17:23AM -0700, Daniel Colascione wrote: > > > > > > On Wed, May 22, 2019 at 7:52 AM Christian Brauner wrote: > > > > > > > I'm not going to go into yet another long argument. I prefer pidfd_*. > > > > > > > > > > > > Ok. We're each allowed our opinion. > > > > > > > > > > > > > It's tied to the api, transparent for userspace, and disambiguates it > > > > > > > from process_vm_{read,write}v that both take a pid_t. > > > > > > > > > > > > Speaking of process_vm_readv and process_vm_writev: both have a > > > > > > currently-unused flags argument. Both should grow a flag that tells > > > > > > them to interpret the pid argument as a pidfd. Or do you support > > > > > > adding pidfd_vm_readv and pidfd_vm_writev system calls? If not, why > > > > > > should process_madvise be called pidfd_madvise while process_vm_readv > > > > > > isn't called pidfd_vm_readv? > > > > > > > > > > Actually, you should then do the same with process_madvise() and give it > > > > > a flag for that too if that's not too crazy. > > > > > > > > I don't know what you mean. My gut feeling is that for the sake of > > > > consistency, process_madvise, process_vm_readv, and process_vm_writev > > > > should all accept a first argument interpreted as either a numeric PID > > > > or a pidfd depending on a flag --- ideally the same flag. Is that what > > > > you have in mind? > > > > > > Yes. For the sake of consistency they should probably all default to > > > interpret as pid and if say PROCESS_{VM_}PIDFD is passed as flag > > > interpret as pidfd. > > > > Sounds good to me! > > Then, I want to change from pidfd to pid at next revsion and stick to > process_madvise as naming. Later, you guys could define PROCESS_PIDFD > flag and change all at once every process_xxx syscall friends. > > If you are faster so that I see PROCESS_PIDFD earlier, I am happy to > use it. Hi Folks, I don't want to consume a new API argument too early so want to say I will use process_madvise with pidfs argument because I agree with Daniel that we don't need to export implmentation on the syscall name. I hope every upcoming new syscall with process has by default pidfs so people are familiar with pidfd slowly so finallly they forgot pid in the long run so naturally replace pid with pidfs.