On Tue, Jan 29, 2019 at 03:58:52PM -0500, Chris Down wrote: > Currently THP allocation events data is fairly opaque, since you can > only get it system-wide. This patch makes it easier to reason about > transparent hugepage behaviour on a per-memcg basis. > > For anonymous THP-backed pages, we already have MEMCG_RSS_HUGE in v1, > which is used for v1's rss_huge [sic]. This is reused here as it's > fairly involved to untangle NR_ANON_THPS right now to make it > per-memcg, since right now some of this is delegated to rmap before we > have any memcg actually assigned to the page. It's a good idea to rework > that, but let's leave untangling THP allocation for a future patch. > > Signed-off-by: Chris Down <[email protected]> > Cc: Andrew Morton <[email protected]> > Cc: Johannes Weiner <[email protected]> > Cc: Tejun Heo <[email protected]> > Cc: Roman Gushchin <[email protected]> > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected]
Looks good to me. It's useful to know if a cgroup is getting the THP coverage and allocation policy it's asking for. Acked-by: Johannes Weiner <[email protected]> The fallback numbers could be useful as well, but they're tricky to obtain as there isn't an obvious memcg context. We can do them later.

