Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp806844rdb; Fri, 2 Feb 2024 04:52:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsQHBMy6o/jI6Oa6GGhjGWGEOpviuUHy+YvwqCO+jYxDafL7lY4bIw7E33eeM20nX7Qngm X-Received: by 2002:a05:6358:3a0e:b0:176:916e:5d97 with SMTP id g14-20020a0563583a0e00b00176916e5d97mr7260690rwe.32.1706878370983; Fri, 02 Feb 2024 04:52:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706878370; cv=pass; d=google.com; s=arc-20160816; b=BWJW29CJy/C76Citc1k/baPYr80XivufHsqpHAZb6G7vzLF11FlJAJp/a0fO1IBEvN u30CmpG2mhFtdP4WUU9sgUc0ZH4/rSatJdeQKGRC+AufRwZ8JWcmeTkHl5Z9qOH+WXVl 9JIF4c1NzGJDloqMZsd3IS2VPUFfQmQ79hyoRhERXSQbTkW0m9KM8r/sPybGpBAKr/p9 c3Q/xCffVbaca2zbeBtviDhqOJ9hMHJuLggJhqUSReavSCJvKrg9SnUqGB8CSMxhBXzA UW46a4ShQO6Zs4ANQr1/zUHzyeMTpgW8ww9d7qTq69UVxhWMAeL3XlQgVZcL1Sz6cnHS oiUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=jdRAjeAw3jx5pOabS57BpicnOOq2A4PFxJ8UIU6HAFs=; fh=O3EL0KuAa5sQFp98nTyQsOYcJiGCxwVjB3DyYdHkF2k=; b=AG39ME5PxEDGKiy3YKA70Xhhly7npnasTkwKpIFzeJq9v6fVoYsYQIyUD7ZykuuKbZ k+y0Kf03AgdTcwtomDxV+j0UU6G22sKOrEiUx38yC7+15D/jEtQS/PQxa1ztkEUAx/3C NL5lCFe1YNe4amyprQZ/Y+YD7u2MFVzjiSJDcZHY3bFfZy0wha4eaVrqiZaadkiG44SG TkCpsnCF6eah8UEaI80PRJNLarjmO0L8RHkV6RCv0jmNb9Q2aXX4HNLQXq5r1YCQeXEJ t0Q7pmUL9kgMRI9JsNYWEtBxAncQygBmU0HZ+/1X1zyTjPTJxAxsWKWVBkeGnGvs4WiG MHNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ddKPEoG0; dkim=pass header.i=@suse.com header.s=susede1 header.b=ddKPEoG0; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-49839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com X-Forwarded-Encrypted: i=1; AJvYcCWRruM0YGUnVizMYtZows9gMEaWk4DjCZe/EeKBF6lANwANEJMt14e4byHIRSD7cRVySNnEZIefGWWBwMOkqTJqL9aKzkkgmAqysSGSMQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i7-20020a6561a7000000b005ceb19326e3si1581323pgv.251.2024.02.02.04.52.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:52:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ddKPEoG0; dkim=pass header.i=@suse.com header.s=susede1 header.b=ddKPEoG0; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-49839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C7F08B28F36 for ; Fri, 2 Feb 2024 12:28:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84D1114461A; Fri, 2 Feb 2024 12:27:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="ddKPEoG0"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="ddKPEoG0" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8E6022067 for ; Fri, 2 Feb 2024 12:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706876872; cv=none; b=LEEJgvrZeycNg3byI0i++GXPmigOTPlooXbP419kT/OsqanZa5l7xUP3VFPuKigTTk9j9AwzbZn3ncHtdGxm79ky156FTyiCDPus55OaB1hUIyqVgmvIbywzO/o5lMRqhSfxvz7HL+oVtZXZWcrgRSpKLCHJjvsq0CTu0j+GgoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706876872; c=relaxed/simple; bh=jZ2d+pd+Qi5YXcTwc4TjuggpVcRHIzgEYlE/YnBTpU0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ISzDWfgxSI799J1f3+8tl+Xm6RTseUglcWF43eEaa7I8Ko+TtsdmwABgC60HrfTYxSsZVMBGwdBgoMEp8nPvsUF/dWM3nAvtOnCbShL1G7CprlHRHj17ieb9ynbFxRZUBp6woqz0174Vie+Z7ZgC02GRZSICOJTwSpB4qP+AfGY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=ddKPEoG0; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=ddKPEoG0; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out2.suse.de (Postfix) with ESMTPS id 0FEF01F786; Fri, 2 Feb 2024 12:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1706876869; 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=jdRAjeAw3jx5pOabS57BpicnOOq2A4PFxJ8UIU6HAFs=; b=ddKPEoG0taDZU7hjv0j2UxKDTnNxCmA5n1RAQVN1Ae6M9huh9krrNJBopQIIDNpqcY0zOc tWsG9FqC0AYAEbWGafHfFGYUCgj51PscUJY1jSJhjuEszJ8jYPldpcpelAW2bNIFkv+AQW cmxS3yvzhdwJVO79cN7qwfJM34wv1XM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1706876869; 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=jdRAjeAw3jx5pOabS57BpicnOOq2A4PFxJ8UIU6HAFs=; b=ddKPEoG0taDZU7hjv0j2UxKDTnNxCmA5n1RAQVN1Ae6M9huh9krrNJBopQIIDNpqcY0zOc tWsG9FqC0AYAEbWGafHfFGYUCgj51PscUJY1jSJhjuEszJ8jYPldpcpelAW2bNIFkv+AQW cmxS3yvzhdwJVO79cN7qwfJM34wv1XM= 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 E834413A58; Fri, 2 Feb 2024 12:27:48 +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 QBroNsTfvGXUfwAAD6G6ig (envelope-from ); Fri, 02 Feb 2024 12:27:48 +0000 Date: Fri, 2 Feb 2024 13:27:48 +0100 From: Michal Hocko To: Lance Yang Cc: akpm@linux-foundation.org, zokeefe@google.com, david@redhat.com, songmuchun@bytedance.com, shy828301@gmail.com, peterx@redhat.com, minchan@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] mm/khugepaged: skip copying lazyfree pages on collapse Message-ID: References: <20240201125226.28372-1-ioworker0@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [-2.16 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RCPT_COUNT_SEVEN(0.00)[10]; FREEMAIL_TO(0.00)[gmail.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[linux-foundation.org,google.com,redhat.com,bytedance.com,gmail.com,kernel.org,kvack.org,vger.kernel.org]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.56)[98.01%] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: -2.16 On Fri 02-02-24 19:18:31, Lance Yang wrote: > IMO, since it's treated the same as pte_none, > perhaps lazyfree pages shouldn't be copied to > the new huge page. Why? The content of MADV_FREE page is valid until it is reclaimed. -- Michal Hocko SUSE Labs