Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1174184pxk; Fri, 4 Sep 2020 02:37:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXlz7EHwO4AzH9BWzpA1AuoCWcjkw+ENgLlbHg9B4RhVoGX5xnZK5hopR/sjvIpKQ3O+pb X-Received: by 2002:aa7:dc08:: with SMTP id b8mr7806453edu.271.1599212251457; Fri, 04 Sep 2020 02:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599212251; cv=none; d=google.com; s=arc-20160816; b=J0DVB6Ub5TGZpmpjpJgkqLK3GIxe2yKrleInJWXgkm5+E6CyYViPztK5Nr45tFs7VC 3Dt3cq5D/SNdElSBZLB08pnVWT0XcPwqc62gT6d6FPkoWMSLP/e0hRIQuWlJiPDNFl7o icH6MCQh/qUSNosLfUvdpmecpbSdveap/WAhHvU6zUOiVGdN0HHJdSI3bJmx883gwpGH U9Yp6zQMgi8t7MmoYQeVUYymDhhzsRrGaU4JAwEnEEcFGhDJ7KlK+hbPJndh4Q2SBy7g lZXmeHvZoLmgb8jJlK8+S+inFWGm7DxEEDw7EmK+q8v+nqyzamx07mimCVL74WXA69Cz 4Dhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DS1ZJUQL9DErnpxb5TH5Fxp7YDhDx/aai1LQCbuUygE=; b=efgF2Nn+Uhkjlr2AV0AAi12eeRE2f5tra3gWrC5FUXMlyOSmU5axwnC4uNKS9ZN7er MtiFADHm250xCCAkmgeq7u0cIjymK6OmlUmhhVH/FZ4CDJLg0m4bIzM/0iRoqzq0sYhP UMVczbOferDDIc+ErYsQkObnwxHpmCJ1JblrLt/4ZLyl0AIp6vzATwFFMrEc/F2JvZ99 mV+oHJCrjIttdqjeNnAD1X9hPzgeZbPwgYe1I6HgWlp14FopAmKXAR51oTlLqBsx5fAQ Oo6doLtXn5QLF8nhmxYx75KEDu/3z8uzzyd6f7WjT4MGjD9xZW/vW822NWaAlvx/h/5B nIkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si3039823edi.512.2020.09.04.02.37.08; Fri, 04 Sep 2020 02:37:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729712AbgIDJgg (ORCPT + 99 others); Fri, 4 Sep 2020 05:36:36 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:33927 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbgIDJgf (ORCPT ); Fri, 4 Sep 2020 05:36:35 -0400 Received: from ip5f5af70b.dynamic.kabel-deutschland.de ([95.90.247.11] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kE890-0006Sg-0v; Fri, 04 Sep 2020 09:36:30 +0000 Date: Fri, 4 Sep 2020 11:36:27 +0200 From: Christian Brauner To: Minchan Kim Cc: Florian Weimer , Andrew Morton , LKML , linux-mm , linux-api@vger.kernel.org, oleksandr@redhat.com, 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 , Linus Torvalds , Vlastimil Babka , Christian Brauner , Daniel Colascione , Jens Axboe , Kirill Tkhai , SeongJae Park , linux-man@vger.kernel.org Subject: Re: [PATCH v9 3/3] mm/madvise: introduce process_madvise() syscall: an external memory hinting API Message-ID: <20200904093627.vj6t6q5spicfyonh@wittgenstein> References: <20200901000633.1920247-1-minchan@kernel.org> <20200901000633.1920247-4-minchan@kernel.org> <87blippc7p.fsf@mid.deneb.enyo.de> <20200903172618.GB1959033@google.com> <87pn72lq65.fsf@mid.deneb.enyo.de> <20200903175949.GC1959033@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200903175949.GC1959033@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 10:59:49AM -0700, Minchan Kim wrote: > On Thu, Sep 03, 2020 at 07:34:58PM +0200, Florian Weimer wrote: > > * Minchan Kim: > > > > > On Tue, Sep 01, 2020 at 08:46:02PM +0200, Florian Weimer wrote: > > >> * Minchan Kim: > > >> > > >> > ssize_t process_madvise(int pidfd, const struct iovec *iovec, > > >> > unsigned long vlen, int advice, unsigned int flags); > > >> > > >> size_t for vlen provides a clearer hint regarding the type of special > > >> treatment needed for ILP32 here (zero extension, not changing the type > > >> to long long). > > >> > > > > > > All existing system calls using iove in Linux uses unsigned long so > > > I want to be consistent with them unless process_madvise need something > > > speicial. > > > > Userspace uses int, following POSIX (where applicable). There is no > > consistency to be had here. > > Okay, I changed it with size_t. Maybe some context helps. We had the discussion about syscall conventions during LPC both in the KernelSummit and in the glibc toolchain session and one of wishlist conventions from libc was to always use size_t and not unsigned long for sizes. I know this has been a little frustrating having to change types and so on for the syscall quite a bit but I'm going to start drafting an updated version of our howto for adding syscalls now so things like this are more transparent going forward. I just hadn't gotten around to it right after Plumbers. Christian