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 7C1C4C4363D for ; Fri, 2 Oct 2020 17:14:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E2964208B6 for ; Fri, 2 Oct 2020 17:14:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QnVoVH9V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2964208B6 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 2AF426B005C; Fri, 2 Oct 2020 13:14:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2621C6B005D; Fri, 2 Oct 2020 13:14:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 129316B0062; Fri, 2 Oct 2020 13:14:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id DD7246B005C for ; Fri, 2 Oct 2020 13:14:35 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 71FA78249980 for ; Fri, 2 Oct 2020 17:14:35 +0000 (UTC) X-FDA: 77327634510.16.gold26_6008a22271a5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 4AA4E100E5485 for ; Fri, 2 Oct 2020 17:14:35 +0000 (UTC) X-HE-Tag: gold26_6008a22271a5 X-Filterd-Recvd-Size: 4416 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Fri, 2 Oct 2020 17:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601658874; 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=H9YNVR6BrU2NGxneUWWYLKFH1m7KwKMpGFjULgODVOM=; b=QnVoVH9Vk8YJzaKCIDQn5kM/9ePRUkE80/BAILPqm1eNdx0u2Gq1xHFQFibQU+hDEUUlRT s/7hTITQwkwbKLl8cnSdFrJfkwtF1ECXBPhEs5PlSRql4hKxmemUxEXqv3higO9TGlG7H1 CfgfQJN2pkko+HNywqsfTCXuC4O9F8A= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-wlt8-_BONgiGZEM71StpVg-1; Fri, 02 Oct 2020 13:14:32 -0400 X-MC-Unique: wlt8-_BONgiGZEM71StpVg-1 Received: by mail-qk1-f199.google.com with SMTP id o28so1504090qkm.23 for ; Fri, 02 Oct 2020 10:14:32 -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=H9YNVR6BrU2NGxneUWWYLKFH1m7KwKMpGFjULgODVOM=; b=ODteTeAcKgRu/8hmPhK2UP1eEyktiAIYGDHzpFoeLp3fzMZexW8tYknKkc49qa5Vkl NWaXAO+my6XhmbT6mPuKurg+R13EEFn7Fw73YjEpFBG+Nu4Rjj79bpeSDIMDQZPQb18W qYoL0YQreygr786IAZbPabH6qoC6E50eCAMHNVrx9Of5s8Tvap3nF7DfHwiXdTRVovos gYSodr0fEeCZfwqiErHUtjVrxEYOaSMH8MZZGkH6f1YQCiiWCEC0xfCMpJnnPbPW/8Dx PrYeXpddeHO6D7BIj8kR+Yj2kOcLRFITg8cRQ4a+GSTGpRRMYgFSgZueoh3/NIDbSnli BGZw== X-Gm-Message-State: AOAM5303YPJf3YlrhidPt4XgL94MboOOO6Fan/Oygrial3oH/6Fipdn8 sjnrUHbviXaPoepJ+0pZESKKnFlJz7kwlZDSGm6m2WZth1FFRdeZdfNZq8o7dL6G3kaKPXVDkWk JJmPtTjeT1NU= X-Received: by 2002:a05:620a:2082:: with SMTP id e2mr2899159qka.421.1601658871955; Fri, 02 Oct 2020 10:14:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz91o8uz8PP283FAWSk1vB20zLLcd1fcgGHGqnN6wLniDiAftqBWCSKtKyZioCRYQC5Pw5w+Q== X-Received: by 2002:a05:620a:2082:: with SMTP id e2mr2899141qka.421.1601658871663; Fri, 02 Oct 2020 10:14:31 -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 g14sm1461694qkk.38.2020.10.02.10.14.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:14:31 -0700 (PDT) Date: Fri, 2 Oct 2020 13:14:29 -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: <20201002171429.GB5473@xz-x1> References: <20200930204950.6668-1-peterx@redhat.com> <20201002114312.GI9916@ziepe.ca> MIME-Version: 1.0 In-Reply-To: <20201002114312.GI9916@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.000000, 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 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) Thanks, -- Peter Xu