Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp637162ybm; Wed, 22 May 2019 09:03:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/ho5w7moZxRLkxi3XFENlncjVXVtnG++yy7UJrG2g5fZLLgnSt/vg4b8HZvgXRoyZXDv8 X-Received: by 2002:a65:578b:: with SMTP id b11mr90461876pgr.446.1558541027177; Wed, 22 May 2019 09:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558541027; cv=none; d=google.com; s=arc-20160816; b=OAm1J0UQV6gttTiKCgPyJRjsxkncqd7gt4Ijw968yGQVK76kP1u3VeQA91BklYIX2q f2TLnN0jXgEvDrGHgH7fZh39c59GztHFVc3wwXfTUuhO81FyczkorsP+4BLvb+/u9Fva DpUbDAj3L5gydlCTZDp1v/uZsmQyO7ia970osiD+jGN4DhhGa+4FTVUuiKH+Kl+nQT8k 4gxYbeWJiFnxUYveK05srTeXcW+msrFuXBt9YSQFiP5E94SImcqDgLypoOpNlvoejkIZ baNuK6wpXX2b0M0/2HKfdpvzTlFOuH5rgQhphXt2vi65+q9OkW57l8VV7PQU9pF7veBr uaHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RSdosCg7CAf5I4ACWla5jsLhMewb72YTSpe4zJkcCao=; b=lZeJ+/SLbYXivOiQWTy7UH6TWHOI6o11ezhj31b7GXaxzBPVbLhW9H0c0pKY7hKVe7 PEtHVthRkaLrrwafQnizsqctLXnOkwKzHrOelrn5Yb1EUlhY0EBYegXYIAXn/YqRQZNU bR+UkMhX+WxN0A5m0iNFJgwQ2Ag48IzKvo0VyY9Y1nw1G8buogqWxI9mE4FGrQCCOx+m FGrZa2gPx5TyIKAkLXpvskzgN56Lvg6u7TwTgg1QLvVWEIhtxE8RUVUD9qXT3KUVreIu 1ZQGyQ2yNPPESCx5bFjQwpzKJlhco4arKRYCBf0ZQ5nT8Da6NOaVfuLFpf3QJr9duJ44 CStQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=scYBgQFy; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si21571876pfi.184.2019.05.22.09.03.30; Wed, 22 May 2019 09:03:47 -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=pass header.i=@google.com header.s=20161025 header.b=scYBgQFy; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729940AbfEVQBr (ORCPT + 99 others); Wed, 22 May 2019 12:01:47 -0400 Received: from mail-ua1-f54.google.com ([209.85.222.54]:37602 "EHLO mail-ua1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727975AbfEVQBq (ORCPT ); Wed, 22 May 2019 12:01:46 -0400 Received: by mail-ua1-f54.google.com with SMTP id t18so1056785uar.4 for ; Wed, 22 May 2019 09:01:46 -0700 (PDT) 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=RSdosCg7CAf5I4ACWla5jsLhMewb72YTSpe4zJkcCao=; b=scYBgQFym9ROAnpR66sReozWPRXNqJVUFlss1Ng44ycb9HpxOlw8L7UQ1Va7t73uvb DFN4rwIbWJsovtJ2lO1jCcCjsv/llpFZh7teYPx3c/Yc+JplddZXqxpVfZbwzI5Xn/LU 9roGRSVSkxgW4wDuxlB1LMucxNvX0+5VadelX4+ew/Ov8rX4CgCIijza9KX9Fco3/Nm2 8SL7c5IzGLvFUIvWKZDylrdng3FZ1T4GjMPVuy0qw+C2IfwG28lOU6P6EUI6IMf2Wcqr rEI5XiismRDtzA7X6wixbeBYQUnhz83yCAmnWShusLcB2rHnAQpp3dkFTdpQFJWPHfmz Odiw== 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=RSdosCg7CAf5I4ACWla5jsLhMewb72YTSpe4zJkcCao=; b=OuXzWPWJT/c8X7Av8gkZbpNkUXlI3TC94Xvnk2NbCZjkoyEfQ9n5WeDEvZly8Ci+Ow 6U2cnO7IancdQYLimQBpp8SI/Yy2tDwlrNGXKqYeUjaDbFJ0Dm2cPziyuivSj8g3LHCR s0puTo5nJd+2VWuAREx4+1Xt/6a/Q4EXMWsVvCs0K6oe82HPrATyGW7J0rZcPUgTp3DB zOmM2OCK07Y6zcL9qu80uRaq5p7OZlHmMJdl3IhtStDyc6s/GVXapM2aQpOnUmmeuCDT NWrG2T2kx7GpbC4HPo3Nk13hkau/YZwqzCKfAVf8ryTWt5ySyWwHJ1JVdJ9I+PcvA4wC 9lVw== X-Gm-Message-State: APjAAAUCrw7Na++leZSYbpSSieSWL7teB+FKWqI9VAIHamjaZKB2nNif XC4k+snoxW+tW6gSWnKqf2sgYXwl2lv3cGSm9cMtpg== X-Received: by 2002:ab0:1051:: with SMTP id g17mr10254083uab.41.1558540905237; Wed, 22 May 2019 09:01:45 -0700 (PDT) MIME-Version: 1.0 References: <20190521110552.GG219653@google.com> <20190521113029.76iopljdicymghvq@brauner.io> <20190521113911.2rypoh7uniuri2bj@brauner.io> <20190522145216.jkimuudoxi6pder2@brauner.io> <20190522154823.hu77qbjho5weado5@brauner.io> <20190522160108.l5i7t4lkfy3tyx3z@brauner.io> In-Reply-To: <20190522160108.l5i7t4lkfy3tyx3z@brauner.io> From: Daniel Colascione Date: Wed, 22 May 2019 09:01:33 -0700 Message-ID: Subject: Re: [RFC 0/7] introduce memory hinting API for external process To: Christian Brauner Cc: Minchan Kim , Andrew Morton , LKML , linux-mm , Michal Hocko , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Shakeel Butt , Sonny Rao , Brian Geffon , Jann Horn Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!