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 3C46B15B971; Wed, 19 Feb 2025 09:38:23 +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=1739957904; cv=none; b=ncq7NJgalyvsVEO7PRVdLWXmE8CVKOThWEK5yt22cFIk7KilMcXYV6LUADUtVFT0Kp7s43sgHzjzztBm7SdvRI5Z8v7vgv6xZEFNOYCZSHA9/NRc/wAYju2qr29oKGaJIV78vMPwhyBusVMCV4UbwtbWse8FzxelwQe89FmTeYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739957904; c=relaxed/simple; bh=80I3NFEQ9dB3idbQ3rrlutO1WpxNEwV3ESxpvEHssw8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GCAPEHz8CWug/WFODb9ulfYVJSZAm2LMR9eTSEI00dczsLlCFNSeDP/ZdIFRuHHRhsMv2MHbhYrUKbJjQ0PaErgSZvRswIKtGOVM5jDhYzPbEqCru5Q2l8jSrSGby97iD+f5uLWCOME0QDLVhQ160X0MzRij93EGfowPGLvoGY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mk4X7I+4; 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="Mk4X7I+4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D3B1C4CED1; Wed, 19 Feb 2025 09:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739957903; bh=80I3NFEQ9dB3idbQ3rrlutO1WpxNEwV3ESxpvEHssw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mk4X7I+4NK641JPh0lH3mxXQjPoMemeHNJVvxuFmmLHC/ixCa1WumSq6dDN+UTlpw zpUgxeiJXqYBElyQ0DUuYW0guCtjDYpCi78mBTZdKc1ZYh1YOvEi9mJvXP9b6EHWlm YQERNL01Ou2rIWZUSUECfVGTKQQXNoBJ3nDyfpn9bhl6froDTMMH46SmIILX7oxuAg Gc9nPV0WuyOoDvloGJC95f13CxxB9MO5/fFpM0spaDwQ25NgZy/oitF3thNmdPPSOc 4MrXUl8X5T49bOg9sM1P1IOiNOngbfg1IgoTW8bfr/EAseOp0qJHA7zCpi7XDqslBr ZZRGTJCy24gpQ== Date: Wed, 19 Feb 2025 09:38:21 +0000 From: Jaegeuk Kim To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org Subject: Re: [PATCH 0/2 v9] reclaim file-backed pages given POSIX_FADV_NOREUSE Message-ID: References: <20250212023518.897942-1-jaegeuk@kernel.org> Precedence: bulk X-Mailing-List: linux-api@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 02/18, Christoph Hellwig wrote: > This still has a file system sysfs HACK, you're still not Ccing the > right list, etc. > > Can you pleae at least try to get it right? I was modifying the patch having 1) declaring a static global list, 2) adding some fields to superblock and inode structures to keep the given range in the inode through fadvise, 3) adding hooks in evict_inode to handle the list, 4) exploring which sysfs entry in MM to reclaim them explicitly. But, I stopped at some point, as it looks not good at all. Moreover, I started to be questioning why not just doing in F2FS back, given sementically I didn't change anything on general behavior of fadvise(POSIX_FADV_NOREUSE), IIUC, which moves pages back to LRU. In addiiton to that, I'd like to keep the range hint in a filesystem and provide a sysfs entry to manage the hints additionally. In addition, I don't think there's rule that filesystem cannot reclaim file-back pages, as it just uses the exported symbol that all filesystems are using in various different purpose. Hence, I don't get the point which is wrong. Thanks, > > On Wed, Feb 12, 2025 at 02:31:55AM +0000, Jaegeuk Kim wrote: > > This patch series does not add new API, but implements POSIX_FADV_NOREUSE where > > it keeps the page ranges in the f2fs superblock and add a way for users to > > reclaim the pages manually. > > > > Change log from v8: > > - remove new APIs, but use fadvise(POSIX_FADV_NOREUSE) > > > > Jaegeuk Kim (2): > > f2fs: keep POSIX_FADV_NOREUSE ranges > > f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages > > > > Documentation/ABI/testing/sysfs-fs-f2fs | 7 ++ > > fs/f2fs/debug.c | 3 + > > fs/f2fs/f2fs.h | 14 +++- > > fs/f2fs/file.c | 60 +++++++++++++++-- > > fs/f2fs/inode.c | 14 ++++ > > fs/f2fs/shrinker.c | 90 +++++++++++++++++++++++++ > > fs/f2fs/super.c | 1 + > > fs/f2fs/sysfs.c | 63 +++++++++++++++++ > > 8 files changed, 246 insertions(+), 6 deletions(-) > > > > -- > > 2.48.1.601.g30ceb7b040-goog > > > > > ---end quoted text--- 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 CCBE4C021B0 for ; Wed, 19 Feb 2025 09:38:38 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tkgXN-0001iY-5R; Wed, 19 Feb 2025 09:38:36 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tkgXL-0001iR-Tj for linux-f2fs-devel@lists.sourceforge.net; Wed, 19 Feb 2025 09:38:35 +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=c/CteVhV3+o2NFoojWeZ9o5NAWQUMvgTRUAkB89CE3w=; b=MZofaklqdrFkfNaBxZQl4mRUDj tQoizMAUDEoLC+SZPU8Lmpi99qEVAGAdWGX+laydA1gg62jV4RazE9MPG3gz+fquaM1riQl8u7+1K 7Sf1l9HmDfYQeD+/f60B/QbC5iqJbal4xWi2cuNUrAJNm2IoJZDRhfJcE+lWOMCFK7Ic=; 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=c/CteVhV3+o2NFoojWeZ9o5NAWQUMvgTRUAkB89CE3w=; b=Y5fuK0xtOr6ZKJY4p5iLar7txd DdRYq3LDXNYnpe7LxNr+oEzqW+JKt58i0JPFBs44jAUXylFVAemDcIzwfT9mJoqNn6kn/64XuB2Cc gftO90KGDUtUwm7+i/4ldS0YVErkcXWYz9ItH3Rh6BZtLccf3qHqzHOCtPvOLoz5O6FA=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1tkgXK-0002uc-Cy for linux-f2fs-devel@lists.sourceforge.net; Wed, 19 Feb 2025 09:38:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CDCD65C5687; Wed, 19 Feb 2025 09:37:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D3B1C4CED1; Wed, 19 Feb 2025 09:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739957903; bh=80I3NFEQ9dB3idbQ3rrlutO1WpxNEwV3ESxpvEHssw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mk4X7I+4NK641JPh0lH3mxXQjPoMemeHNJVvxuFmmLHC/ixCa1WumSq6dDN+UTlpw zpUgxeiJXqYBElyQ0DUuYW0guCtjDYpCi78mBTZdKc1ZYh1YOvEi9mJvXP9b6EHWlm YQERNL01Ou2rIWZUSUECfVGTKQQXNoBJ3nDyfpn9bhl6froDTMMH46SmIILX7oxuAg Gc9nPV0WuyOoDvloGJC95f13CxxB9MO5/fFpM0spaDwQ25NgZy/oitF3thNmdPPSOc 4MrXUl8X5T49bOg9sM1P1IOiNOngbfg1IgoTW8bfr/EAseOp0qJHA7zCpi7XDqslBr ZZRGTJCy24gpQ== Date: Wed, 19 Feb 2025 09:38:21 +0000 To: Christoph Hellwig Message-ID: References: <20250212023518.897942-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1tkgXK-0002uc-Cy Subject: Re: [f2fs-dev] [PATCH 0/2 v9] reclaim file-backed pages given POSIX_FADV_NOREUSE 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-mm@kvack.org, linux-api@vger.kernel.org, linux-kernel@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 02/18, Christoph Hellwig wrote: > This still has a file system sysfs HACK, you're still not Ccing the > right list, etc. > > Can you pleae at least try to get it right? I was modifying the patch having 1) declaring a static global list, 2) adding some fields to superblock and inode structures to keep the given range in the inode through fadvise, 3) adding hooks in evict_inode to handle the list, 4) exploring which sysfs entry in MM to reclaim them explicitly. But, I stopped at some point, as it looks not good at all. Moreover, I started to be questioning why not just doing in F2FS back, given sementically I didn't change anything on general behavior of fadvise(POSIX_FADV_NOREUSE), IIUC, which moves pages back to LRU. In addiiton to that, I'd like to keep the range hint in a filesystem and provide a sysfs entry to manage the hints additionally. In addition, I don't think there's rule that filesystem cannot reclaim file-back pages, as it just uses the exported symbol that all filesystems are using in various different purpose. Hence, I don't get the point which is wrong. Thanks, > > On Wed, Feb 12, 2025 at 02:31:55AM +0000, Jaegeuk Kim wrote: > > This patch series does not add new API, but implements POSIX_FADV_NOREUSE where > > it keeps the page ranges in the f2fs superblock and add a way for users to > > reclaim the pages manually. > > > > Change log from v8: > > - remove new APIs, but use fadvise(POSIX_FADV_NOREUSE) > > > > Jaegeuk Kim (2): > > f2fs: keep POSIX_FADV_NOREUSE ranges > > f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages > > > > Documentation/ABI/testing/sysfs-fs-f2fs | 7 ++ > > fs/f2fs/debug.c | 3 + > > fs/f2fs/f2fs.h | 14 +++- > > fs/f2fs/file.c | 60 +++++++++++++++-- > > fs/f2fs/inode.c | 14 ++++ > > fs/f2fs/shrinker.c | 90 +++++++++++++++++++++++++ > > fs/f2fs/super.c | 1 + > > fs/f2fs/sysfs.c | 63 +++++++++++++++++ > > 8 files changed, 246 insertions(+), 6 deletions(-) > > > > -- > > 2.48.1.601.g30ceb7b040-goog > > > > > ---end quoted text--- _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel