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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 E7BCFC46466 for ; Fri, 2 Oct 2020 18:04:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 66B63206DD for ; Fri, 2 Oct 2020 18:04:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HErN4fJs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66B63206DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CDB7D900003; Fri, 2 Oct 2020 14:04:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C8BF7900002; Fri, 2 Oct 2020 14:04:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA360900003; Fri, 2 Oct 2020 14:04:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 8EAE1900002 for ; Fri, 2 Oct 2020 14:04:21 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1F9ED8249980 for ; Fri, 2 Oct 2020 18:04:21 +0000 (UTC) X-FDA: 77327759922.02.plant05_5303ac2271a6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id F3BBD100BF037 for ; Fri, 2 Oct 2020 18:04:20 +0000 (UTC) X-HE-Tag: plant05_5303ac2271a6 X-Filterd-Recvd-Size: 4804 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Fri, 2 Oct 2020 18:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601661860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l9pbAMGnZ/2sPsbUySEmQCGXBz2G/URu0iXROtPzXBA=; b=HErN4fJsPJsYvwdqMyyk2+C8EmOOEB8Vxl7cGdthTdJgU+KdnjbJEn8A5fvrUc2xzS4j3d E83A3oJzeKZvclSazuD8uXVuaBgZnHzdqYfx/6adC1DHZNXQ7oaL+amVmPHMPVV7dxRCou L3G0X4d4oxjpoPm5zg4mdGvzZldxt/c= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-533-2m-mVaDmMfiupAyBEFIbvA-1; Fri, 02 Oct 2020 14:04:17 -0400 X-MC-Unique: 2m-mVaDmMfiupAyBEFIbvA-1 Received: by mail-qt1-f198.google.com with SMTP id m13so1585767qtu.10 for ; Fri, 02 Oct 2020 11:04:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l9pbAMGnZ/2sPsbUySEmQCGXBz2G/URu0iXROtPzXBA=; b=r5K56izgydGF7sPgyBDMOO06Zj+hz1u6T0f+1INA5XzM/1mxLAupOAZB1QIfSZUB2T nfQAjKRXl6XjhUBOhInaAbhEau9TaHvFJNMuxmCnEV04EVH+0vl/VivKaZWhhcd4rgA+ YqI5LA9ielHpbOxkQhk2tQFK8ztGwuR8OT6l4AO/rmYz7ctqdptiNpwcjfK2ecsSJ+M9 qQUfvXWIcvE3lgRf+/YH8MuWE9pXamj+0cuEGSq0+0985rPBnw1sah117aGbcMJgzduF pGQ4xxT+UxetcdqydjVH6w+KJ28/917mtC0vOn4P8dusHaaDCmQkHwIDnzTCgTGEgjs3 KC1w== X-Gm-Message-State: AOAM531tcoiaLgFJQeoas1Fbqx8AlRRFq3oamG2G4P+XyHytOZw3MZP0 Z2LD5Y99uRcholKbGaAeiIm8ZaG2HT6q+RI8H2K3vOuzEsdJYBvqtJo0U7RHg8vGTQn48jP9H/m kUPNz8bWEJ8g= X-Received: by 2002:aed:2b63:: with SMTP id p90mr3475733qtd.71.1601661856685; Fri, 02 Oct 2020 11:04:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylJOl0sGwOBRIBnzqiSHxiC6y0cjtp/qSGOEnDKnnqlH1xQk8vhJBoMZQOxX7mpOTY21K8sA== X-Received: by 2002:aed:2b63:: with SMTP id p90mr3475706qtd.71.1601661856390; Fri, 02 Oct 2020 11:04:16 -0700 (PDT) Received: from xz-x1 (toroon474qw-lp130-09-184-147-14-204.dsl.bell.ca. [184.147.14.204]) by smtp.gmail.com with ESMTPSA id t64sm1530965qkd.69.2020.10.02.11.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 11:04:15 -0700 (PDT) Date: Fri, 2 Oct 2020 14:04:14 -0400 From: Peter Xu To: Jason Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , "Kirill A . Shutemov" Subject: Re: [PATCH] mm: Remove src/dst mm parameter in copy_page_range() Message-ID: <20201002180414.GD5473@xz-x1> References: <20200930204950.6668-1-peterx@redhat.com> <20201002114312.GI9916@ziepe.ca> <20201002171429.GB5473@xz-x1> <20201002172858.GK9916@ziepe.ca> MIME-Version: 1.0 In-Reply-To: <20201002172858.GK9916@ziepe.ca> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Bogosity: Ham, tests=bogofilter, spamicity=0.005079, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Oct 02, 2020 at 02:28:58PM -0300, Jason Gunthorpe wrote: > On Fri, Oct 02, 2020 at 01:14:29PM -0400, Peter Xu wrote: > > On Fri, Oct 02, 2020 at 08:43:12AM -0300, Jason Gunthorpe wrote: > > > > -static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, > > > > - pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma, > > > > - struct vm_area_struct *new, > > > > +static int copy_pte_range(pmd_t *dst_pmd, pmd_t *src_pmd, > > > > + struct vm_area_struct *vma, struct vm_area_struct *new, > > > > unsigned long addr, unsigned long end) > > > > > > I link this, my only minor quibble is the mixing of dst/src and new > > > language, and then reversing the order in each place. Would read > > > better to be consistent: > > > > > > copy_pte_range(dst_vma, dst_pmd, src_vma, src_pmd, addr, end) > > > > I have no strong opinion on the ordering, but I agree the names are clearer. > > Considering normally we put the same type of parameters to be together, how > > about: > > > > copy_pte_range(dst_vma, src_vma, dst_pmd, src_pmd, addr, end) > > I was looking at the order of (dst_pmd, src_pmd, src_vma, dest_vma) > > Whichever, just have some logic to it :) Oh, sure. :) -- Peter Xu