Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp819351rdb; Fri, 2 Feb 2024 05:12:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdzwAxT633JCfES49Wf31lHPgJcYmwGjSyd9fOGvN2HnH7Er/7J6IpL7Bnx9lY+afWOOHU X-Received: by 2002:a05:6a00:1acf:b0:6db:957:d241 with SMTP id f15-20020a056a001acf00b006db0957d241mr2971038pfv.1.1706879558152; Fri, 02 Feb 2024 05:12:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706879558; cv=pass; d=google.com; s=arc-20160816; b=gj7VghAMjLtQK9ymX/K401hbGUqMEAMgTuCsqH/XQvK+iMy4y5RbpfIPeDcTmCRxUF wbW0fiYv7BfQFeUB42NavMRXNxHDfyR0G9z0og8UqGhb5WQBa61qJAfssGFAJveyhowS H3yhAtFg6I/+xACpGSdjfrhFBXm3R9IsS6uv3ciV2n1i79C8a5qBT19avWSZUKp289Tl dLPkpum+V2dHfAWs6UVg8E482RxbpQuyEl95fVp8JdyYUo3O8z/7gCMPB2WUzYJVD/SC 6Oz16ZrBT8V6Xan+Pumct0zGKubngefEjBXvobaRnXKd7PhDmEi35UdN3XZpuEUY4ndm mEqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=xkocaXXNFKl7hAfPf4SUUuTnxj5Wea1E5uFH8/dmago=; fh=7uzYLh8au++absgzwE1CP5RBsJNQS4OQuv0NTRsDjxo=; b=JbFm9Cjup36oLLvFld24B8q3cjd69Xq7mIvacKYCpTiCW7L3kDNOMPAdg6ceEqCMm9 BCTQCHyiaD9alCm1foZlra0LVMwEG8kq8jgtxSwoOGhKVdq2XJaQwcyOAZG/TKBQv7RG Sk1qZe9LofNBeuelFsSDsaPImR58D9uwz4vE0N/ocpTI6OaSmDMNtS/E084beinG3uv2 S1k9bOhx3KIr+/ADdLV6B2oLazGrNz5+Qk02d5C8U40MgZcNDBefji/2iNlnv9vYKONI TB+61wcKGTrLez2tMBxDWF8L9Yjt5JaMNp5PvAVIGt1TqYngMwLUWF07lpEKWB8668Vj NJog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SfEGVhzA; dkim=pass header.i=@suse.com header.s=susede1 header.b=SfEGVhzA; 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-49870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49870-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; AJvYcCUhnW/7YZ1VShn2bx1z2jtc8FJl6BNeGdtMzMgc1oVnHVSz9s38MdhdL5v3dDkgH6oW04VjRKPrGGa87banIywJZDv4ARxB+T0XfxoZJA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id o3-20020a056a001b4300b006d9bee251f7si1520461pfv.242.2024.02.02.05.12.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:12:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49870-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=SfEGVhzA; dkim=pass header.i=@suse.com header.s=susede1 header.b=SfEGVhzA; 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-49870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49870-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 198ADB24611 for ; Fri, 2 Feb 2024 12:57:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B7235253; Fri, 2 Feb 2024 12:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="SfEGVhzA"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="SfEGVhzA" 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 A6F5A4402 for ; Fri, 2 Feb 2024 12:57:38 +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=1706878660; cv=none; b=TgysQnDCXa3GCUxrmV37p7DELsEOGIn77xsOoA4iqxVCy8j1tpboJwHGiiGBVRs/Xgs/J0xUlBNPZgdHTnnxJk3uwTzzT+2R1MP6zpNr9p9zc6i5rd5EBMvJJCpjzrboWiVGZUdRUhUlCljZ/gP4MUSYeJ+xppU2wuDfQc2sOWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878660; c=relaxed/simple; bh=DogevfzWW22N8LSRvIyMD4eRCIXAec2aXHlYaoaCJl0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=j0aVq9ieAaK2UxZaoVKf4uxSugnW/TMM6GIu4UiZgGPTs5yJlc35CDl3ZAD1UkxQLfBQR6blGxmOyiwDGG67ink5cUillqk2DVFfuVuhFqkeqRPFFKcjZr22QNqvF80NzvE/ZWqsXjJzOmtaKct/i8eP4VvBhzDDD7qTPnxt9YQ= 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=SfEGVhzA; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=SfEGVhzA; 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 B476E1F788; Fri, 2 Feb 2024 12:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1706878656; 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=xkocaXXNFKl7hAfPf4SUUuTnxj5Wea1E5uFH8/dmago=; b=SfEGVhzAZZvEuFOvB6k2vXVDbElIUgKy5N5WsGyTtSH5s+cpMf/5GwpKUOfeHhHB391gcu QD6nqLBZk5NlscjCrLXvUP4j0oMcAXI7SFgGRVVx6sI6sAEd04x5v6nR+HPKtE9UEHx/12 4GO3mfh5KoGQwqDH0Njua1Nsr1ZCg98= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1706878656; 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=xkocaXXNFKl7hAfPf4SUUuTnxj5Wea1E5uFH8/dmago=; b=SfEGVhzAZZvEuFOvB6k2vXVDbElIUgKy5N5WsGyTtSH5s+cpMf/5GwpKUOfeHhHB391gcu QD6nqLBZk5NlscjCrLXvUP4j0oMcAXI7SFgGRVVx6sI6sAEd04x5v6nR+HPKtE9UEHx/12 4GO3mfh5KoGQwqDH0Njua1Nsr1ZCg98= 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 8BA1C13A58; Fri, 2 Feb 2024 12:57:36 +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 OwcUH8DmvGX6CAAAD6G6ig (envelope-from ); Fri, 02 Feb 2024 12:57:36 +0000 Date: Fri, 2 Feb 2024 13:57:35 +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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.12 / 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]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; 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(-0.28)[74.18%] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: 0.12 On Fri 02-02-24 20:52:48, Lance Yang wrote: > On Fri, Feb 2, 2024 at 8:27 PM Michal Hocko wrote: > > > > 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. > > IMO, if MADV_FREE pages are considered valid until > reclaimed, treating them the same as pte_none might > pose a conflict. What kind of conflict? -- Michal Hocko SUSE Labs