Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2068338rdb; Mon, 9 Oct 2023 11:21:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEw7ixi8VFdi3IDaO9OQ0mJxlWE0ouQfpZQrkT4Q/9IN/J00+dQn1trDOxSrMHmBMkpzMMw X-Received: by 2002:a17:902:cecb:b0:1c8:7d41:5b87 with SMTP id d11-20020a170902cecb00b001c87d415b87mr13491464plg.50.1696875714468; Mon, 09 Oct 2023 11:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696875714; cv=none; d=google.com; s=arc-20160816; b=0obGtfWsmJukPl+bz27rOLnUUpirmiP6jxY6SAUsvizPneRyK8s32/KwC6R+TUN92y ytL2YLsKZS4jRsj468Rd97P0I2aE2uyPUpv/4lUpW01mgaKaelacKppIAVdCtKSbXw8Q IaANdanAgRGQIBGXIUURRKfkbuLZP0GTRsMlNcTSFDfRQim4joy4qcrMCohnoxlQ7DbM DX6qoDGcQxMyH6nZwksm3tCRb0SN+Xk9TxuV0qSJW35gJQUBmXUnBVWzAmHEtJgejQA7 aC/QDInFIgxiwoUxWDS3/dq22J+3OJL3uu4v7/NUlhEM6UMalSM2lTEg/s5eLbMLhNl0 qZHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TfP0qTBUd4xX1/BfpaGnOAmCxHeUgPJ3aawAUXPsDFY=; fh=AA4/zokb6swv8AtW32A31qX+WsrsQ7UByX60aefp6A0=; b=reMgZvS7ffOO+1LkNVshZyddOR8NgruLFq2sYUYIFRfXdX/nK0QLSLEWIUOiJq1VqE PlvyyIVCC0S6DQDAG02TK2C1V/3KF7paMkitNJ3m1Aa7FgNtayU6Z9yoQpBhFygdc7Rd VO+nAfTaH1GddfKWmNb6CGzLL6gp9zOHk02+U+qBhcueXeNJF0NWR96/tYHwyaLEf6IX wC9Mi2EEqYueOTpGriYC6seZxY4Ip9nqPbEhrB+0ge1LN+I9Gj1paweVgdg5k1oXxlU1 9+FfJHgipCYkhkDnzYIrsctsLV+bRtzorgeJg7GF7pIu2Wm7nM1ePjwF+cbtJe/SGcWZ 8aPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jtnyoDY8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id kq7-20020a170903284700b001c3671d3151si9741153plb.92.2023.10.09.11.21.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 11:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jtnyoDY8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 85A068029C40; Mon, 9 Oct 2023 11:21:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377518AbjJISVM (ORCPT + 99 others); Mon, 9 Oct 2023 14:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234583AbjJISVL (ORCPT ); Mon, 9 Oct 2023 14:21:11 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D56BA6; Mon, 9 Oct 2023 11:21:06 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40651a726acso45016025e9.1; Mon, 09 Oct 2023 11:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696875664; x=1697480464; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=TfP0qTBUd4xX1/BfpaGnOAmCxHeUgPJ3aawAUXPsDFY=; b=jtnyoDY8tDoMDCmqQiQFG7oJbTOHc7uKxJ6TQwL4VFb5we4FxgIyzEv1/jPgYwltcq g7U4HXdLWoMoSmPvSNZNAy+Z6JYWRV8oli90eQSRnGtR+SPNCGe4XQ/kO546G8TOC3gC FELHOlWMk11qq8LgG7tvu+s+qWlL6Nml45m+8/JR/byq9mg6pkGhF1Z89mCk8cmgATox MBGS1FOxbtlvEMlUbCFG8sfnegMGmkxVRnjXY1L3GUL6++JAFdS7PS1d/NEbg5P3RD3P ykR2yRpBLKnLMWCOn1+8HLIeoueNXS9D9YTqeIZqSHWgrT7Ayy6w7Muy6/v/vPIFerQH 3B8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696875664; x=1697480464; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TfP0qTBUd4xX1/BfpaGnOAmCxHeUgPJ3aawAUXPsDFY=; b=rfkIch2QZmwyMwUcurrlmqIKzgHJpa0oxa2+B78WscSZz+vkkt/p4QKzOXCBoEqL+8 zu6Ka8SJk+u/Kil+uI5oA9QddebfB6MHQaW2KMFHKx923Y+g05v2HsYb68j1nkNO7rhB zbQHBQvEiZGqwHHGLznKcmgTBQaA4J/sRK8EZSCu9Aw4FhWcVEzTfmR6f7CNHiGxjLuu cNaegcGE5NU80iQrjY8ZnEf7UNWVAvmFxHsxkq0STvu1qLPv3XTGWNpDZiSygI5BiV7T TDjbnP0WEN/ucC2+URZ4MuVs1eQcyrGKoasRZv2u/ejasCcJNXF567hyOoQkoeAAN5Bp n82w== X-Gm-Message-State: AOJu0YwdxhItlHmndVYKPMZ7/Te6DVOWL2v1QXEAayAP/VqmIGiLwMyu hJNPJBnoBaQXFMf6O5OHhmQ= X-Received: by 2002:a7b:cc07:0:b0:401:73b2:f039 with SMTP id f7-20020a7bcc07000000b0040173b2f039mr14792796wmh.7.1696875664611; Mon, 09 Oct 2023 11:21:04 -0700 (PDT) Received: from localhost ([2a00:23c5:dc8c:8701:1663:9a35:5a7b:1d76]) by smtp.gmail.com with ESMTPSA id v2-20020a1cf702000000b00405d9a950a2sm14151670wmh.28.2023.10.09.11.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 11:21:03 -0700 (PDT) Date: Mon, 9 Oct 2023 19:21:03 +0100 From: Lorenzo Stoakes To: Vlastimil Babka Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Alexander Viro , Christian Brauner , "=Liam R . Howlett" , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 3/4] mm: abstract merge for new VMAs into vma_merge_new_vma() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 11:21:22 -0700 (PDT) On Mon, Oct 09, 2023 at 06:04:47PM +0200, Vlastimil Babka wrote: > On 10/8/23 22:23, Lorenzo Stoakes wrote: > > Only in mmap_region() and copy_vma() do we add VMAs which occupy entirely > > new regions of virtual memory. > > > > We can share the logic between these invocations and make it absolutely > > explici to reduce confusion around the rather inscrutible parameters > > explicit ... inscrutable > Ack will fix up in v2. > > possessed by vma_merge(). > > > > This also paves the way for a simplification of the core vma_merge() > > implementation, as we seek to make the function entirely an implementation > > detail. > > > > Note that on mmap_region(), vma fields are initialised to zero, so we can > > simply reference these rather than explicitly specifying NULL. > > Right, if they were different from NULL, the code would be broken already. > > > Signed-off-by: Lorenzo Stoakes > > Reviewed-by: Vlastimil Babka > Thanks!