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 5630FC5475B for ; Fri, 1 Mar 2024 04:09:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC1B96B008A; Thu, 29 Feb 2024 23:09:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D71AA6B008C; Thu, 29 Feb 2024 23:09:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C11FE6B0092; Thu, 29 Feb 2024 23:09:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B1F2A6B008A for ; Thu, 29 Feb 2024 23:09:07 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 80AAB16056A for ; Fri, 1 Mar 2024 04:09:07 +0000 (UTC) X-FDA: 81847139934.11.48F1279 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [96.44.175.130]) by imf20.hostedemail.com (Postfix) with ESMTP id 70BBB1C000D for ; Fri, 1 Mar 2024 04:09:05 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=hansenpartnership.com header.s=20151216 header.b=h0IsG7bp; dkim=pass header.d=hansenpartnership.com header.s=20151216 header.b=h0IsG7bp; dmarc=pass (policy=none) header.from=hansenpartnership.com; spf=pass (imf20.hostedemail.com: domain of James.Bottomley@HansenPartnership.com designates 96.44.175.130 as permitted sender) smtp.mailfrom=James.Bottomley@HansenPartnership.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709266145; 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=oTRGQZo0+aQv+U1NAwvCFIeCgwW5L/RydfkvJS21k7I=; b=5x/bd9mXahr+HHUVw9uOMrN5fr4Xd3VdiUlV5sSBTZ/C3ucMAhLbGo6rPFqP7ctjkQIzw4 7Truz6dQREYX6coaQp2dGTGeuKQPIwRzXdmJ+j1/9RLaRrds/YGVVt7S3QNKe/qZCxdHHm eBw9t4TiQZfhBLJlw1V3NJGVlytOTiY= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=hansenpartnership.com header.s=20151216 header.b=h0IsG7bp; dkim=pass header.d=hansenpartnership.com header.s=20151216 header.b=h0IsG7bp; dmarc=pass (policy=none) header.from=hansenpartnership.com; spf=pass (imf20.hostedemail.com: domain of James.Bottomley@HansenPartnership.com designates 96.44.175.130 as permitted sender) smtp.mailfrom=James.Bottomley@HansenPartnership.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709266145; a=rsa-sha256; cv=none; b=eurwyzE9alxjKejF0Kr9/UKad+6CbiYEUNIYDjouzk/Ymml5kUTxGL2YmXKOJDrLkQudZR Z1fLZJa88ThpGYl0P3kNDk9pr2w69CUOi1vUqK0oQblacszIj9CvYlhzep/KpqW1Y3GHKW gmYjfKHhuPiUPUeq/5aSAdVM6yRux2o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1709266141; bh=UiSIGEjDf8fPdoAXZQGSYA5JYBxVYFogxKj1XMWMGII=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=h0IsG7bpKboxbU53X+KAZcj8gRlhvLRld4JdOzErIEK+RMGP8zjd+6wlsuln+A8ce n8BThgfC30J4MFU+24u2Li9FE+xUXy4zbAUZ3EpleZCdyVzCauJj2rJ+2m9T2mH1BM tKFOVU/SFABP418wBISpILo1Is7sMcviSqQ+MQ8c= Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id CCCD71281179; Thu, 29 Feb 2024 23:09:01 -0500 (EST) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavis, port 10024) with ESMTP id OgkuCyA5PUbV; Thu, 29 Feb 2024 23:09:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1709266141; bh=UiSIGEjDf8fPdoAXZQGSYA5JYBxVYFogxKj1XMWMGII=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=h0IsG7bpKboxbU53X+KAZcj8gRlhvLRld4JdOzErIEK+RMGP8zjd+6wlsuln+A8ce n8BThgfC30J4MFU+24u2Li9FE+xUXy4zbAUZ3EpleZCdyVzCauJj2rJ+2m9T2mH1BM tKFOVU/SFABP418wBISpILo1Is7sMcviSqQ+MQ8c= Received: from [10.0.15.72] (unknown [49.231.15.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 51566128608B; Thu, 29 Feb 2024 23:08:58 -0500 (EST) Message-ID: <7ffaa92d86fff2e16aed99edd3c4a423f06fe033.camel@HansenPartnership.com> Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] Reclamation interactions with RCU From: James Bottomley To: Kent Overstreet Cc: Matthew Wilcox , NeilBrown , Amir Goldstein , paulmck@kernel.org, lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-fsdevel , Jan Kara Date: Fri, 01 Mar 2024 11:08:52 +0700 In-Reply-To: <3bykct7dzcduugy6kvp7n32sao4yavgbj2oui2rpidinst2zmn@e5qti5lkq25t> References: <170925937840.24797.2167230750547152404@noble.neil.brown.name> <3bykct7dzcduugy6kvp7n32sao4yavgbj2oui2rpidinst2zmn@e5qti5lkq25t> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 70BBB1C000D X-Stat-Signature: r1uiw53zcp11tknpg1jhcw8up1qnwci4 X-Rspam-User: X-HE-Tag: 1709266145-938465 X-HE-Meta: U2FsdGVkX1940EgFbmEW8V7pPebkP1tVdnfkTrTIdJNPJXHQo3MCnfTsV0OVbyXMLDjAmw8dCbJNA/2FUAqCg5OIZkpcCjnVTRdZ925wKidg3t2qMUhntWgZ9R6zMjvaef9dkp7jU8pGqnmhOE9fCBWwCP1nzlyfnsj6lqix4GbJl91I+baa2/WDYSC0JiHzB0byJuSC92hkBCXSPJKkJqYW2zx5fp7C6OXJSHLW3zG9aRp9srEpxySINQehY8zTR8irWTNWRDaOzFGvn1ccjG26n1RaF5xVtBLB1zhObqXhvVbIU+JdTFOGlv91iNAiKtCBgrMGnuCYw2Eoh5lQ4SCdr07eSCVyeFvjojHAKQ82CgAgX4Qr8PwWKooGMFOmCio1YjVIfCrwIVHihkbEEm2oYHvJc/siF1XpLC2ELD0ZEFdvtkMbIk57S+QKqOQS7XhQMOYO9kUi6bwjxPL5Bh4ezmZEwuULiV7Tq+4Y2SSkM4cvoDg9XvM6gO3YoSxA5a6N1n9Un6xydJXSXBfZNxne9vNX9WjDVuw74GHBiuwA3vQivZbx4jw4OoZX6uu4BhtBxvxW49C+4u84YnUuD6GZ4C1P9QM4waOpX509Q5/spesXa8jxBfJWJngeH4B+QSR3NdVTu68eHSvTkP3teLqjDd86Td6Sft33NIvVjFhWcL6ll98Rxltuw9fnbC2QvypUOTUVNpzDtHiixwc4Ph46o1wYfgcpsxtXXq9eIjertHffJ4+qStMqawHUDiEnxoTV6NSjgGiOsCJdXSWYmcQV/2DufpRlyjt3Giex7xE9lpuOUxps8AURk+9hhGNmHl/FBP7hHw7zfWx32DDnwB5hlWNYAHdr02L42bZtwRv6b7OyCTyVCiMKo0SUwo70Zan/j7kYS4/FoIQgOyGQmc+rROeRQ4orMRykXdBMuLwlX6tf2qesHrwsEprbPFhLrFBMoqiuUsuGxpzdxNy XLpcL065 TQfyxjqbh4Uqsds3Pscu3e3gGv3TBCdNPmE15Lvxa4+IoCG6YqUZB56kHGapoDLUgx/XERa3INB6Gsq5Q61sYT1fVomy2D6/Tcelje69aqMLWdaeD36IJnJg0qNLf6KKQ/fkm0SztAfExAcGlRreK/hlN0fdNMN6J8sDQ+M9ZUkG6WxKJWQCN7w/h4VpnqZmDBidUqdy3AFf/WwvJPs50fn2yytZF4AdidiZthroIB7KpMAIu0gGCUuenI49K7GJlbCYcoBdAL48O2UPyHT5Woy1/Cwzlw+gs/dnCfjlfsG2Ub8EmipQaiiLcZXnX1HnKXIlSTUvTZ5dsiXk0XcV5/DdgsdBKxMpHSsjECz9fm0uRk+x1F2+M5hYJsg== 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, 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