Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1990462rdb; Mon, 9 Oct 2023 09:05:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqjhypiQNqk6IPZ5F4V2dHooRUvsgqUS/trLFsQarpHb0UwSoRDuLRv6s6IuowRetTsVeh X-Received: by 2002:a05:6358:7f1c:b0:143:96ac:96da with SMTP id p28-20020a0563587f1c00b0014396ac96damr11773145rwn.2.1696867515587; Mon, 09 Oct 2023 09:05:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696867515; cv=none; d=google.com; s=arc-20160816; b=MSFN3qa+BYjdtZtJqRrrgs43sux9xPIsq+pGSKHAwf7XdQpTDZhbddYMZwInooayel G5AKu46yzmLvwo3mRi+OVkYO7+elLwfCAA/nGRdr2/fb9Tt5e91mS3ytQvL08T77ES1W Of++IFwdrgK4jc4cAlPCLLGweCw2ko2ATGWzD0oiPCoGLQq/hkl43vPAs5xrREpp2Kix Ns5kneOmw4Gmf82J2810Jnoo9aXzp9hti0oo0W/DFMp9ni1bQcd8seO6zyazpDLY/R+1 s3V6XQ86brgzDBvDooDmFGRprSnUsBA+YJMCKVEwsU1MGgsS+6mCYnKowXzqp2LlVPkW qGWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=DLrtq61I2S0cToZBib/cJSy8l48RNzXOA1hvvbyOcVw=; fh=tZxW8bI8ETZY61H6quWBGFFZJzdsFoROME6X3oH/E/w=; b=HckNHyGi8L/0T/Jz8MwZQp8EQY2RHNKVv+7vQDWRqE75y1l/6Si+/LsOuQF4fh+5FO qYg4SDE4PKKWHUGOfrhq1C2WmtMAcdsH112FGHKDr2Dwc+CQ8nMJQXjQJgJaYbbYVt9E S31CYeVIziRg+tU39XYvKMIzTIz/bAcPv1rSsgnxL/8pZ+Km/MThGzFkeAnnYFBO/VOq MM9mT/IEkXm16YReMJWLMKmqO4VFalw2xd31if1LoLmoCnPQ8nTK1+1vUAgl/iQDq9fa FOhHRRNuIG74cENoP3Em6f94E0CFahh1LrlvRyy5BUKMjdWYkIVut9IKUo/RzAX681E/ Ng6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Mr38JGJF; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id f20-20020a63f114000000b00573fc71f6d9si10244600pgi.64.2023.10.09.09.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:05:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Mr38JGJF; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B49CF801C0BB; Mon, 9 Oct 2023 09:05:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377115AbjJIQEx (ORCPT + 99 others); Mon, 9 Oct 2023 12:04:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377106AbjJIQEv (ORCPT ); Mon, 9 Oct 2023 12:04:51 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D8B399; Mon, 9 Oct 2023 09:04:49 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 47AB621885; Mon, 9 Oct 2023 16:04:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1696867488; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DLrtq61I2S0cToZBib/cJSy8l48RNzXOA1hvvbyOcVw=; b=Mr38JGJFjkHEHogb8j2ImpDNRltdr68BiPqMf/56ruc2lWi2zb7p4/qD+DxY5DI3VKAhLg UKqSbvdcMd0DjO83e8Em15CdLmueOm8+cfCej5Zl0N/uZhyJYw+wKXfqwXoLcq/OYtpWSE eSlEetIPSwvdOKEb8S41Ns1jgqo185g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1696867488; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DLrtq61I2S0cToZBib/cJSy8l48RNzXOA1hvvbyOcVw=; b=lrC8CBCcgX71SDRJDSQYJ7pPeh0XnW9UNEjzqMOx9LBdlz26yoCQpqPMba2ZTipx5K91Qh b1AOepPg3X22PCAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2531F13586; Mon, 9 Oct 2023 16:04:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8GpbCKAkJGXkRAAAMHmgww (envelope-from ); Mon, 09 Oct 2023 16:04:48 +0000 Message-ID: Date: Mon, 9 Oct 2023 18:04:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 3/4] mm: abstract merge for new VMAs into vma_merge_new_vma() Content-Language: en-US To: Lorenzo Stoakes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Alexander Viro , Christian Brauner Cc: "=Liam R . Howlett" , linux-fsdevel@vger.kernel.org References: From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Mon, 09 Oct 2023 09:05:12 -0700 (PDT) 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 > 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