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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 D69C4C43613 for ; Mon, 24 Jun 2019 17:43:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC05720645 for ; Mon, 24 Jun 2019 17:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729182AbfFXRnY (ORCPT ); Mon, 24 Jun 2019 13:43:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48708 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726730AbfFXRnY (ORCPT ); Mon, 24 Jun 2019 13:43:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB82A13AA9; Mon, 24 Jun 2019 17:43:13 +0000 (UTC) Received: from llong.com (dhcp-17-85.bos.redhat.com [10.18.17.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F92A5D9C5; Mon, 24 Jun 2019 17:42:59 +0000 (UTC) From: Waiman Long To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Alexander Viro , Jonathan Corbet , Luis Chamberlain , Kees Cook , Johannes Weiner , Michal Hocko , Vladimir Davydov Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Roman Gushchin , Shakeel Butt , Andrea Arcangeli , Waiman Long Subject: [PATCH 0/2] mm, slab: Extend vm/drop_caches to shrink kmem slabs Date: Mon, 24 Jun 2019 13:42:17 -0400 Message-Id: <20190624174219.25513-1-longman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 24 Jun 2019 17:43:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purpose of this patchset is to allow system administrators to have the ability to shrink all the kmem slabs in order to free up memory and get a more accurate picture of how many slab objects are actually being used. Patch 1 adds a new memcg_iterate_all() that is used by the patch 2 to iterate on all the memory cgroups. Waiman Long (2): mm, memcontrol: Add memcg_iterate_all() mm, slab: Extend vm/drop_caches to shrink kmem slabs Documentation/sysctl/vm.txt | 11 ++++++++-- fs/drop_caches.c | 4 ++++ include/linux/memcontrol.h | 3 +++ include/linux/slab.h | 1 + kernel/sysctl.c | 4 ++-- mm/memcontrol.c | 13 +++++++++++ mm/slab_common.c | 44 +++++++++++++++++++++++++++++++++++++ 7 files changed, 76 insertions(+), 4 deletions(-) -- 2.18.1