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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90AD9C43334 for ; Thu, 2 Jun 2022 18:13:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D11676B0071; Thu, 2 Jun 2022 14:13:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CC0006B0073; Thu, 2 Jun 2022 14:13:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BACFE6B0074; Thu, 2 Jun 2022 14:13:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A95396B0071 for ; Thu, 2 Jun 2022 14:13:44 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8295434ACA for ; Thu, 2 Jun 2022 18:13:44 +0000 (UTC) X-FDA: 79534093968.29.E148EA4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id 92F41140058 for ; Thu, 2 Jun 2022 18:13:39 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E6255616BF; Thu, 2 Jun 2022 18:13:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4A6AC385A5; Thu, 2 Jun 2022 18:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1654193622; bh=TQCbTyESjzKocFJ0uHcl7XKEvJfqI5iTnWmUWKSmWA4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VlRGNEn0vm1qYmNdTZwu0UeX/BSvILFmfMDNz9L4PZ/bALKOqVpDL0oO8pFJdbZQf cKZA/bh8Z3c0J40YeuyBxy+ybLwWLcTveg2HEA2IJp/RH/N4noxBrMhcF9wWygH9mr pWkk0wGpvr3sHR9J37QbaWnrW313/TarOb3saYzI= Date: Thu, 2 Jun 2022 11:13:41 -0700 From: Andrew Morton To: Jakub =?UTF-8?B?TWF0xJtuYQ==?= Cc: linux-mm@kvack.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, vbabka@suse.cz, 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 Subject: Re: [PATCH 1/2] [PATCH 1/2] mm: refactor of vma_merge() Message-Id: <20220602111341.6674e4d862d6d925b0eebcb3@linux-foundation.org> In-Reply-To: <20220602145642.16948-2-matenajakub@gmail.com> References: <20220602145642.16948-1-matenajakub@gmail.com> <20220602145642.16948-2-matenajakub@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 92F41140058 X-Stat-Signature: z5mx4se4kr5m9d8zzya4en9fhy9im14g X-Rspam-User: Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=VlRGNEn0; spf=pass (imf26.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1654193619-596078 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 2 Jun 2022 16:56:41 +0200 Jakub Matěna wrote: > Refactor vma_merge() to make it shorter and more understandable. > 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. The variable 'area' is > divided into 'mid' and 'res' as previously it was used for two purposes, > as the middle VMA between prev and next and also as the result of the > merge itself. Exit paths are also unified. > Thanks, but unfortunately the code you're working on here has changed greatly in Liam's mapletree patchset. Could you please take a look at the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and decide if you want to tackle it?