Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265988
| From | Vladimir Davydov <vdavydov@virtuozzo.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0/5] memcg/kmem: switch to white list policy |
| Date | 2015-11-09 21:20 +0100 |
| Message-ID | <qt150-2JC-25@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qsViX-7qm-43@gated-at.bofh.it> <qsZmz-1yW-45@gated-at.bofh.it> <qsZPA-1LJ-35@gated-at.bofh.it> <qt0iB-2cL-5@gated-at.bofh.it> <qt0si-2g6-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Nov 09, 2015 at 02:32:53PM -0500, Tejun Heo wrote: > On Mon, Nov 09, 2015 at 10:27:47PM +0300, Vladimir Davydov wrote: > > Of course, we could rework slab merging so that kmem_cache_create > > returned a new dummy cache even if it was actually merged. Such a cache > > would point to the real cache, which would be used for allocations. This > > wouldn't limit slab merging, but this would add one more dereference to > > alloc path, which is even worse. > > Hmmm, this could be me not really understanding but why can't we let > all slabs to be merged regardless of SLAB_ACCOUNT flag for root memcg > and point to per-memcg slabs (may be merged among them but most likely Because we won't be able to distinguish kmem_cache_alloc calls that should be accounted from those that shouldn't. The problem is if two caches A = kmem_cache_create(...) and B = kmem_cache_create(...) happen to be merged, A and B will point to the same kmem_cache struct. As a result, there is no way to distinguish kmem_cache_alloc(A) which we want to account from kmem_cache_alloc(B) which we don't. > won't matter) for !root. We're indirecting once anyway, no? If kmem accounting is not used, we aren't indirecting. That's why I don't think we can use dummy kmem_cache struct for merged caches, where we could store __GFP_ACCOUNT flag. Thanks, Vladimir -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] memcg/kmem: switch to white list policy Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-07 21:10 +0100
[PATCH 4/5] vmalloc: allow to account vmalloc to memcg Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-07 21:10 +0100
[PATCH 3/5] memcg: only account kmem allocations marked as __GFP_ACCOUNT Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-07 21:10 +0100
[PATCH 1/5] Revert "kernfs: do not account ino_ida allocations to memcg" Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-07 21:10 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Michal Hocko <mhocko@kernel.org> - 2015-11-09 15:10 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Johannes Weiner <hannes@cmpxchg.org> - 2015-11-09 17:50 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-09 19:30 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Tejun Heo <tj@kernel.org> - 2015-11-09 20:00 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-09 20:30 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Tejun Heo <tj@kernel.org> - 2015-11-09 20:40 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-09 21:20 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Tejun Heo <tj@kernel.org> - 2015-11-09 21:40 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-10 09:00 +0100
Re: [PATCH 0/5] memcg/kmem: switch to white list policy Michal Hocko <mhocko@kernel.org> - 2015-11-11 09:20 +0100
Re: [PATCH 5/5] Account certain kmem allocations to memcg Michal Hocko <mhocko@kernel.org> - 2015-11-09 15:50 +0100
Re: [PATCH 5/5] Account certain kmem allocations to memcg Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-10 09:10 +0100
Re: [PATCH 5/5] Account certain kmem allocations to memcg Michal Hocko <mhocko@kernel.org> - 2015-11-10 14:30 +0100
csiph-web