Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2828331lqp; Mon, 25 Mar 2024 10:17:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVx2non8/AeIgXaNtTWEUXKw8uuDIaoNSnbCYafT+PtJwUzi9s1JDT5j/ql15DUI8e1QhTf6WEczgj4XbI0V/1vNM/LPhUCQLaISV0tjw== X-Google-Smtp-Source: AGHT+IGrIbU62eaWhp04DVTHnuJhd3TbmIDQXfb3PC20JFuIEeTwYLmS3BJUjabeHpwzrWhZuJFH X-Received: by 2002:a2e:be9a:0:b0:2d6:db84:5e93 with SMTP id a26-20020a2ebe9a000000b002d6db845e93mr2191181ljr.47.1711387046386; Mon, 25 Mar 2024 10:17:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711387046; cv=pass; d=google.com; s=arc-20160816; b=g26LuP9zQDc1H6GgD4lu64yrFZGcziIBuoaOY1IWvMA8646BnTllI5lWH/WcOoxiaL 51eG87pn4FKSTpySDDBZhSEY6M/X/ao5xNJp1iwct+FA4C3bKisNlBs1v2L77QEBil4T 9zYxrho6TWK+A4d+EFjQt+nKNx/6OUL/8o73vodtiw2LN2dHh5I7L0LIjaMUkM7tcv3W MTu4NO/VZGmRWQ5Y3SpomwoK7HNuxIOzi7CfljJawQoSrUl689HCE+3EnpgT1zGDGjC4 bIAk+13rLqEeuxEIUeaAapOrmPL/5tsmBhrxm8DcBmVE7bl1guFZ+EpMkmHeFw0QqzJf 5cwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=c6UdZw/G7kV8+imSHh6TIPRYUBq5OCd52fb0mHOJXzQ=; fh=9vOKXHL6fO/AF8FXvDu9yXhNS2K6dIUKa5pMm3jPSHM=; b=SUqiC/UlUtUjWmsZ0vUeGNOQ5WGnNDVDW5gLUAxWf7jnKBFfa7HeCg9CwViNqr+5Ry fiqmLVKyN1WCCd6Vio86HLLZaQzMGhMvdjFGfpwH14lcFn/Xm1Ash+JrXW8sBaA9VhsN bqKlVVNY2g9oSKvkdB2ThxuqLE9b8ks4rfUPbjNWAlVGmCaycxllaQr8Wmx0LBNAo02A 7aAxJqzzFGrkbAgtTKe7YPd+JVG/gRx0GAlPXaAR2VZn4XUH/4KfuQ1HFx2et46ctSVo HzLZOhGieoNPxI/HUZhI0QpVq6Q5i7M9ThD3BW8me2CNpBDltLEsvicLms0MkUOxFKCe 3sBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Ta4Jy1+l; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Ta4Jy1+l; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-117421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117421-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d14-20020a056402400e00b0056c0906b2b8si1560438eda.661.2024.03.25.10.17.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 10:17:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Ta4Jy1+l; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Ta4Jy1+l; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-117421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117421-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id AF1931F3E146 for ; Mon, 25 Mar 2024 17:17:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 084C415350A; Mon, 25 Mar 2024 15:57:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="Ta4Jy1+l"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="u3yXqXNA"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="Ta4Jy1+l"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="u3yXqXNA" 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 6479D15250B for ; Mon, 25 Mar 2024 15:57:00 +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=1711382222; cv=none; b=AJD3kiMAOB34KA1rl8Xf9BMt/S35X1Vq3gMQUuHWGehCUD//8GjhAEK2/rYPqTHnXnNCsiXfHi3qJYqD8pQMsbFplO9fjFcHpOy3u8jcOMQxVhoQW5+c2aAP0DIkHuoH3wpgEB4sh+87CYSBYXp42d+zbUuxborEXJ+PzTqeXg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711382222; c=relaxed/simple; bh=ljfdK/CVngTKqGJljr/DtWtTghZNbfd10iwQCKtdKFY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=llcDgkrJVq8Ldn7Nlm0hWE7G0rssONRcdef237B2PHuJl+GWGn+wpehHJNJaYwjO8pO61ReYdiIdXJOjOAICSvO7BA29qLxivq1rjth2DEGW3ZKxPVLESO+H2wGhUR4fDI9KdhkZcH8gvszmA8Ja1DhGHDDEdqJwUDX+LupyonM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=Ta4Jy1+l; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=u3yXqXNA; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=Ta4Jy1+l; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=u3yXqXNA; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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 73D6F5BE09; Mon, 25 Mar 2024 15:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1711382218; 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=c6UdZw/G7kV8+imSHh6TIPRYUBq5OCd52fb0mHOJXzQ=; b=Ta4Jy1+lCvNxvUYujjOdB+EaSHXgKQgKBYDBU6/ZEN0kTO5/0LhkNqixgGtIlb8biZI3mY p7j3MHptwOWCLFeq8u8wplvdnzUZ8pg6JK+c14UAT3FwFjXznxOdtkjdgbHK6c4Z2c4sXr G4g0X3YcrsRxeqIOc78lwTE1eZ5yNW8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1711382218; 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=c6UdZw/G7kV8+imSHh6TIPRYUBq5OCd52fb0mHOJXzQ=; b=u3yXqXNAFcefQn/9NMdIUdLKLQFz+Ekx9P7zjmKRn1nl1lB3ksuVKP8O+nonl1Q8gECxHo vbto++V/zu75NGAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1711382218; 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=c6UdZw/G7kV8+imSHh6TIPRYUBq5OCd52fb0mHOJXzQ=; b=Ta4Jy1+lCvNxvUYujjOdB+EaSHXgKQgKBYDBU6/ZEN0kTO5/0LhkNqixgGtIlb8biZI3mY p7j3MHptwOWCLFeq8u8wplvdnzUZ8pg6JK+c14UAT3FwFjXznxOdtkjdgbHK6c4Z2c4sXr G4g0X3YcrsRxeqIOc78lwTE1eZ5yNW8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1711382218; 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=c6UdZw/G7kV8+imSHh6TIPRYUBq5OCd52fb0mHOJXzQ=; b=u3yXqXNAFcefQn/9NMdIUdLKLQFz+Ekx9P7zjmKRn1nl1lB3ksuVKP8O+nonl1Q8gECxHo vbto++V/zu75NGAA== 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 61812137C4; Mon, 25 Mar 2024 15:56:58 +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 xhBKF8qeAWbjDwAAD6G6ig (envelope-from ); Mon, 25 Mar 2024 15:56:58 +0000 Message-ID: <1ad38cac-e90d-4d9a-bf5e-afbcf6ca5bc5@suse.cz> Date: Mon, 25 Mar 2024 16:56:58 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/10] mm: page_alloc: optimize free_unref_folios() Content-Language: en-US To: Johannes Weiner , Andrew Morton Cc: Mel Gorman , Zi Yan , "Huang, Ying" , David Hildenbrand , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240320180429.678181-1-hannes@cmpxchg.org> <20240320180429.678181-3-hannes@cmpxchg.org> From: Vlastimil Babka In-Reply-To: <20240320180429.678181-3-hannes@cmpxchg.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Ta4Jy1+l; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=u3yXqXNA X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-2.31 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; TO_DN_SOME(0.00)[]; DWL_DNSWL_BLOCKED(0.00)[suse.cz:dkim]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.cz:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_SEVEN(0.00)[8]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; BAYES_HAM(-0.81)[84.89%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:dkim,suse.cz:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.31 X-Rspamd-Queue-Id: 73D6F5BE09 X-Spam-Flag: NO On 3/20/24 7:02 PM, Johannes Weiner wrote: > Move direct freeing of isolated pages to the lock-breaking block in > the second loop. This saves an unnecessary migratetype reassessment. > > Minor comment and local variable scoping cleanups. > > Suggested-by: Vlastimil Babka > Tested-by: "Huang, Ying" > Signed-off-by: Johannes Weiner Reviewed-by: Vlastimil Babka