From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0856C36011 for ; Thu, 27 Mar 2025 22:27:55 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1txvhb-0002a3-2M; Thu, 27 Mar 2025 22:27:55 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1txvha-0002Zx-AS for linux-f2fs-devel@lists.sourceforge.net; Thu, 27 Mar 2025 22:27:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BQLhRRUns0wvtK+tj9shAxMJqCW3FhfLqBKTfUps+yE=; b=OMdGo3JmVTOGiYF2oFnPmU9XnR AYqQ66e+RNmTN99JYrC8PWJc8KVDBwwq6TwG2XrvBMcbUNFrF+7g+ub9hgOFzyTrytVi3cwFluPhg tcsZYaRiThm7R/oqA5nitTDKhg+KGnUZIrk6xf9U0JI9xnqgXKfRZsumwGl3vnJToL8Q=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BQLhRRUns0wvtK+tj9shAxMJqCW3FhfLqBKTfUps+yE=; b=i22dCaqUlFPMQesqDSX3aJbTPL uSxyHoCF+PaeQyDvEHwI6Eh2kW2rcThX7Sl1hwQYZ8hlR3QQzkd4zMYm5NLXm0jDjrTVhvnEnkjtb QN/ov3Za1IJ4ajtMX4nMFef/kCR7Idrf+GCCbFJbZ5kdlBROATZYMUWXu6Oa+s0vfnhU=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1txvhZ-0004ov-Gw for linux-f2fs-devel@lists.sourceforge.net; Thu, 27 Mar 2025 22:27:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id AE1276113B; Thu, 27 Mar 2025 22:27:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E4EAC4CEDD; Thu, 27 Mar 2025 22:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743114462; bh=FzIjcx9dBnfY4ctyzoIH3XwzJbef24djr7Tb+00ZDJk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ppS7nWzqshJOtPe5St3wFnGfv9q45JbWKKvTn5/5mr7PaBtQ4goFI/XReyZxQZtOT g8QOonmhqMCFDEhPyran1KmrG60CzHIaZpT9kHt+W3qNOmCgh/WywpMEDn9Fz74v2V /LS7v1BzOgeRJk5BSvpihlI81ZTkK9EObGaiFzfwwir9jEC8o+8Rbwe6yFwkz3gGW2 /x56F57URYEaWr9Dd2BeGeOaajlAHU6hQfsPEgRL4CnB0fSSljPULzhU2f7nTKRkOZ cCmrJ02Kc4XRH8Yo37xgsIWiiVV0P53R3LjkWQs9r05lmZQr096HYCr1cWrCVGpoJL C1k8BEDzdVxJA== Date: Thu, 27 Mar 2025 22:27:40 +0000 To: Matthew Wilcox Message-ID: References: <20250307182151.3397003-1-willy@infradead.org> <174172263873.214029.5458881997469861795.git-patchwork-notify@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1txvhZ-0004ov-Gw Subject: Re: [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jaegeuk Kim via Linux-f2fs-devel Reply-To: Jaegeuk Kim Cc: linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 03/26, Matthew Wilcox wrote: > On Fri, Mar 14, 2025 at 09:38:15PM +0000, Jaegeuk Kim wrote: > > On 03/14, Matthew Wilcox wrote: > > > Unfortunately, I thnk I have to abandon this effort. It's only going > > > to make supporting large folios harder (ie there would then need to be > > > an equivalently disruptive series adding support for large folios). > > > > > > The fundamental problem is that f2fs has no concept of block size != > > > PAGE_SIZE. So if you create a filesystem on a 4kB PAGE_SIZE kernel, > > > you can't mount it on a 16kB PAGE_SIZE kernel. An example: > > > > > > int f2fs_recover_inline_xattr(struct inode *inode, struct page *page) > > > { > > > struct f2fs_inode *ri; > > > ipage = f2fs_get_node_page(F2FS_I_SB(inode), inode->i_ino); > > > ri = F2FS_INODE(page); > > > > > > so an inode number is an index into the filesystem in PAGE_SIZE units, > > > not in filesystem block size units. Fixing this is a major effort, and > > > I lack the confidence in my abilities to do it without breaking anything. > > > > > > As an outline of what needs to happen, I think that rather than passing > > > around so many struct page pointers, we should be passing around either > > > folio + offset, or we should be passing around struct f2fs_inode pointers. > > > My preference is for the latter. We can always convert back to the > > > folio containing the inode if we need to (eg to mark it dirty) and it > > > adds some typesafety by ensuring that we're passing around pointers that > > > we believe belong to an inode and not, say, a struct page which happens > > > to contain a directory entry. > > > > > > This is a monster task, I think. I'm going to have to disable f2fs > > > from testing with split page/folio. This is going to be a big problem > > > for Android. > > > > I see. fyi; in Android, I'm thinking to run 16KB page kernel with 16KB format > > natively to keep block_size = PAGE_SIZE. Wasn't large folio to support a set > > of pages while keeping block_size = PAGE_SIZE? > > Oh, I think I do see a possible argument for continuing this work. > > If we have an f2fs filesystem with a 16kB block size, we can use order-0 > folios with a 16kB PAGE_SIZE kernel, and if we want to mount it on a > kernel with a 4kB PAGE_SIZE kernel, then we can use order-2 folios to > do that. > > Is that a useful improvement to f2fs? It's not really the intent of > large folios; it's supposed to be used to support arbitrary order folios. > But we have all the pieces in place such that we could tell the page > cache min-order = max-order = 2. It may be helpful in case where someone wants to try 4KB page kernel back, after Android ships 16KB page/block products. Does it require a big surgery? _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0EF6C1DF75C for ; Thu, 27 Mar 2025 22:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743114463; cv=none; b=tu5PcoAZrhO3fp2xS45nhHr4ftq8M1cf2hFtWHbA7BYLqREat9+rfHXavjlZYn69X+MGk+SIll4lIE1F5egE2h1lp8pjs+y0A/dQZN5ozGo2UmEWj8nkcM9LqttWwpJNKZ1WrGAjvl+FdfZi6yyijkX9JoXNlpRtn/WaIg4BnRg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743114463; c=relaxed/simple; bh=FzIjcx9dBnfY4ctyzoIH3XwzJbef24djr7Tb+00ZDJk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XagNUN8qACkboEPKyI1HA+/RvT83FLAOTaKNhNEIe/rdZ3B1IZUqeWweVtOaf7TBnyhVG2UIfSn1PJXo4xbDlzABvzvfCfN3/7oS+1YcbV8qwyemHYgR4UFGp02dDtxgViF5anl11Kd6utiGu9mhw3eAj7zLo8Jw17fHNy7NFrw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ppS7nWzq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ppS7nWzq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E4EAC4CEDD; Thu, 27 Mar 2025 22:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743114462; bh=FzIjcx9dBnfY4ctyzoIH3XwzJbef24djr7Tb+00ZDJk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ppS7nWzqshJOtPe5St3wFnGfv9q45JbWKKvTn5/5mr7PaBtQ4goFI/XReyZxQZtOT g8QOonmhqMCFDEhPyran1KmrG60CzHIaZpT9kHt+W3qNOmCgh/WywpMEDn9Fz74v2V /LS7v1BzOgeRJk5BSvpihlI81ZTkK9EObGaiFzfwwir9jEC8o+8Rbwe6yFwkz3gGW2 /x56F57URYEaWr9Dd2BeGeOaajlAHU6hQfsPEgRL4CnB0fSSljPULzhU2f7nTKRkOZ cCmrJ02Kc4XRH8Yo37xgsIWiiVV0P53R3LjkWQs9r05lmZQr096HYCr1cWrCVGpoJL C1k8BEDzdVxJA== Date: Thu, 27 Mar 2025 22:27:40 +0000 From: Jaegeuk Kim To: Matthew Wilcox Cc: chao@kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 0/4] f2fs: Remove uses of writepage Message-ID: References: <20250307182151.3397003-1-willy@infradead.org> <174172263873.214029.5458881997469861795.git-patchwork-notify@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@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: On 03/26, Matthew Wilcox wrote: > On Fri, Mar 14, 2025 at 09:38:15PM +0000, Jaegeuk Kim wrote: > > On 03/14, Matthew Wilcox wrote: > > > Unfortunately, I thnk I have to abandon this effort. It's only going > > > to make supporting large folios harder (ie there would then need to be > > > an equivalently disruptive series adding support for large folios). > > > > > > The fundamental problem is that f2fs has no concept of block size != > > > PAGE_SIZE. So if you create a filesystem on a 4kB PAGE_SIZE kernel, > > > you can't mount it on a 16kB PAGE_SIZE kernel. An example: > > > > > > int f2fs_recover_inline_xattr(struct inode *inode, struct page *page) > > > { > > > struct f2fs_inode *ri; > > > ipage = f2fs_get_node_page(F2FS_I_SB(inode), inode->i_ino); > > > ri = F2FS_INODE(page); > > > > > > so an inode number is an index into the filesystem in PAGE_SIZE units, > > > not in filesystem block size units. Fixing this is a major effort, and > > > I lack the confidence in my abilities to do it without breaking anything. > > > > > > As an outline of what needs to happen, I think that rather than passing > > > around so many struct page pointers, we should be passing around either > > > folio + offset, or we should be passing around struct f2fs_inode pointers. > > > My preference is for the latter. We can always convert back to the > > > folio containing the inode if we need to (eg to mark it dirty) and it > > > adds some typesafety by ensuring that we're passing around pointers that > > > we believe belong to an inode and not, say, a struct page which happens > > > to contain a directory entry. > > > > > > This is a monster task, I think. I'm going to have to disable f2fs > > > from testing with split page/folio. This is going to be a big problem > > > for Android. > > > > I see. fyi; in Android, I'm thinking to run 16KB page kernel with 16KB format > > natively to keep block_size = PAGE_SIZE. Wasn't large folio to support a set > > of pages while keeping block_size = PAGE_SIZE? > > Oh, I think I do see a possible argument for continuing this work. > > If we have an f2fs filesystem with a 16kB block size, we can use order-0 > folios with a 16kB PAGE_SIZE kernel, and if we want to mount it on a > kernel with a 4kB PAGE_SIZE kernel, then we can use order-2 folios to > do that. > > Is that a useful improvement to f2fs? It's not really the intent of > large folios; it's supposed to be used to support arbitrary order folios. > But we have all the pieces in place such that we could tell the page > cache min-order = max-order = 2. It may be helpful in case where someone wants to try 4KB page kernel back, after Android ships 16KB page/block products. Does it require a big surgery?