From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 71A176B0012 for ; Tue, 20 Feb 2018 14:42:03 -0500 (EST) Received: by mail-pf0-f198.google.com with SMTP id q11so5367942pff.19 for ; Tue, 20 Feb 2018 11:42:03 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y4sor23615pfy.133.2018.02.20.11.42.02 for (Google Transport Security); Tue, 20 Feb 2018 11:42:02 -0800 (PST) From: Shakeel Butt Subject: [PATCH 0/3] Directed kmem charging Date: Tue, 20 Feb 2018 11:41:46 -0800 Message-Id: <20180220194149.242009-1-shakeelb@google.com> Sender: owner-linux-mm@kvack.org List-ID: To: Jan Kara , Amir Goldstein , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Greg Thelen , Johannes Weiner , Michal Hocko , Vladimir Davydov , Mel Gorman , Vlastimil Babka Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Shakeel Butt This patchset introduces memcg variant memory allocation functions. The caller can explicitly pass the memcg to charge for kmem allocations. Currently the kernel, for __GFP_ACCOUNT memory allocation requests, extract the memcg of the current task to charge for the kmem allocation. This patch series introduces kmem allocation functions where the caller can pass the pointer to the remote memcg. The remote memcg will be charged for the allocation instead of the memcg of the caller. However the caller must have a reference to the remote memcg. Shakeel Butt (3): mm: memcg: plumbing memcg for kmem cache allocations mm: memcg: plumbing memcg for kmalloc allocations fs: fsnotify: account fsnotify metadata to kmemcg fs/notify/dnotify/dnotify.c | 5 +- fs/notify/fanotify/fanotify.c | 12 ++- fs/notify/fanotify/fanotify.h | 3 +- fs/notify/fanotify/fanotify_user.c | 7 +- fs/notify/group.c | 4 + fs/notify/inotify/inotify_fsnotify.c | 2 +- fs/notify/inotify/inotify_user.c | 5 +- fs/notify/mark.c | 6 +- include/linux/fsnotify_backend.h | 12 ++- include/linux/memcontrol.h | 13 ++- include/linux/slab.h | 86 +++++++++++++++- mm/memcontrol.c | 29 ++++-- mm/page_alloc.c | 2 +- mm/slab.c | 107 ++++++++++++++++---- mm/slab.h | 6 +- mm/slab_common.c | 41 +++++++- mm/slub.c | 140 ++++++++++++++++++++++----- 17 files changed, 402 insertions(+), 78 deletions(-) -- 2.16.1.291.g4437f3f132-goog -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org