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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 027C6C433B4 for ; Thu, 15 Apr 2021 22:25:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5F1F8610FB for ; Thu, 15 Apr 2021 22:25:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F1F8610FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DDE886B006C; Thu, 15 Apr 2021 18:25:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DB5206B0071; Thu, 15 Apr 2021 18:25:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C7CD06B0072; Thu, 15 Apr 2021 18:25:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id A2C326B006C for ; Thu, 15 Apr 2021 18:25:09 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 5EB8718063C16 for ; Thu, 15 Apr 2021 22:25:09 +0000 (UTC) X-FDA: 78036033138.05.5F73A2C Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf03.hostedemail.com (Postfix) with ESMTP id 9C827C0007C9 for ; Thu, 15 Apr 2021 22:25:04 +0000 (UTC) IronPort-SDR: iiz4yxvC0Pu7VODHGYhOeDaGhIygGXMoqj4wuCrQR9kp52fcF5Mhsnn9RL7CzjjZE31R3pCc8x qBTxGd2J0O0w== X-IronPort-AV: E=McAfee;i="6200,9189,9955"; a="192827552" X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="192827552" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2021 15:25:07 -0700 IronPort-SDR: xUieIgZ5t9XqViXlT/Xiz8pE85lVfU5M29qtbi/LwOuEFY8A6k6mTTSyHnf3AVjmABlszgpu6u MWFfbNN9jPMA== X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="453106552" Received: from schen9-mobl.amr.corp.intel.com ([10.209.21.67]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2021 15:25:06 -0700 Subject: Re: [RFC PATCH v1 00/11] Manage the top tier memory in a tiered memory To: Shakeel Butt Cc: Michal Hocko , Johannes Weiner , Andrew Morton , Dave Hansen , Ying Huang , Dan Williams , David Rientjes , Linux MM , Cgroups , LKML References: From: Tim Chen Message-ID: <86a6f2e1-8aed-00fc-fbd7-9250277b201f@linux.intel.com> Date: Thu, 15 Apr 2021 15:25:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 9C827C0007C9 X-Stat-Signature: x44bqm3siihj7pp54gpxh4hakhkhy1t3 Received-SPF: none (linux.intel.com>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=mga04.intel.com; client-ip=192.55.52.120 X-HE-DKIM-Result: none/none X-HE-Tag: 1618525504-827182 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: On 4/8/21 10:18 AM, Shakeel Butt wrote: > > Using v1's soft limit like behavior can potentially cause high > priority jobs to stall to make enough space on top tier memory on > their allocation path and I think this patchset is aiming to reduce > that impact by making kswapd do that work. However I think the more > concerning issue is the low priority job hogging the top tier memory. > > The possible ways the low priority job can hog the top tier memory are > by allocating non-movable memory or by mlocking the memory. (Oh there > is also pinning the memory but I don't know if there is a user api to > pin memory?) For the mlocked memory, you need to either modify the > reclaim code or use a different mechanism for demoting cold memory. > > Basically I am saying we should put the upfront control (limit) on the > usage of top tier memory by the jobs. > Circling back to your comment here. I agree that soft limit is deficient in this scenario that you have pointed out. Eventually I was shooting for a hard limit on a memory tier for a cgroup that's similar to the v2 memory controller interface (see mail in the other thread). That interface should satisfy the hard constraint you want to place on the low priority jobs. Tim