From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 837C1439325 for ; Tue, 21 Jul 2026 07:55:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784620517; cv=none; b=l2Yi9wt0ow79unrNKPY7bZgreEfW+bgOOqUJ4zQ2PBrEszoWoMYUyqB3ZcToAIhrDBg3T5bo4ssjOsLL3bi/LuxPjMaVhGs0VOLSOgzNOpUqTnnDkXNQgFY0iVg2E6RZU/GhL7nhau27jiZM5Ej8/eUABAYkDpEJ3wAi/wQITXA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784620517; c=relaxed/simple; bh=/fyuBmwDf+2NBoAiUA97wVQlsoPJEThMn5l0snSCjYk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jsX4pSd5x84WnCTlReXE8JJVa1g19RXteRnPv7Du1N82VvHa/nO8k1+ZSxgG2uupbDk8oVWiC/svFYNuOMwa3Dxa/jVzpAY++zrQHoUWtFdTYLYIJFxFXvRGODV8OaybQHvVHdYOTgkmYft5tESNfA5FXLFTQieAS7Xo9G9lChk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JwTdCDZ8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JwTdCDZ8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 174501F000E9; Tue, 21 Jul 2026 07:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784620516; bh=/fyuBmwDf+2NBoAiUA97wVQlsoPJEThMn5l0snSCjYk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=JwTdCDZ858uBa97dRIbYsqvjUYqjcK7MHEOkl8tOucsdC5ezY7XzsGSELd6WIATKd eTR4kDVQf5h7eU0RGIheIpWtuD5Q8rl+5zeSF3AfsUeBAg1wBvdJ8hWxwE45O/CMEd 0nbu71zXHs608kXZAIgGNFQb/nLL514l8xMh3mX9xWtQYHTxk4k8PAZg/nVt9dCVCG JWdy0Ay6qmN+QTFa9u4z7QHtvVyb8Qi2Hi3B/CYLZRo0jq4n1tXHFtowaiI/x8eKWw /wQcKW1CE2re47XgLv9S800evVopE2vSIn7qyMF46nYxZeZk1fviFR74mkTmEA/VKC C4aYXZaR6H+Hw== Date: Tue, 21 Jul 2026 08:54:58 +0100 From: "Lorenzo Stoakes (ARM)" To: Nico Pache Cc: Pedro Falcato , Andrew Morton , David Hildenbrand , 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: On Mon, Jul 20, 2026 at 02:14:45PM -0600, Nico Pache wrote: > On Mon, Jul 20, 2026 at 1:49 PM Pedro Falcato wrote: > > > > 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? > > Let me review your series and see what differences stand out. You > referenced part 1 of N; I think my series covers many of the other > parts. I basically broke down each stage of collapse_file() into > helpers, and cleaned up each part respectively. > > Whatever we decide, as long as collapse_file() gets the proper love im > ok with it. I did, however, communicate that I was cleaning this up to > David, Lorenzo, and others. Yeah I'm keen that we find a good compromise here, as I genuinely very much empathise with both sides of this - being 'pipped' on a series is horrible and we generally really want to avoid that. But I hope that some collaborative effort is possible here? > > > > > 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. > > Yeah that might be hard. However, there are other parts I cleaned up > that you haven't touched in this series so perhaps some of those apply > cleanly. It'd be ideal if you guys could figure out a way to combine both in a series, perhaps with Co-Dev-By or similar? > > Cheers, > -- Nico > > > > > -- > > Pedro > > > I'll leave it to you two to figure things out, I've left some review here already (the general thrust of the series is good and cleaning this... 'organically grown' code is a wonderful thing), but will pause until you figure out a way forwards. Cheers, Lorenzo