Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3689056imm; Mon, 18 Jun 2018 02:20:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ5v7OEpp3BFsd3dQ3hArVsxKccjvKeoz1/3bIv5A0G+HkXfCf9mNyqxw0Nz5PdHkA4kQUu X-Received: by 2002:a17:902:141:: with SMTP id 59-v6mr4094842plb.181.1529313601256; Mon, 18 Jun 2018 02:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529313601; cv=none; d=google.com; s=arc-20160816; b=Mm3FkbAgcsy6M0x8OSnqVeZAxi7/xGU5M1DMod9E1I6CESDZHCxP2LN50MNB27txM9 00UwqVujsFOrlo1WGD42NVDVsIYxd2UKc+Z4e5mSU5jfhUsYX+NYlqGjAPajbtRU4lcM OyUs2pD65HKRvzwZywK1ajQtiVE1fnpSH0xWl3kPD1AqDWd7jK+HeYfld4BCl7lkg/se 6aNCDdXlz3ouTZJSpGqwjC1VLLjC9o+wxAWuiEMSx/FojnelUXjP3afuI1UDefG0QgAD h/LQwNDk58ROqwBcIQT1IwEtwjsl2RTuP7F0fJy0oNdkKHmmcIDuSwRG7e+PvR0p3JPq v9sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=miONbbdocarRKFsOuRka2hTHDX/YYgkezmFuKm9SZUE=; b=pqJrxCsbYlBXDYkYNWGLIgWKShRXcxZpPqvKiWVC/c75wjm6IGM+ejeAR6YPFuE+5l ygXYoROY4iS4XyKIClfdc/Ao3XDk5S5vuPj4soMJswYAMsx4JrjLHWGs/4TS7wBg2I54 IgJjJBnPMmNwsYRamttjEvTU20hVCK1WgdrE9Gge0PVLLrvsmGfIuDnceZhnjgpjqQez FEh6ZICLJHxOvxDEb15KzX85QUHTOzgJSKGAk9YYTrdOMulbpf1YTymUNgu9lrANJjHZ JF/pxuLoEsZmfd204t9RAJB3KvkIQ/bw2+SEhMLX/3OLV3yKU4zRKKBGGkkAwOZieQ5s mTGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g33-v6si15336923plb.297.2018.06.18.02.19.47; Mon, 18 Jun 2018 02:20:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966776AbeFRJS5 (ORCPT + 99 others); Mon, 18 Jun 2018 05:18:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:38574 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933604AbeFRJSb (ORCPT ); Mon, 18 Jun 2018 05:18:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CEB39ACE9; Mon, 18 Jun 2018 09:18:27 +0000 (UTC) From: Vlastimil Babka To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Roman Gushchin , Michal Hocko , Johannes Weiner , linux-api@vger.kernel.org, Christoph Lameter , David Rientjes , Mel Gorman , Matthew Wilcox , Vlastimil Babka , Laura Abbott , Sumit Semwal , Vijayanand Jitta Subject: [PATCH v2 0/7] kmalloc-reclaimable caches Date: Mon, 18 Jun 2018 11:18:01 +0200 Message-Id: <20180618091808.4419-1-vbabka@suse.cz> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v2 changes: - shorten cache names to kmalloc-rcl- - last patch shortens for all kmalloc caches to e.g. "1k", "4M" - include dma caches to the 2D kmalloc_caches[] array to avoid a branch - vmstat counter nr_indirectly_reclaimable_bytes renamed to nr_kernel_misc_reclaimable, doesn't include kmalloc-rcl-* - /proc/meminfo counter renamed to KReclaimable, includes kmalloc-rcl* and nr_kernel_misc_reclaimable Hi, as discussed at LSF/MM [1] here's a patchset that introduces kmalloc-reclaimable caches (more details in the second patch) and uses them for SLAB freelists and dcache external names. The latter allows us to repurpose the NR_INDIRECTLY_RECLAIMABLE_BYTES counter later in the series. This is how /proc/slabinfo looks like after booting in virtme: ... kmalloc-rcl-4M 0 0 4194304 1 1024 : tunables 1 1 0 : slabdata 0 0 0 ... kmalloc-rcl-96 7 32 128 32 1 : tunables 120 60 8 : slabdata 1 1 0 kmalloc-rcl-64 25 128 64 64 1 : tunables 120 60 8 : slabdata 2 2 0 kmalloc-rcl-32 0 0 32 124 1 : tunables 120 60 8 : slabdata 0 0 0 kmalloc-4M 0 0 4194304 1 1024 : tunables 1 1 0 : slabdata 0 0 0 kmalloc-2M 0 0 2097152 1 512 : tunables 1 1 0 : slabdata 0 0 0 kmalloc-1M 0 0 1048576 1 256 : tunables 1 1 0 : slabdata 0 0 0 ... /proc/vmstat with renamed nr_indirectly_reclaimable_bytes counter: ... nr_slab_reclaimable 2817 nr_slab_unreclaimable 1781 ... nr_kernel_misc_reclaimable 0 ... /proc/meminfo with new KReclaimable counter: ... Shmem: 564 kB KReclaimable: 11260 kB Slab: 18368 kB SReclaimable: 11260 kB SUnreclaim: 7108 kB KernelStack: 1248 kB ... Thanks, Vlastimil Vlastimil Babka (7): mm, slab: combine kmalloc_caches and kmalloc_dma_caches mm, slab/slub: introduce kmalloc-reclaimable caches mm, slab: allocate off-slab freelists as reclaimable when appropriate dcache: allocate external names from reclaimable kmalloc caches mm: rename and change semantics of nr_indirectly_reclaimable_bytes mm, proc: add KReclaimable to /proc/meminfo mm, slab: shorten kmalloc cache names for large sizes Documentation/filesystems/proc.txt | 4 + drivers/base/node.c | 19 ++-- drivers/staging/android/ion/ion_page_pool.c | 4 +- fs/dcache.c | 38 ++------ fs/proc/meminfo.c | 16 +-- include/linux/mmzone.h | 2 +- include/linux/slab.h | 49 +++++++--- mm/page_alloc.c | 19 ++-- mm/slab.c | 11 ++- mm/slab_common.c | 102 ++++++++++++-------- mm/slub.c | 13 +-- mm/util.c | 3 +- mm/vmstat.c | 6 +- 13 files changed, 159 insertions(+), 127 deletions(-) -- 2.17.1