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 2F95DC5475B for ; Fri, 1 Mar 2024 04:15:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A7E56B006E; Thu, 29 Feb 2024 23:15:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 930AA6B0088; Thu, 29 Feb 2024 23:15:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D1A86B008A; Thu, 29 Feb 2024 23:15:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 66F216B0088 for ; Thu, 29 Feb 2024 23:15:21 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EBCF6140255 for ; Fri, 1 Mar 2024 04:15:20 +0000 (UTC) X-FDA: 81847155600.21.5630649 Received: from out-176.mta0.migadu.com (out-176.mta0.migadu.com [91.218.175.176]) by imf13.hostedemail.com (Postfix) with ESMTP id F007B20007 for ; Fri, 1 Mar 2024 04:15:18 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Nl9awbJN; spf=pass (imf13.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.176 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=1709266519; 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=nuNCdL8h1oXsBd5EnDZ2OKOaYnUwm+9LyZcDVju6zDo=; b=oLwgMcZ0y6TMBAxQT9F1Br8K1UyzRsY2dJI4fBztfbhCQPYAa+ExiFcRLCs0ttJIS0Xwf8 aCu+iG1cShmJyEhS3V6cYdffrwf+T7s7IRPvc1oX9dRYqYuddYhlZE91aIAGljDSMMQ56m BDwlDcr33Or4rfMjhhnNxlveu4YVmB8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709266519; a=rsa-sha256; cv=none; b=h4YFZJTPU4ilo51vFwom2AEKfleCy3ulmlbt3WsiBKeRqgtwADXrdfe9LSpVr6kv2/wFPR XDXW3aJ7vXwvbi6BkbpO6KRBf5MSpvjCXUzd/1FGQCrq/UJvPfqSTYk2fat0scCXOm5zKz 4aOwCoIegAU47dnz+ZHKCtgc2o9jycM= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Nl9awbJN; spf=pass (imf13.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.176 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Thu, 29 Feb 2024 23:15:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709266517; 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=nuNCdL8h1oXsBd5EnDZ2OKOaYnUwm+9LyZcDVju6zDo=; b=Nl9awbJN3IdA66xNvskeb+FrlFbpVSK9oHxvsThqoqJyh8eCE5QSMbUtpgeZmPQNSONWXl 6wkcOG2UuXT+6kLrhjTgp4WTaiyIaOWZFtcYsx9fu9slbsfCV1WnGyyjzbz0mnCdotDNCT tKqKUezXvHx4Py8VMymft48a1npc0L0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: James Bottomley Cc: Matthew Wilcox , NeilBrown , 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: <170925937840.24797.2167230750547152404@noble.neil.brown.name> <3bykct7dzcduugy6kvp7n32sao4yavgbj2oui2rpidinst2zmn@e5qti5lkq25t> <7ffaa92d86fff2e16aed99edd3c4a423f06fe033.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7ffaa92d86fff2e16aed99edd3c4a423f06fe033.camel@HansenPartnership.com> X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: F007B20007 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 3wtykp1qfqxtk9ynpa8416bgfsxge8om X-HE-Tag: 1709266518-736877 X-HE-Meta: U2FsdGVkX18L+LgogNvDRj1dXxwJIuASjAx+aKzGRCAG5vowGRnk8wFOl6Nnq/u5kmq6+vQO16XD8vMbpyd2uv0XlxWdvBrTB2jHUiTAEW9bjca7+ZKqQXZ/f6f7OoYdXtv1eIl//7wVvs53n5sRlmZ/pRodA04SRsb0nITr4qK67t9ZMVLat2EABl886rc3rG8jPyY2KcUdrKPSiHUc9ETlqROwQJ8Ve9OLsItfhissgnDQxUB/GtC5MdgCnjhOHhRJ8oJpm5hRCTityFd6urHlqcLx3IBP61Phit4F5JYJHXoKS4r8LTbD3Uz/8kebTqkibvvVyBSm3gKOQu+FXwLWTNfrXf50WxTEbz0/1ELr00Kim/b77YWTQWcLVA7hd9zlseJRRAgCxzPDbzxEDWax6utx/VPEQ91JHMxNIZdiCKU1bKr4TuBBpq1ukHKjq1IAkzZ8782XhVvRJOwTsuH0YnuVDHuJsjf/9B5Wz06jlaZAj3VXtm0c/reWSKhywd3W47Ih0Z05LbSp685GqgCDNiVZEXpAJm//qK4/Y/xzMITyo0OrZdgmCbfS2ZG/wpUj7lynxCGLHmwwLpKSLIWkprVate1naWsBlUk+ZJvAfo9n6FuG1aXhCMqDOFZO3e+8kD8YCTu74OjXQD1GrabkwMHfeD5kh5iD/KUVAbpIRgUBJWshX4pku3FbUMKL4DI52PMkaWSSibVAx5tNPdoqu+A2SP5dVSvSVF+UPx7FlnyRlha42kRN8DTOpxn/4aZlnhWAoTmE8btAw9Ad2pgzKH7RTJRaZuOAnf24TBZYf90yRosBS8OSm1n6IA2nj8f63GpQy8pacphbEIojljNH7b6HnYhxTnQklV6HIBVICOl+oW+fqSoK+YSWX/Ntv5R0sXxaXnA5zfwriMSf92I38VXrOPcZFBCslMw4gH4CAPw3kC5iK4+atxcxgW7UiPy1ShkOoA2CCuEbhXw Ojs81LcI o1QIG/T8x7qo9vfD+Ie9Sh5KAnjCrL0M5ibb1ZjRvdd7Zxivj5ndHngKjAlfkh1giNU4mFfPFMborIoONjd8yMYKVmWRryW8lKCtbi1dA6gD+Tuao9Ql/7A+sCIRwuwnXF6Lrd3IyEr/8dZo= 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 Fri, Mar 01, 2024 at 11:08:52AM +0700, James Bottomley wrote: > On Thu, 2024-02-29 at 22:52 -0500, Kent Overstreet wrote: > > On Fri, Mar 01, 2024 at 10:33:59AM +0700, James Bottomley wrote: > > > On Thu, 2024-02-29 at 22:09 -0500, Kent Overstreet wrote: > > > > Or maybe you just want the syscall to return an error instead of > > > > blocking for an unbounded amount of time if userspace asks for > > > > something silly. > > > > > > Warn on allocation above a certain size without MAY_FAIL would seem > > > to cover all those cases.  If there is a case for requiring instant > > > allocation, you always have GFP_ATOMIC, and, I suppose, we could > > > even do a bounded reclaim allocation where it tries for a certain > > > time then fails. > > > > Then you're baking in this weird constant into all your algorithms > > that doesn't scale as machine memory sizes and working set sizes > > increase. > > > > > > Honestly, relying on the OOM killer and saying that because that > > > > now we don't have to write and test your error paths is a lazy > > > > cop out. > > > > > > OOM Killer is the most extreme outcome.  Usually reclaim (hugely > > > simplified) dumps clean cache first and tries the shrinkers then > > > tries to write out dirty cache.  Only after that hasn't found > > > anything after a few iterations will the oom killer get activated > > > > All your caches dumped and the machine grinds to a halt and then a > > random process gets killed instead of simply _failing the > > allocation_. > > Ignoring the fact free invective below, I think what you're asking for > is strict overcommit. There's a tunable for that: > > https://www.kernel.org/doc/Documentation/vm/overcommit-accounting > > However, see the Gotchas section for why we can't turn it on globally, > but it is available to you if you know what you're doing. James, I already explained all this.