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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41E11C433FE for ; Wed, 24 Nov 2021 22:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343952AbhKXWHv (ORCPT ); Wed, 24 Nov 2021 17:07:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343647AbhKXWHu (ORCPT ); Wed, 24 Nov 2021 17:07:50 -0500 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 212F7C061746 for ; Wed, 24 Nov 2021 14:04:40 -0800 (PST) Received: by mail-qk1-x72a.google.com with SMTP id de30so5532583qkb.0 for ; Wed, 24 Nov 2021 14:04:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wnb56ZlXImyESxNGtft70OqOtQf36rXcNYeS2LPN9Hw=; b=TI8Ja/xF0rPlSq0XbH+Z7yi5SswZbFWopo2KUC+FP/Iq/PcR2rlzmFLMIj4QV03dcF YFUYfCfagoudNqaumEWziKMiWQsVBe/nYWESt1ElhUaQH0p2TYtI+XXrWnFxDi4JPhkn J9IE4NuQF6CPpF6Ci1vk5p5mPw939HjAOacCQtJhelXJspwRORvL+V7PPRUjf2Risto8 4BHcTy/AhBEV/9E1wBryWAoNy5lDrTYyo38hC4OwWqxQtqKZJNOijMyqb/KzruZRt+sQ PkQ+AiAtFXLi1/WQoI2Fzf6KIe4dEM3YVJ6C79I+lq6D360kEnRvX067qmAV0N2pUquu c7KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wnb56ZlXImyESxNGtft70OqOtQf36rXcNYeS2LPN9Hw=; b=KoRhuPIHTCj0E1wC4bvk5ylXYieLnu/vM3qoxYjrBbiDjPQpHeLSV7DEAgbEiuMWbC jUXQ80BLmFnx+1igrHmYdz/Vi00xHzVrClUVbLmgzkb9i+rMTP3o+heepDTXToRacneg /mErVu7wr9ErmBBZldkxSAnyXp/Xfk+zqa8ZQ4HkRCfNB+/+F2UFW1uw+ED53S5K+EXM gjdC4bN1aREQkiG0eETpOKuZWihXhtv4eegEeh5BDZbSWCCwqBCTJKXiyX/+uGFxxajt QOLK9RT46xbTGrO/VKt209lsplNcsQrMtdwk3EA4QlsbGTJvmSqtxjn9qAmwKDF0DYfO dDPA== X-Gm-Message-State: AOAM532tyPAMQnkS0BMYeZaHJR16VqkJ4ENGjAhDwxlQmlA9vHe2pz5p uUbONeZeyfZffTdj6e3B/dYrtoT9l6Zze2wonsqcGA== X-Google-Smtp-Source: ABdhPJyEaZfSCy9c2XfuDBLl28EATOu0ZCMDM9ldvjLGNLlmcFX5/ceoutE7bj1w59tq2T4LxJMGglhzfOaD2fWRpig= X-Received: by 2002:a25:2f58:: with SMTP id v85mr407870ybv.487.1637791478911; Wed, 24 Nov 2021 14:04:38 -0800 (PST) MIME-Version: 1.0 References: <20211124193604.2758863-1-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Wed, 24 Nov 2021 14:04:28 -0800 Message-ID: Subject: Re: [PATCH 1/1] sysctl: change watermark_scale_factor max limit to 30% To: Johannes Weiner Cc: akpm@linux-foundation.org, mhocko@suse.com, mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com, dave.hansen@linux.intel.com, vbabka@suse.cz, mgorman@techsingularity.net, corbet@lwn.net, yi.zhang@huawei.com, xi.fengfei@h3c.com, rppt@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 24, 2021 at 1:37 PM Johannes Weiner wrote: > > On Wed, Nov 24, 2021 at 11:36:04AM -0800, Suren Baghdasaryan wrote: > > For embedded systems with low total memory, having to run applications > > with relatively large memory requirements, 10% max limitation for > > watermark_scale_factor poses an issue of triggering direct reclaim > > every time such application is started. This results in slow application > > startup times and bad end-user experience. > > By increasing watermark_scale_factor max limit we allow vendors more > > flexibility to choose the right level of kswapd aggressiveness for > > their device and workload requirements. > > > > Signed-off-by: Suren Baghdasaryan > > Acked-by: Johannes Weiner Thanks! > > No objection from me as this limit was always totally arbitrary. But I > have to say I'm a bit surprised: The current maximum setting will wake > kswapd when free memory drops below 10% and have it reclaim until > 20%. This seems like quite a lot? Are there applications that really > want kswapd to wake at 30% and target 60% of memory free? The example I was given by a vendor was Camera application requiring 0.25G on 1GB device. Camera apps are notoriously memory hungry on Android and on low-memory devices it can require more than 20% of total memory to run.