Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3473998ioo; Mon, 30 May 2022 02:56:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxleG9t2V+6hPz2uT5WrsH87AbI3xMOKBBzxhHfht3teXyoibYS+6kvWFyZBil9Dyu+G4uQ X-Received: by 2002:a17:902:bf09:b0:153:99a6:55b8 with SMTP id bi9-20020a170902bf0900b0015399a655b8mr54613612plb.142.1653904564391; Mon, 30 May 2022 02:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653904564; cv=none; d=google.com; s=arc-20160816; b=JOaO5qCJQ5VXG4P5DUUWS3dyrDq4fUGxP2jexGA8hWMt6C2WHncAbFNepAKQRbeChM NmO92OLe5SYVgxOT1O8iDw3aySjtYQeKzdoMm8+8T4cZgVR7jfr55oS3jm/EUku2z6Lb o45FBeIUCNQURJ0y2XYTQSybWGvccpjUnyKokooYBw2MkqqJ5zCy00A8BgCnB87RJ1QS RACuLZ91UTBqW00sjb16wY6QYgbbXVtBYupp4HzhNJlnBcCRNKLnvEUlu5i4NkyaPjZr Jq37bGg/rdeCL3UDyBHfaEPVtta7PVHV1JMc+8PBARkuxV1VL6TksFTfr77BhGyNRW81 QpDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rYugtV093D37dwLrzM7jrsf4UKstOIegZa/tkVdSBtI=; b=cgl4T55Wa2/XTWa4RyD0HEkY2L5D34khfUi1zi0PKsZhl3718wVx2ZqwSA7ygBHdKA lwcGmsaR80irnvBigXTTAxAeD6n1IaPToZWulI9r02KfwbgGIBi80B1LzEBzbAcv7lPq 2MPFCGCxK6CwbVQnQpMnHYwjKjlkiIP9pq63QPppKCXLTE8zAVCQgyLOv91U72OWPbBF nZUaeQvx+huXr3DIFgv7zubaRAcqqfMLuc1jp+y4nxmjDb1b4ZUQ1KBlpK5xoGS9SYn0 kvzitdlQKPgkgNPvUUMoQu4tZv6lfiGcI9JufvCdT6a2RB7iXzv2RPMzScWFNsA+qQe7 L7IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="e62CRT1/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e186-20020a6369c3000000b003c574b2e2a4si14584396pgc.744.2022.05.30.02.55.53; Mon, 30 May 2022 02:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="e62CRT1/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbiE2Xr1 (ORCPT + 99 others); Sun, 29 May 2022 19:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231942AbiE2XrZ (ORCPT ); Sun, 29 May 2022 19:47:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EE20515AC for ; Sun, 29 May 2022 16:47:21 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id A0923B80B8B for ; Sun, 29 May 2022 23:47:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDDBFC385A9; Sun, 29 May 2022 23:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1653868039; bh=ZxuH3VqJUJH1J3jzVH7bIwy/T6x2dAX8M/Zj5GnElfg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e62CRT1/Y+gtGZ1y4URtOIZ0WumVsdH/AUKvCzgVQGbnBArb7wk9n2dKBBUUGB1Qx a0rMQkZMXjy5Qw8HwejKBuhmH9mMWNJDVyHKfNoT7qt3N+bgevKg37xRCMuv2Zmp/E hwV5Nr+aKY4j8QpCBocItMEat3kD80OyiG+GEJj0= Date: Sun, 29 May 2022 16:47:18 -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 v2 2/2] [PATCH 2/2] mm: add merging after mremap resize Message-Id: <20220529164718.ed1eac7d614804c825fae9fd@linux-foundation.org> In-Reply-To: <20220527211708.839033-3-matenajakub@gmail.com> References: <20220527211708.839033-1-matenajakub@gmail.com> <20220527211708.839033-3-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-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Fri, 27 May 2022 23:17:08 +0200 Jakub Matěna wrote: > When mremap call results in expansion, it might be possible to merge the > VMA with the next VMA which might become adjacent. This patch adds > vma_merge call after the expansion is done to try and merge. Thanks. Would it make sense to add a test case for this in (I assume) tools/testing/selftests/vm/mremap_test.c? Maybe parse /proc/self/maps and check that the merging occurred as expected?