Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1611027pxp; Thu, 17 Mar 2022 12:40:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqUJge93N2oJe6Zj0/l44L0UzdLWcngoOZlk1LtnN6gYHIYVMtiXIYjjFx6rk4ZYQsSo+o X-Received: by 2002:a17:902:b410:b0:14b:e53:7aa0 with SMTP id x16-20020a170902b41000b0014b0e537aa0mr6399015plr.101.1647546027458; Thu, 17 Mar 2022 12:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647546027; cv=none; d=google.com; s=arc-20160816; b=jsniKfBYTNKBxz7c9+6yD+8Y0d5djH4teeCb7GR6IetulMeI0hqtEVO9unddM+0TPA byNG3wexgGHd7iT8H+nJrVdytb9A2vQG0ko6tZMn8QWyBHhtIaOF1eHJayV+f+0S3aSt Lz+Sxd2igrbhefVoGBsNH92sOdUUuLm3ju+N+uKL+lt8GY2ycRDQKEO2qnkv6BhxRZJS c+KevTKFatVpxvABf9kYUx22o4YE2x5DsipnZHHkfvsLBnKBW6CSHLzOQAI7rYQhlDF2 bW7H0U3J8hqS3yzkEozb51q6dOqjyT92sA51VkDl/zztrmp6A0yOZ4qQc9iOBbcHl4Ua 0Fwg== 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=sg6FmafrPdR1KtYNg/JwS0y/weg8uwWLi0b4wB9DaB8=; b=ZAdwGAwo1aaxPA0VM95F2X/jM9XAt387cbShPSA9adMnfE244eJrDEdh8An55hFlXA UDz+GID0a4UbXjh6XtkcLNqaiVmR3JOSdCOYljr59tETJkQ9WlcP1CBmJgvYpMf+dEoR 4kxg+ALsOi0020jdN+VBE1sd5m/7iF0E4W+Urt8iJbQcK/zllNpYdELTv0ONttuUzkBR iPFyhDXnTAMZeQ9FMhwJ6i0dTO/dyoo1/5WfPZKUfHaKOTrsf6St4E35szkV+XvJdCuB u8pY0+RttJENaM112EuLUhqio4fQrtFisNOehg1bW8/6WR2jyv38ngL3c/M0iAJHelZ/ 7YNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=CW+6aHqw; dkim=neutral (no key) header.i=@suse.cz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a33-20020a630b61000000b00381767387e1si3169507pgl.642.2022.03.17.12.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 12:40:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=CW+6aHqw; dkim=neutral (no key) header.i=@suse.cz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DB51F211EC0; Thu, 17 Mar 2022 12:38:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237725AbiCQSys (ORCPT + 99 others); Thu, 17 Mar 2022 14:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237730AbiCQSyo (ORCPT ); Thu, 17 Mar 2022 14:54:44 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A060412D0A5 for ; Thu, 17 Mar 2022 11:53:15 -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-out2.suse.de (Postfix) with ESMTPS id 3EE5C1F38E; Thu, 17 Mar 2022 18:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1647543194; 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=sg6FmafrPdR1KtYNg/JwS0y/weg8uwWLi0b4wB9DaB8=; b=CW+6aHqwJGO16ayz+hSnPGa0OPbIHWsUKut3I4UlP3B9++g8YafKAZteQjBFUdF6bEJfoH hpy6Ebcd2p94U4iCH9Lc1apwE77b13nAy1ZvtBdnmBxqwOdyTaVCwhE1JXtYPQ4Uq7QOy7 s1DPlV+jNFXxC91mvrPiXyLcTnNioUY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1647543194; 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=sg6FmafrPdR1KtYNg/JwS0y/weg8uwWLi0b4wB9DaB8=; b=o8CjYA0ITGwkIvMJKFrEfzWkeowZgmhKOTbhiqLw0rKG8pL+AQyrQ9lPQ17fvlbiiikol3 lPAUcMEz8wfNLADQ== 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 0DB7A13BB5; Thu, 17 Mar 2022 18:53:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id G5OlApqDM2IkKwAAMHmgww (envelope-from ); Thu, 17 Mar 2022 18:53:14 +0000 Message-ID: <34856139-e2db-4d34-07b5-c0af2bdf44f4@suse.cz> Date: Thu, 17 Mar 2022 19:53:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC PATCH v2 1/4] [PATCH 1/4] mm: refactor of vma_merge() Content-Language: en-US To: =?UTF-8?Q?Jakub_Mat=c4=9bna?= , linux-mm@kvack.org Cc: patches@lists.linux.dev, linux-kernel@vger.kernel.org, mhocko@kernel.org, mgorman@techsingularity.net, willy@infradead.org, liam.howlett@oracle.com, hughd@google.com, kirill@shutemov.name, riel@surriel.com, rostedt@goodmis.org, peterz@infradead.org References: <20220311174602.288010-1-matenajakub@gmail.com> <20220311174602.288010-2-matenajakub@gmail.com> From: Vlastimil Babka In-Reply-To: <20220311174602.288010-2-matenajakub@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 On 3/11/22 18:45, Jakub Matěna wrote: > Refactor vma_merge() to make it shorter, more understandable and > suitable for tracing of successful merges that are made possible by > following patches in the series. Main change is the elimination of code > duplicity in the case of merge next check. This is done by first doing > checks and caching the results before executing the merge itself. Exit > paths are also unified. > > Signed-off-by: Jakub Matěna Reviewed-by: Vlastimil Babka It's a nice cleanup on its own. Removed duplication and reduced indentation levels helps.