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 73CF42E5B2A; Tue, 26 May 2026 03:47:48 +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=1779767269; cv=none; b=Fhkn9lTudLqasg3u6/PQ+PyGtBZzb1wEG925cGrQdBLBmZsvvCnPrATIwLBnk1h5OF1Owqp/oD+FZ4BbrwvSKYFKp14/9IPjpD+iWWkV3YhvCIMKfXwaDaGHFjZn8f82FaKjdWZqO3GO/5zF8FSMxdjXyCZQGazpERgvBwGc4+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779767269; c=relaxed/simple; bh=rS3J5xEsHvuFU6637V2Jj3mVEfTmVLyNLytSDMCGf74=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pREIakERpymy0xlDPz5vk0MDlHbQGG/yCoazH/3h5Q6KYFXvuguh1HdPTCQ4lJfqS4eBb6ASPTJBq69SwxRcd9K91pMf8W3rXnGGfcAeDcKbMutaSbDATTl8CMU1wuBF2wEIVQDw0ZHWrUrXAK47rInt7rZOzkRHt7TlM4kyJDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nmtVWfiM; 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="nmtVWfiM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7B481F000E9; Tue, 26 May 2026 03:47:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779767268; bh=DxyY+bYQ0Eo648ljGRU7X1Wi24vXYHPFWC0Fu00rbQo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nmtVWfiMTmNf6D+IX+7K3ePXqNYLegK8TT6JQ1uNfPCg1/lZNl1hdy2I9ZyVlBdqc XUGbbL3VR3ElWJPiiOgM97mnVnP0BqU2QD0SV2hFa2Eib8ci6/5rLW9rls6OtN4nk3 uIGXqzOAXE8tKcd13d5ANdSxe7aDhjCbF1akk4opPo99gdBrvU8MtwuU7j2b1g+TXX fqYRTf5visUjVSFpVAG9EwuqGwtJkX1CPP6lnk6zNbZpnGVVigaaOGODi3dYe5/kPY t5yaYxKVlUmVmfPF7Mr+6NnK8zrgsv5stXOUaO6dCmRV40JC5G6bXFk3A4WQ5NnPEz s9pYjIfB/RoEQ== Date: Tue, 26 May 2026 03:47:46 +0000 From: Jaegeuk Kim To: Matthew Wilcox Cc: Theodore Tso , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Christoph Hellwig , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Akilesh Kailash , Christian Brauner Subject: Re: [f2fs-dev] [PATCH v2] f2fs: another way to set large folio by remembering inode number Message-ID: References: <20260521155748.GA79343@macsyma-wired.lan> 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 05/26, Matthew Wilcox wrote: > On Tue, May 26, 2026 at 01:21:33AM +0000, Jaegeuk Kim wrote: > > On 05/24, Christoph Hellwig wrote: > > > On Fri, May 22, 2026 at 02:04:59PM +0000, Jaegeuk Kim wrote: > > > > This was a quick buddyinfo right after booting the device. > > > > > > > > Before: > > > > Node 0, zone Normal 22684 42284 28704 16901 9515 4566 1854 673 181 36 758 > > > > > > > > After disabling EROFS large folio: > > > > Node 0, zone Normal 8486 4732 2175 1161 697 272 82 19 3 1 856 > > > > > > And what are you trying to say us with that? > > > > This means, high-order pages were used up by EROFS which sets large folio by > > default. So, I wanted to say the concern was based on actual data which was what > > Mattew asked. > > This isn't that though. What you actually need is to show that high order > allocations are _failing_. The MM is far more complicated than you seem > to understand. There isn't a fixed number of large folios available; > when we try to allocate memory, we do reclaim. And if there's large > folios on the LRU list, you'll get them. > > If what you want is large folios readily available, then what you want > is large folios used _everywhere_ because then they're easy to get! > If there's small folios in use, you need to reclaim a lot of memory in > order to reassemble large folios (it's the birthday paradox, similar to > the hash collision problem). Thanks for the feedback. Actually, I tried to do compact_memory before doing read() for AI loading, but I got complaints where it took hundreds milliseconds to run that compact_memory. Is there a good way to secure high-order pages before that read()? It was quite hard to project when it will happen. > > > _______________________________________________ > 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 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 113F1CD5BCF for ; Tue, 26 May 2026 03:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ivyfFn8c4Sctw+OqIU2ZNy7r09nNfuw+acL40l0Jcnk=; b=JmSfRw1NANeBt4HEtmNwt+Wojk oF43EtzaHMsv82DCuCfN3U0dxc5mepmxBOj/8GLwzhw0UzrX/jS43Pf6MfK0+FvrH8ycX31EDPmfP AMRjA9VKEA5J7cIzf1229VOOe/5n3VmMESF4uPipfrrabVEIOXK2vPS7vAED9z7snr1o=; 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 1wRilt-0006HR-Il; Tue, 26 May 2026 03:48:01 +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 1wRils-0006HD-61 for linux-f2fs-devel@lists.sourceforge.net; Tue, 26 May 2026 03:48:00 +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=DxyY+bYQ0Eo648ljGRU7X1Wi24vXYHPFWC0Fu00rbQo=; b=MNtdLhoWNeWZfNMIBqLGAlp3Wf 43A/mRq0Adp/TD4wCAnGhhEa1lLXTOVokrFLW7nuKpiP6heeYpqZx+HScmD4W8+do0kGXltSMhQXe 19QTezymxT4tHY3Q202dD6BPIy3B79UwzfCK3V8icdQ9igfC3GBhkEDcIr/oi8dMi0po=; 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=DxyY+bYQ0Eo648ljGRU7X1Wi24vXYHPFWC0Fu00rbQo=; b=ES2tC4F1gC8XsDglz9XJXvBYQL YR2kkblnqw88NlAbWOemud1BYoA3Xt8aClQQNiSw6BZFAAIoAHszdShjSxcBzmW1u3GxS7Z/Iyd6d MO22LYpJUrzbXi/GBr2xngYTaUlUYjj80vXBId9b+VcbUwysNITSfESo3wNfyA+Usxto=; Received: from sea.source.kernel.org ([172.234.252.31]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wRilq-00078z-9R for linux-f2fs-devel@lists.sourceforge.net; Tue, 26 May 2026 03:48:00 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 36CBF43615; Tue, 26 May 2026 03:47:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7B481F000E9; Tue, 26 May 2026 03:47:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779767268; bh=DxyY+bYQ0Eo648ljGRU7X1Wi24vXYHPFWC0Fu00rbQo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nmtVWfiMTmNf6D+IX+7K3ePXqNYLegK8TT6JQ1uNfPCg1/lZNl1hdy2I9ZyVlBdqc XUGbbL3VR3ElWJPiiOgM97mnVnP0BqU2QD0SV2hFa2Eib8ci6/5rLW9rls6OtN4nk3 uIGXqzOAXE8tKcd13d5ANdSxe7aDhjCbF1akk4opPo99gdBrvU8MtwuU7j2b1g+TXX fqYRTf5visUjVSFpVAG9EwuqGwtJkX1CPP6lnk6zNbZpnGVVigaaOGODi3dYe5/kPY t5yaYxKVlUmVmfPF7Mr+6NnK8zrgsv5stXOUaO6dCmRV40JC5G6bXFk3A4WQ5NnPEz s9pYjIfB/RoEQ== Date: Tue, 26 May 2026 03:47:46 +0000 To: Matthew Wilcox Message-ID: References: <20260521155748.GA79343@macsyma-wired.lan> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1wRilq-00078z-9R Subject: Re: [f2fs-dev] [PATCH v2] f2fs: another way to set large folio by remembering inode number 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: Theodore Tso , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Christoph Hellwig , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Akilesh Kailash , Christian Brauner Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 05/26, Matthew Wilcox wrote: > On Tue, May 26, 2026 at 01:21:33AM +0000, Jaegeuk Kim wrote: > > On 05/24, Christoph Hellwig wrote: > > > On Fri, May 22, 2026 at 02:04:59PM +0000, Jaegeuk Kim wrote: > > > > This was a quick buddyinfo right after booting the device. > > > > > > > > Before: > > > > Node 0, zone Normal 22684 42284 28704 16901 9515 4566 1854 673 181 36 758 > > > > > > > > After disabling EROFS large folio: > > > > Node 0, zone Normal 8486 4732 2175 1161 697 272 82 19 3 1 856 > > > > > > And what are you trying to say us with that? > > > > This means, high-order pages were used up by EROFS which sets large folio by > > default. So, I wanted to say the concern was based on actual data which was what > > Mattew asked. > > This isn't that though. What you actually need is to show that high order > allocations are _failing_. The MM is far more complicated than you seem > to understand. There isn't a fixed number of large folios available; > when we try to allocate memory, we do reclaim. And if there's large > folios on the LRU list, you'll get them. > > If what you want is large folios readily available, then what you want > is large folios used _everywhere_ because then they're easy to get! > If there's small folios in use, you need to reclaim a lot of memory in > order to reassemble large folios (it's the birthday paradox, similar to > the hash collision problem). Thanks for the feedback. Actually, I tried to do compact_memory before doing read() for AI loading, but I got complaints where it took hundreds milliseconds to run that compact_memory. Is there a good way to secure high-order pages before that read()? It was quite hard to project when it will happen. > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel