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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E389C48BF6 for ; Thu, 29 Feb 2024 04:20:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 94E2D6B009C; Wed, 28 Feb 2024 23:20:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8FD836B009E; Wed, 28 Feb 2024 23:20:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7EBEB6B009F; Wed, 28 Feb 2024 23:20:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6F2166B009C for ; Wed, 28 Feb 2024 23:20:51 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 40665A0ADF for ; Thu, 29 Feb 2024 04:20:51 +0000 (UTC) X-FDA: 81843540702.04.5AE153C Received: from out-175.mta1.migadu.com (out-175.mta1.migadu.com [95.215.58.175]) by imf20.hostedemail.com (Postfix) with ESMTP id 66E051C0007 for ; Thu, 29 Feb 2024 04:20:49 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=wts7wgzf; spf=pass (imf20.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.175 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709180449; a=rsa-sha256; cv=none; b=dZcC37g0RlW4rhpg7mhhoEZLFums/NQxTn9oLUfWmFV+jLQlrC9SlIne8ymd3kZQWRfKkb eIim9yMoo76xeptGJcg+9R1x7oHsLLzCKsvVVIxMUAFxin4bx5VhqvBJEHaW9Ptblbz5oS RX+/M2tmedwVI4thBdOERNgkFZX8/jE= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=wts7wgzf; spf=pass (imf20.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.175 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709180449; h=from:from:sender:reply-to:subject:subject: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:dkim-signature; bh=9CoBY5rm4B2EvsrqolQfczRwQYyqCVgMrb4NJhBXYSY=; b=PlQXSLdI4bYa0eETk4DmD7CnHZQmLu+nfuBKLwpaAzjyH1HVstQmzshe8ZxXm1ONnKU7eJ xXn7ZX92GJ0h2JLXpFpqwLi6ljSFHlN5baVOBlrlmrbEUG7o/oGlodQlTWNrdVJmsDDFKq aLhlxqxwCcPokTsBPDn+xKEyPKTbKJQ= Date: Wed, 28 Feb 2024 23:20:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709180447; h=from:from:reply-to:subject:subject: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=9CoBY5rm4B2EvsrqolQfczRwQYyqCVgMrb4NJhBXYSY=; b=wts7wgzfsRR94He/W5cHbuX4aNc2eWGDi/2ZqB+HMG96w772Uq3dAFBDmNG1/OSD0HH7Uh SNg8W5EdfnON28K6ad5Lc4d8wfMuVw1/PVe0LSrcr6wT5V7NZ7B6LmGHhoSdzT5LiUsv/O 0Ue5o3fSYntDMhobDpIutFkxG1VnJc8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Dave Chinner Cc: Matthew Wilcox , Amir Goldstein , paulmck@kernel.org, lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-fsdevel , Jan Kara Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] Reclamation interactions with RCU Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 66E051C0007 X-Stat-Signature: wa1tse1ix5wur1m88s648roxbbarkmgy X-Rspam-User: X-HE-Tag: 1709180449-898722 X-HE-Meta: U2FsdGVkX197kabXKeY6EJsBJT8O7BfIbixoVI5nV2wnUyCjBYln0kAJLqtxDOPUps9mEnVJ6PVs8dm5lsHd8LTIobPYLQNWNnloBIsfKwlkEafeXdy4MGjpC1WUkcBos7IX48AvxbUlYD95V2hHfYhfLr0szKxBIqt8Zc3KXnZN7SNX8oOXMfkzC3l/wmBpOmg+Ji9LoNuLs1/DceTMKXt2vwE/Xt8olWYFf5A2IwGsMSGqhxtkncMNVJQGaqcXrFiWM1Lv2+ulaUsvVCDajG592xj35Sw80E9pfPthvgNQltu9QIXH6roiFlZ1h3Kvznr7M4Dx1XgGYPA5BKmrn9KbNfgf31zDdJIxK4VcickQGerldYN2SXZ0FgGr4GpZM0MOjc0rzc1FypYs68qdHPpCjzSXHVGTJn1yNnIZ495n6nJ9BlbcY61DkFHu6faMXbwhIpJr+YM7q64IeDUE8Ll4vd/LxaRaoAN1CSSioEsd80U6n6iwZQEv7DFm/uzMWe4hdxDlIb9AB28KbfjiYw7Ejw0PYz7Y4GVKIlLCE7TbYK4w65IfJb0UjxqAk+wjOHp9M2qztREj1fVflmPMPKGZjNyK9aqJE3yBKiaYivsgDTJNoA+lL92pquFJ4+v9qZ5mJ+hA165vHI+REf1SrARzHOhfMgMNf9kmjGdAQ7zjcyNSjvt65VKkQ0wpydu0DXvT9ApSwan9RYPK+7i/lNYchuqaIueTnwoDTvmT52q60ntk+NQvfZGGPdzVdNZtdqXcayqRRSIiX57bX3jitXrjKNZ/X5Bg7+ZQJikUsbIwQBeZyqL/ZFnlvLeOHgftpKhSeImaj94u5z/7beyxgSjbEcdApYh1pvf7ExMnap0GOq+NoSyb9AvWAk8nJKUhtBUSHm43dD6esJHQwIYA5ltfBlPbrOPc2IGwpm4YUcNSDIjVU1KsoXX48uHIb3vmU9pa7f/KUvvMD6ouzK8 2P+/jJb8 m4qOS/EBaQHCvChJTT37MapFpndMl+GahNN7Tw+K1j/aYCONf1ElHBSbGBEK3LL0mX82Q9pBqpYljl6s4HH1sITHvYDv/fZW/noyLzn8rmq6CUzMO0TcKTFfTmmvdIFJYVij49NIFRQ59Feh1N2Da7J2cwyZGR3G7luUVjqpFYLaU1Zk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Feb 29, 2024 at 12:29:35PM +1100, Dave Chinner wrote: > On Wed, Feb 28, 2024 at 07:37:58PM +0000, Matthew Wilcox wrote: > > On Tue, Feb 27, 2024 at 09:19:47PM +0200, Amir Goldstein wrote: > > > On Tue, Feb 27, 2024 at 8:56 PM Paul E. McKenney wrote: > > > > > > > > Hello! > > > > > > > > Recent discussions [1] suggest that greater mutual understanding between > > > > memory reclaim on the one hand and RCU on the other might be in order. > > > > > > > > One possibility would be an open discussion. If it would help, I would > > > > be happy to describe how RCU reacts and responds to heavy load, along with > > > > some ways that RCU's reactions and responses could be enhanced if needed. > > > > > > > > > > Adding fsdevel as this should probably be a cross track session. > > > > Perhaps broaden this slightly. On the THP Cabal call we just had a > > conversation about the requirements on filesystems in the writeback > > path. We currently tell filesystem authors that the entire writeback > > path must avoid allocating memory in order to prevent deadlock (or use > > GFP_MEMALLOC). Is this appropriate? > > The reality is that filesystem developers have been ignoring that > "mm rule" for a couple of decades. It was also discussed at LSFMM a > decade ago (2014 IIRC) without resolution, so in the mean time we > just took control of our own destiny.... > > > It's a lot of work to assure that > > writing pagecache back will not allocate memory in, eg, the network stack, > > the device driver, and any other layers the write must traverse. > > > > With the removal of ->writepage from vmscan, perhaps we can make > > filesystem authors lives easier by relaxing this requirement as pagecache > > should be cleaned long before we get to reclaiming it. > > .... by removing memory reclaim page cache writeback support from > the filesystems entirely. > > IOWs, this rule hasn't been valid for a -long- time, so maybe it > is time to remove it. :) It's _never_ been valid, the entire IO stack allocates memory. This is what GFP_NOIO/GFP_NOFS is for, and additionaly mempools/biosets. If mm can't satisfy the allocation, they should fail it, and then the IO path will have fallbacks (but they wil be slow, i.e. iodepth will be greatly limited).