Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2473687pxa; Mon, 17 Aug 2020 10:26:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLWJY5DJwPHQ7ksqLIJnB1TAYQxm/So6T3rVqc2ltDDMZ9XmRd/khsVH7kRh+ukDaROm9c X-Received: by 2002:a05:6402:b99:: with SMTP id cf25mr15371448edb.340.1597685203563; Mon, 17 Aug 2020 10:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597685203; cv=none; d=google.com; s=arc-20160816; b=c7Pv9zK3h/QhuSUeGBocPQl9xJoDV6skXFYJAomFur1hxAknbXBRsh1iDXR6QYcFvc fR4ckcaOOPDffu5tBKJooBy44CybAM8k/pUmMniAatu1yqujCzVESoF9B7ubRyvemaQy Aaax9BMJkwoD7rM2IWtPyJKIcm2mBm9n1X7bsjroTn+fgJMGVngbWSmen7/yHAUPcExQ TvhI0XVhPTMHb8LihnWkzyMuugg6eW+tQXbGKLAvkzHajLuoMUSzugxUc98H9OKZxW3C nMpUGvyatzi7laUx87AwIlyJdMdVmCObsQrkqQmx+7D/Wpb6cWJkFLnAOlLG9M7H/eeZ zDsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ustc/Co8E0AQhbcerO/qjyS5RAvKGH1AciZ7eOvqsmA=; b=T1aTyZFIjWYsI/5zMM/Q84ahg4GD9hE+4HqBUHYeybytdpZdjvXTP5W2zw/ixgbawG VzXu+DFGDm2sM0SDwstXlsEXPaw1vzg48eXLaS35lnFF0aC672yjumGEVslEVhordq8G NzlZn4cNgrWZk6diuuXdJWglMJZ7R+zt0gIhaLfEv+/BePd3q/xnMMifpB1tCFkdo+pP v++nHADzwJ3eQNh8Wu9M04yzzuYVOHt388AqU3YSxUv60uAQmRfsZvP5afyfIDhz4RhX duz6CZ4BVhNVe9k1+yxJUFKKO295EImJduMifKzlgCqmyuV1pdDULm/KPI8sB8GI9Hws VQMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=c+qkjdRR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si11821949ejl.139.2020.08.17.10.26.20; Mon, 17 Aug 2020 10:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=c+qkjdRR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389841AbgHQRWp (ORCPT + 99 others); Mon, 17 Aug 2020 13:22:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731336AbgHQQpQ (ORCPT ); Mon, 17 Aug 2020 12:45:16 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26039C061389 for ; Mon, 17 Aug 2020 09:44:55 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id i10so18230929ljn.2 for ; Mon, 17 Aug 2020 09:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ustc/Co8E0AQhbcerO/qjyS5RAvKGH1AciZ7eOvqsmA=; b=c+qkjdRRVAF0xvWA9+DkkVLwK7sGF1z8hQM3CtGa1YD+bJI6w1nj5+9S70Q8FvCQqi 2Ei0s13pec+cTVm+0OSOFIdw7vP7XLcSIvUcZ6EGrALSHKiZ7PPGzM4XEb029aajiYyC aEhBUOpbzPBTQSG4Cdn7X1BjMfLQqn745I4HqH3Abk31kJgYxjgeUpKk7qwB2tzxmqpe AtkUyANm5zAbjaLbrp8RlEB5I2UccCxi0HQae47ThK7uHUPNGSHd8fX+Y3ltxcsiL9Kl 3ENiFhFOnYGf8LXV3bRXJi1SUgcycpC5v7MIYDrXtB34VmBj+Nk2YpIHRR25BtbB6i8Q lRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ustc/Co8E0AQhbcerO/qjyS5RAvKGH1AciZ7eOvqsmA=; b=Tjy2wJVBWRVJ7CoGotjd+vZdHX/7tTgbZunxdX//o2eqxrjRU6desMyaMIhHl7v/Mm 0uV0MSw26g/mBjz9vI0XTUfdcCLWq5hJYZBDzz2buaNWeKmKmHwPjSvycp0nUJ7Ud4/A aB61jt6NIKEKhB1hVwWxpxNdP4hO5ZpevZMBZGxwiRG7K7KyAKS9WcBy0QfwMTxrez/X RZZQDZa3O11rcfGd+GKqWJdDO/Ljr+AbRwmX0WFO4WJy6JZ5wEzsIoHoHM2YT643AugI 6FYy29y3Hr4/DWyMv3zjnLIrZsucy2hBZclxM33j6AwiSFN2MqtRDFrHh6NmII3CG1w6 1O9A== X-Gm-Message-State: AOAM530gNf88kXBV4zdJXlsTjk6KUIQnMwm/bO4rzfhRSxmS8dE1hpjD V+x2sWDSFbzvFy0Ls1d4Ag2eJ/bDuEmAV5Fzx2cHTg== X-Received: by 2002:a2e:96c3:: with SMTP id d3mr7974441ljj.270.1597682693369; Mon, 17 Aug 2020 09:44:53 -0700 (PDT) MIME-Version: 1.0 References: <20200817140831.30260-1-longman@redhat.com> <20200817140831.30260-2-longman@redhat.com> In-Reply-To: <20200817140831.30260-2-longman@redhat.com> From: Shakeel Butt Date: Mon, 17 Aug 2020 09:44:42 -0700 Message-ID: Subject: Re: [RFC PATCH 1/8] memcg: Enable fine-grained control of over memory.high action To: Waiman Long Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Vladimir Davydov , Jonathan Corbet , Alexey Dobriyan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , LKML , linux-doc@vger.kernel.org, linux-fsdevel , Cgroups , Linux MM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2020 at 7:11 AM Waiman Long wrote: > > Memory controller can be used to control and limit the amount of > physical memory used by a task. When a limit is set in "memory.high" > in a non-root memory cgroup, the memory controller will try to reclaim > memory if the limit has been exceeded. Normally, that will be enough > to keep the physical memory consumption of tasks in the memory cgroup > to be around or below the "memory.high" limit. > > Sometimes, memory reclaim may not be able to recover memory in a rate > that can catch up to the physical memory allocation rate especially > when rotating disks are used for swapping or writing dirty pages. In > this case, the physical memory consumption will keep on increasing. Isn't this the real underlying issue? Why not make the guarantees of memory.high more strict instead of adding more interfaces and complexity? By the way, have you observed this issue on real workloads or some test cases? It would be good to get a repro with simple test cases.