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 19C06C7115C for ; Fri, 20 Jun 2025 18:59:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ABCCF6B007B; Fri, 20 Jun 2025 14:59:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A6E3F6B0096; Fri, 20 Jun 2025 14:59:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 95E0E6B0098; Fri, 20 Jun 2025 14:59:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 803106B007B for ; Fri, 20 Jun 2025 14:59:28 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2FFFE1A121C for ; Fri, 20 Jun 2025 18:59:28 +0000 (UTC) X-FDA: 83576692416.10.CD99CFE Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf10.hostedemail.com (Postfix) with ESMTP id 03FAFC0006 for ; Fri, 20 Jun 2025 18:59:25 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=YEuNqKNY; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fA3ymKZ2; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=YEuNqKNY; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fA3ymKZ2; spf=pass (imf10.hostedemail.com: domain of pfalcato@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=pfalcato@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1750445966; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rcdBWSrdiOeiTEuukcj+PpyH0Ha29phKzpomaCvvSfE=; b=eoX1RruuY3ApkCK2MEFn6uzWFMAEB3GgHasB/E66fnudYBThUKGx+I/2ePdHYVBpIZqswB dyhE9AWYu/CDJT+uKUZZBKCqGe8q3X62u9yZc2aYxMExU1Hn29286cVewzQlQHmvOQlXzH 3UXg1UZQQQbAcn4LXrajJhgxYPbEuw4= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=YEuNqKNY; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fA3ymKZ2; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=YEuNqKNY; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fA3ymKZ2; spf=pass (imf10.hostedemail.com: domain of pfalcato@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=pfalcato@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750445966; a=rsa-sha256; cv=none; b=FFEhbr9/IO5DVS2rOeHIS1s+H8Mp3OgcUymeXE1Pa6jqqDDqUV9bz4CdoWbnr1iAZN9S8T 62zZyWVBwsJtxofVMh1WTPedPElp+QJ1g1uf5doVxXxv1kotVjHDO6MizjKaqz/p4m0+ls JyYdRCdm5pnWPioYp4Aly4bPxzZ7g60= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 903E721201; Fri, 20 Jun 2025 18:59:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1750445964; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rcdBWSrdiOeiTEuukcj+PpyH0Ha29phKzpomaCvvSfE=; b=YEuNqKNYxyl2y85Dnkrn+ugY06r0Wg8BQjJ/yq0G3IleH6i7Hk04SHGBXa05PtfnZlWg6n GZxmEJR2MsbD/grScqqCtM91AnyAaPPlLAwyw/RZwuAFR4Qyxs4rONPkFj83ql5VapDSzZ HaFkGzTaCMU4uni//LaOoCISMA9cM+8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1750445964; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rcdBWSrdiOeiTEuukcj+PpyH0Ha29phKzpomaCvvSfE=; b=fA3ymKZ25Y+Mzo2psbokdUhI5YkHV9EnNg9DWL+5XQeJLvswY+U+/BF7Eh65fGRbJ/YflJ IgG+sChMCMib7WCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1750445964; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rcdBWSrdiOeiTEuukcj+PpyH0Ha29phKzpomaCvvSfE=; b=YEuNqKNYxyl2y85Dnkrn+ugY06r0Wg8BQjJ/yq0G3IleH6i7Hk04SHGBXa05PtfnZlWg6n GZxmEJR2MsbD/grScqqCtM91AnyAaPPlLAwyw/RZwuAFR4Qyxs4rONPkFj83ql5VapDSzZ HaFkGzTaCMU4uni//LaOoCISMA9cM+8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1750445964; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rcdBWSrdiOeiTEuukcj+PpyH0Ha29phKzpomaCvvSfE=; b=fA3ymKZ25Y+Mzo2psbokdUhI5YkHV9EnNg9DWL+5XQeJLvswY+U+/BF7Eh65fGRbJ/YflJ IgG+sChMCMib7WCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5D41F136BA; Fri, 20 Jun 2025 18:59:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id S0ilE4uvVWjbGQAAD6G6ig (envelope-from ); Fri, 20 Jun 2025 18:59:23 +0000 Date: Fri, 20 Jun 2025 19:59:17 +0100 From: Pedro Falcato To: Lorenzo Stoakes Cc: David Hildenbrand , Andrew Morton , Vlastimil Babka , Jann Horn , "Liam R . Howlett" , Suren Baghdasaryan , Matthew Wilcox , Rik van Riel , Harry Yoo , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Jakub Matena , Wei Yang , Barry Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/11] mm/mremap: introduce more mergeable mremap via MREMAP_RELOCATE_ANON Message-ID: References: <7e51e1e2-7272-48d5-9457-40ab87ad7694@redhat.com> <76zi626uk53dtfzmezzt6cfz45ansam2gpcumddqxnipnw5jkh@qwfzoxgi255b> <68d8c7ad-aea0-4556-be63-9b67d70e4386@redhat.com> <58560256-58da-4fa6-a953-d2c4695ffba8@lucifer.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58560256-58da-4fa6-a953-d2c4695ffba8@l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iAY+HDTrSHFnzp6SeZgLgKSKizU3H 5ru2tadA fCSPlz15mmvzUnDmiGyg7av9HqQBJEY6D6DpJTvHVmpbzER4RJKahiKH9cvpFw7Y4CMg+oLlkPDl574e9olxd2H711Z5b/lmgvvCDvxbatwMR82HYAncCkhf/C+k6aeT82haJZDR1gNMPeEN+YPLYI9PdU2ya0gjF/ymiNoEvbx2wN7HS0eOQ4U7ujhhG+1mdI4e/1/hA5C1TH7h+NlaqSC7th2LcfSCINZI+TUgpcVbfos83ME3FNmQ1Ozm+d++JjN2fwemMrjIz3yUyouiLLJ/N/wxvK387nL8FAziEewQlK1WZZMAUJOnuGdJeHeEGTVzIKDmngos20G7pmJ3jR07F10tOcQ8PhP3SPMTSJN7o+UWvHeEcWMJAyLbmbxEJjCinfC+4yCYid3gqgWCNyWZmwWfnMAp1DdAryhd/YUgKepM= 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: List-Subscribe: List-Unsubscribe: On Tue, Jun 17, 2025 at 11:57:11AM +0100, Lorenzo Stoakes wrote: > On Tue, Jun 17, 2025 at 10:45:53AM +0200, David Hildenbrand wrote: > > mremap() is already an expensive operation ... so I think we need a pretty > > convincing case to make this configurable by the user at all for each > > individual mremap() invocation. > > My measurements suggest, unless you hit a very unfortunate case of -huge > faulted in range all mapped PTE- that the work involved is not all that > much more substantial in terms of order of magnitude than a normal mremap() > operation. > Could you share your measurements and/or post them on the cover letter for the next version? If indeed it makes no practical difference, maybe we could try to enable it by default and see what happens... Or: separate but maybe awful idea, but if the problem is the number of VMAs maybe we could try harder based on the map count? i.e if map_count > (max_map_count / 2), try to relocate anon. -- Pedro