From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 61EBF34DCCD for ; Mon, 20 Jul 2026 19:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784576967; cv=none; b=EvrxjedNn0F4bNHGThyI/KaLvk9OUeZUslDRcjLMQZjm/KvV/ONaTCPqs1f3Ifl5AFdiVePS//zOsGhwaUdvQn1jswhDIA6/1xZOnb6w4S9AG74vKfiFMJYCEOowF2ww/eH7xsgN4rxoetsZveBYqauPNKxOh5CZBIVD6CwukfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784576967; c=relaxed/simple; bh=m73+KEXdX+HvyRdD58GEXxIEyALM/OtP6DB5SlJNhVo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aywehDAjb0e9VDUZKRQy79YZIHYIMAOVjuAhQw3rKyJtn7bXrPDA44vtHeg9boN2DWHEZ01o84v+M87+LlxZdav6s7ZS0YrS0jso6r5cNMOL2JzP/5I8mJvCijzSXldkHOVFIih/CwJMwAkGVSoNSfPZ3UbbryRLDgtbfktZ7AA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Qj/Mtlqt; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=zMHoX60t; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Qj/Mtlqt; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=zMHoX60t; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Qj/Mtlqt"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="zMHoX60t"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Qj/Mtlqt"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="zMHoX60t" 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-out1.suse.de (Postfix) with ESMTPS id 30D777A138; Mon, 20 Jul 2026 19:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784576964; 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=sahaS+eSnRRANxBUZMw2i+88rgrcxJQtqcGtszC7BNA=; b=Qj/MtlqtSzigt07XoXJd2XOTVfsNBPBYXpzrmvkziJ0hW88Lm1V0g9admG4giDyCkCo5fs oMz3Ak1c5MVUn/R7pfdT45gDveCCTDY5a81I2cqM8641V50rO0hRILnfUki7o0SAbaQp0L 1YdLOovscQ8nsxlp1+7/IWlbk9JJXgQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784576964; 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=sahaS+eSnRRANxBUZMw2i+88rgrcxJQtqcGtszC7BNA=; b=zMHoX60t53GzbqDKHxPsQ1jfQ6JSA4/KXRbtQ7KPCJe5ZTobD2oa7ZD31DGxGmvtDsu5kv qt/V/0NPoGSwTEDA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="Qj/Mtlqt"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=zMHoX60t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1784576964; 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=sahaS+eSnRRANxBUZMw2i+88rgrcxJQtqcGtszC7BNA=; b=Qj/MtlqtSzigt07XoXJd2XOTVfsNBPBYXpzrmvkziJ0hW88Lm1V0g9admG4giDyCkCo5fs oMz3Ak1c5MVUn/R7pfdT45gDveCCTDY5a81I2cqM8641V50rO0hRILnfUki7o0SAbaQp0L 1YdLOovscQ8nsxlp1+7/IWlbk9JJXgQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1784576964; 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=sahaS+eSnRRANxBUZMw2i+88rgrcxJQtqcGtszC7BNA=; b=zMHoX60t53GzbqDKHxPsQ1jfQ6JSA4/KXRbtQ7KPCJe5ZTobD2oa7ZD31DGxGmvtDsu5kv qt/V/0NPoGSwTEDA== 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 34123779AA; Mon, 20 Jul 2026 19:49: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 hfILCcN7Xmr0BwAAD6G6ig (envelope-from ); Mon, 20 Jul 2026 19:49:23 +0000 Date: Mon, 20 Jul 2026 20:49:21 +0100 From: Pedro Falcato To: Nico Pache Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Zi Yan , Baolin Wang , "Liam R. Howlett" , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Usama Arif , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/8] mm/khugepaged: collapse_file() cleanups Message-ID: References: <20260720142913.846902-1-pfalcato@suse.de> 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: X-Rspamd-Action: no action X-Rspamd-Queue-Id: 30D777A138 X-Spam-Flag: NO X-Spam-Score: -4.51 X-Spam-Level: X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_TWELVE(0.00)[14]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; MISSING_XM_UA(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:dkim] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org On Mon, Jul 20, 2026 at 09:21:11AM -0600, Nico Pache wrote: > On Mon, Jul 20, 2026 at 8:33 AM Pedro Falcato wrote: > > > > Here are a bunch of cleanups for collapse_file() that attempt to aid > > code readability and understanding. This is part 1 out of N, and only > > attempts to address the main collapse loop. The exit path is still a > > mess but I figure it's much easier to review if I send this batch as-is, > > versus sending the whole thing. > > Hi Pedro, > > I have already prepped a cleanup series for collapse_file(). > > I was waiting for my work here > https://lore.kernel.org/lkml/20260715025941.1571316-1-npache@redhat.com/ > to be reviewed (and in mm-unstable) before sending it out. > > Our series have several similarities; for reference, here is my version. > https://gitlab.com/npache/linux/-/commits/khugepaged_file_refactor?ref_type=heads Ugh, this is awkward. Do you have any suggestions on next steps? I can try and take in some of your work on top of this series. But that might be hairy. This situation really does suck (I've definitely been there), but I would prefer not to drop the patchset. -- Pedro