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,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 47ECFC4363C for ; Fri, 2 Oct 2020 17:29:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB3822085B for ; Fri, 2 Oct 2020 17:29:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="mEf9bJxn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB3822085B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0DD826B0062; Fri, 2 Oct 2020 13:29:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 069486B0068; Fri, 2 Oct 2020 13:29:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E96AC6B006C; Fri, 2 Oct 2020 13:29:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id B245F6B0062 for ; Fri, 2 Oct 2020 13:29:01 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4D0DF3636 for ; Fri, 2 Oct 2020 17:29:01 +0000 (UTC) X-FDA: 77327670882.08.shake58_17135ed271a5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 2B6F81819E798 for ; Fri, 2 Oct 2020 17:29:01 +0000 (UTC) X-HE-Tag: shake58_17135ed271a5 X-Filterd-Recvd-Size: 4304 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Fri, 2 Oct 2020 17:29:00 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id g72so2161992qke.8 for ; Fri, 02 Oct 2020 10:29:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aNnAT2BQzskDXg/1YI0n2cxBMBjNbeklM38isDwUEeM=; b=mEf9bJxnwS4xNn1IMwAZSNUNV8vDqZq7ph3AoN0bL3BY5fNCsmgaL5BQOVi3dlyUZQ TjsgWexBqeqlQRV6lXxgEOLbeDHVhOEXHx9H4c5i93Eav3EjE+NwdGV1U/lTpS3fDBFd pp+8U6Z/OWKYhEpvteZDTZvFm/2EtE88EUZV62P6rocaI8kZIYpMQXfME8ZiaId5Bchh Y01WtgdPiSBo4oSO1qZM09E40RzBMR1BcGT3720MNNSGtCetsktfA70RYuafYEaIJBsn 7Q5P8bw046abqeIAdGcEEkT5ykFgCqUaDemDodE8/0Jw3pYBAcTUUWGr/MMGjHWiL1+r /8sA== 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=aNnAT2BQzskDXg/1YI0n2cxBMBjNbeklM38isDwUEeM=; b=SFnP83jPnDxeJrtO8jcMaLMeNwos3X7dsMlIVrVuza8XVBM26CZwAq81hqAfgFPNt9 aygNXePBaugHfVVTDCxRZhzQ2dd4eMFjsFb1FxUrrJ9ubvC0RHLu8hJIXodsIYKqAE4t KOPm96UU0jonsErfAc7RaBtq9qHmPFrLxDv/viYO11Dc6tlssqHW0ZV0ccZ8pjI20XCn zJfp/sMUi3ravh7133jDUwoVXbiE5EaCPrSChdoZ8G1c5jjcRw3VGSlse4eNjmfdXWG0 +NDvzvJA0C4ZBx62jLg/hY5Le+j2T4+Ff5OdG9+sFXvtVqqr4QzluULuSvn9Eaf+4WrF cilQ== X-Gm-Message-State: AOAM532BXCyekVT8RkugLXrbM/2xG3qtIjljilQqo3/iyr6Nsclnsdot Jdg5utoaUe3rfhAnV0dGW98FlQ== X-Google-Smtp-Source: ABdhPJwUavd9TycFi0pgJ9W6Fi8Zflblx8RCTo/4fXK3hGYnZsj4heUy0UnYz01Zah07mD4L7BIg9A== X-Received: by 2002:a05:620a:2442:: with SMTP id h2mr3070538qkn.225.1601659739890; Fri, 02 Oct 2020 10:28:59 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id x126sm1445128qkb.101.2020.10.02.10.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:28:59 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kOOra-006FRi-Hh; Fri, 02 Oct 2020 14:28:58 -0300 Date: Fri, 2 Oct 2020 14:28:58 -0300 From: Jason Gunthorpe To: Peter Xu 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: <20201002172858.GK9916@ziepe.ca> References: <20200930204950.6668-1-peterx@redhat.com> <20201002114312.GI9916@ziepe.ca> <20201002171429.GB5473@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201002171429.GB5473@xz-x1> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000944, 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 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 :) Jason