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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 07797C54E49 for ; Fri, 8 May 2020 23:04:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE78224953 for ; Fri, 8 May 2020 23:04:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="iuutN3iv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE78224953 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4FDB3900023; Fri, 8 May 2020 19:04:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4AD1390001C; Fri, 8 May 2020 19:04:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C3D8900023; Fri, 8 May 2020 19:04:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0228.hostedemail.com [216.40.44.228]) by kanga.kvack.org (Postfix) with ESMTP id 2A3E990001C for ; Fri, 8 May 2020 19:04:18 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DF9D352AA for ; Fri, 8 May 2020 23:04:17 +0000 (UTC) X-FDA: 76795082154.21.paste69_85f5bb69ef02 X-HE-Tag: paste69_85f5bb69ef02 X-Filterd-Recvd-Size: 3421 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 May 2020 23:04:17 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C190208DB; Fri, 8 May 2020 23:04:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588979056; bh=AqLynUwQ51zN07t3YqDgkNGcT5K3FLB+CukBeZhLq98=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iuutN3iviKQPxE9c89Nx6lLRcAGHl5P6ObTVn+J4JMJKLVBT+frvae/ZauOSfLDe4 Xh5umy4EUykz8LoU4D/7eRyPZgBcLFVERkU/Lo/IzzDsuzMwAm/NKpFgJjwE33S18V eROfy6Ro5YQbqyaL9xkp8q+yyf+qIqyEvnn6MC2o= Date: Fri, 8 May 2020 16:04:15 -0700 From: Andrew Morton To: Minchan Kim Cc: Vlastimil Babka , LKML , linux-mm , linux-api@vger.kernel.org, oleksandr@redhat.com, Suren Baghdasaryan , Tim Murray , Daniel Colascione , 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, Christian Brauner , Kirill Tkhai Subject: Re: [PATCH v7 5/7] mm: support both pid and pidfd for process_madvise Message-Id: <20200508160415.65ff359a9e312c613336587b@linux-foundation.org> In-Reply-To: <20200508183653.GB125527@google.com> References: <20200302193630.68771-1-minchan@kernel.org> <20200302193630.68771-6-minchan@kernel.org> <14089609-5fb1-b082-716f-c2e129d27c48@suse.cz> <20200311004251.GB87930@google.com> <20200508183653.GB125527@google.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Fri, 8 May 2020 11:36:53 -0700 Minchan Kim wrote: > > ... > > Per Vlastimil's request, I changed "which and advise" with "idtype and > advice" in function prototype of description. > Could you replace the part in the description? Code is never changed. > Done, but... > > ... > > There is a demand[1] to support pid as well pidfd for process_madvise to > reduce unnecessary syscall to get pidfd if the user has control of the > target process(ie, they could guarantee the process is not gone or pid is > not reused). > > This patch aims for supporting both options like waitid(2). So, the > syscall is currently, > > int process_madvise(idtype_t idtype, id_t id, void *addr, > size_t length, int advice, unsigned long flags); > > @which is actually idtype_t for userspace libray and currently, it > supports P_PID and P_PIDFD. What does "@which is actually idtype_t for userspace libray" mean? Can you clarify and expand? Also, does this userspace library exist? If so, where is it? > > ... >