linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/3] Directed kmem charging
@ 2018-06-19  5:13 Shakeel Butt
  2018-06-19  5:13 ` [PATCH 1/3] mm: memcg: remote memcg charging for kmem allocations Shakeel Butt
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Shakeel Butt @ 2018-06-19  5:13 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Johannes Weiner, Vladimir Davydov, Jan Kara,
	Greg Thelen, linux-kernel, cgroups, linux-fsdevel, linux-mm,
	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.  This patch series
also introduces scope API for targeted memcg charging. So, all the
__GFP_ACCOUNT alloctions within the specified scope will be charged to
the given target memcg.

Shakeel Butt (3):
  mm: memcg: remote memcg charging for kmem allocations
  fs: fsnotify: account fsnotify metadata to kmemcg
  fs, mm: account buffer_head to kmemcg

 fs/buffer.c                          | 14 ++++-
 fs/notify/dnotify/dnotify.c          |  5 +-
 fs/notify/fanotify/fanotify.c        |  6 +-
 fs/notify/fanotify/fanotify_user.c   |  5 +-
 fs/notify/group.c                    |  6 ++
 fs/notify/inotify/inotify_fsnotify.c |  2 +-
 fs/notify/inotify/inotify_user.c     |  5 +-
 include/linux/fsnotify_backend.h     | 12 ++--
 include/linux/memcontrol.h           | 14 +++++
 include/linux/sched.h                |  3 +
 include/linux/sched/mm.h             | 24 ++++++++
 include/linux/slab.h                 | 83 ++++++++++++++++++++++++++++
 kernel/fork.c                        |  3 +
 mm/memcontrol.c                      | 54 ++++++++++++++++--
 14 files changed, 220 insertions(+), 16 deletions(-)

-- 
2.18.0.rc1.244.gcf134e6275-goog

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-06-22 23:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-19  5:13 [PATCH v6 0/3] Directed kmem charging Shakeel Butt
2018-06-19  5:13 ` [PATCH 1/3] mm: memcg: remote memcg charging for kmem allocations Shakeel Butt
2018-06-19 16:24   ` Johannes Weiner
2018-06-19 23:31     ` Shakeel Butt
2018-06-20 15:22       ` Johannes Weiner
2018-06-19  5:13 ` [PATCH 2/3] fs: fsnotify: account fsnotify metadata to kmemcg Shakeel Butt
2018-06-19  7:20   ` Amir Goldstein
2018-06-19 14:15     ` Shakeel Butt
2018-06-19  5:13 ` [PATCH 3/3] fs, mm: account buffer_head " Shakeel Butt
2018-06-19 16:27   ` Johannes Weiner
2018-06-19 17:40     ` Roman Gushchin
2018-06-19 19:51       ` Shakeel Butt
2018-06-19 19:55         ` Roman Gushchin
2018-06-22 23:33           ` Shakeel Butt
2018-06-19 16:11 ` [PATCH v6 0/3] Directed kmem charging Johannes Weiner
2018-06-19 22:58   ` Shakeel Butt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).