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 X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36708C4338F for ; Sat, 24 Jul 2021 17:32:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 77C9D60E09 for ; Sat, 24 Jul 2021 17:32:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 77C9D60E09 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=inbox.lv Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 053056B006C; Sat, 24 Jul 2021 13:32:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F1E736B0070; Sat, 24 Jul 2021 13:32:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE6B56B0071; Sat, 24 Jul 2021 13:32:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id C21F76B006C for ; Sat, 24 Jul 2021 13:32:17 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5B7B1824999B for ; Sat, 24 Jul 2021 17:32:17 +0000 (UTC) X-FDA: 78398175114.28.9D0C1BF Received: from shark2.inbox.lv (shark2.inbox.lv [194.152.32.82]) by imf24.hostedemail.com (Postfix) with ESMTP id 8440FB0090A3 for ; Sat, 24 Jul 2021 17:32:16 +0000 (UTC) Received: from shark2.inbox.lv (localhost [127.0.0.1]) by shark2-out.inbox.lv (Postfix) with ESMTP id 3B457C012E; Sat, 24 Jul 2021 20:32:14 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=inbox.lv; s=30062014; t=1627147934; bh=gb4bG5oTJzx9VePKJzccG9FQrlxnmNsnsq0VHH6oyoA=; h=Date:From:To:Cc:Subject:In-Reply-To; b=gXIRgf8khMRigt+mZ9XFp7fzHT/rPLcINwgj0iUDZ9EbWHzg5tVe504AhP959V928 jir01qe64SzHJrlhUcqIS5GoMU5CHkkwX05E0/AXw3wPum5+GYJo81MI1Bv0m06qW0 JNScucJ7/7X198jVb36S8qPG/GXDWFROxd6a+/jA= Received: from localhost (localhost [127.0.0.1]) by shark2-in.inbox.lv (Postfix) with ESMTP id 22668C010C; Sat, 24 Jul 2021 20:32:14 +0300 (EEST) Received: from shark2.inbox.lv ([127.0.0.1]) by localhost (shark2.inbox.lv [127.0.0.1]) (spamfilter, port 35) with ESMTP id c6U9VI91D12e; Sat, 24 Jul 2021 20:32:11 +0300 (EEST) Received: from mail.inbox.lv (pop1 [127.0.0.1]) by shark2-in.inbox.lv (Postfix) with ESMTP id A5496C00F3; Sat, 24 Jul 2021 20:32:11 +0300 (EEST) Received: from mail.inbox.lv (unknown [79.105.117.119]) (Authenticated sender: hakavlad@inbox.lv) by mail.inbox.lv (Postfix) with ESMTPA id A4C7C3E60195; Sat, 24 Jul 2021 20:32:09 +0300 (EEST) Date: Sun, 25 Jul 2021 02:32:01 +0900 From: Alexey Avramov To: ndrw.xf@redhazel.co.uk Cc: akpm@linux-foundation.org, aros@gmx.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@kernel.org, surenb@google.com, vbabka@suse.cz Subject: Re: Let's talk about the elephant in the room - the Linux kernel's inability to gracefully handle low memory pressure Message-ID: <20210725023201.13f0d2f2@mail.inbox.lv> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) In-Reply-To: <806F5696-A8D6-481D-A82F-49DEC1F2B035@redhazel.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: OK X-ESPOL: EZqEIBwB+w1Luca/KI1r7+Xnw8rRJVcqoV6aw7o593NZs63AstlrcW6cB/eRFELmMn8= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 8440FB0090A3 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=inbox.lv header.s=30062014 header.b=gXIRgf8k; dmarc=pass (policy=quarantine) header.from=inbox.lv; spf=pass (imf24.hostedemail.com: domain of hakavlad@inbox.lv designates 194.152.32.82 as permitted sender) smtp.mailfrom=hakavlad@inbox.lv X-Stat-Signature: rgud8qwrwbsffuz39wk6wu835usiw8zk X-HE-Tag: 1627147936-425955 X-Bogosity: Ham, tests=bogofilter, spamicity=0.005533, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > Would it be possible to reserve a fixed (configurable) amount of RAM > for caches, and trigger OOM killer earlier, before most UI code is > evicted from memory? Yes! Try this patch: https://github.com/hakavlad/le9-patch The patch provides sysctl knobs for protecting the specified amount of clean file pages under memory pressure.