lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod7gktckGdTRCmTQTACXZKbtpCJqqovxFvSqG1uDa07ocg@mail.gmail.com>
Date:   Mon, 07 May 2018 20:19:08 +0000
From:   Shakeel Butt <shakeelb@...gle.com>
To:     Michal Hocko <mhocko@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Greg Thelen <gthelen@...gle.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>
Cc:     Linux MM <linux-mm@...ck.org>, Cgroups <cgroups@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Junaid Shahid <junaids@...gle.com>,
        Junaid Shahid <juanids@...gle.com>
Subject: Re: [PATCH] mm: memcontrol: drain memcg stock on force_empty

On Mon, May 7, 2018 at 1:16 PM Shakeel Butt <shakeelb@...gle.com> wrote:

> From: Junaid Shahid <junaids@...gle.com>

> The per-cpu memcg stock can retain a charge of upto 32 pages. On a
> machine with large number of cpus, this can amount to a decent amount
> of memory. Additionally force_empty interface might be triggering
> unneeded memcg reclaims.

> Signed-off-by: Junaid Shahid <juanids@...gle.com>

This should be "Junaid Shahid <junaids@...gle.com>".

> Signed-off-by: Shakeel Butt <shakeelb@...gle.com>
> ---
>   mm/memcontrol.c | 3 +++
>   1 file changed, 3 insertions(+)

> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index e2d33a37f971..2c3c69524b49 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2841,6 +2841,9 @@ static int mem_cgroup_force_empty(struct mem_cgroup
*memcg)

>          /* we call try-to-free pages for make this cgroup empty */
>          lru_add_drain_all();
> +
> +       drain_all_stock(memcg);
> +
>          /* try to free all pages in this cgroup */
>          while (nr_retries && page_counter_read(&memcg->memory)) {
>                  int progress;
> --
> 2.17.0.441.gb46fe60e1d-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ