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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F4EBE95A9E for ; Mon, 9 Oct 2023 16:04:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377114AbjJIQEx (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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