Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1344417
| From | Christoph Lameter <cl@linux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 16/17] mm/slab: introduce new slab management type, OBJFREELIST_SLAB |
| Date | 2016-02-26 17:30 +0100 |
| Message-ID | <r6trc-5Z1-15@gated-at.bofh.it> (permalink) |
| References | <r6jLb-7pr-3@gated-at.bofh.it> <r6jLc-7pr-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 26 Feb 2016, js1304@gmail.com wrote: > Although this idea can apply to all caches whose size is larger than > management array size, it isn't applied to caches which have a > constructor. If such cache's object is used for management array, > constructor should be called for it before that object is returned to > user. I guess that overhead overwhelm benefit in that case so this idea > doesn't applied to them at least now. Caches which have a constructor (or are used with SLAB_RCU_FREE) have a defined content even when they are free. Therefore they cannot be used for the freelist. > For summary, from now on, slab management type is determined by > following logic. > > 1) if management array size is smaller than object size and no ctor, it > becomes OBJFREELIST_SLAB. Also do not do this for RCU slabs. > 2) if management array size is smaller than leftover, it becomes > NORMAL_SLAB which uses leftover as a array. > > 3) if OFF_SLAB help to save memory than way 4), it becomes OFF_SLAB. > It allocate a management array from the other cache so memory waste > happens. Wonder how many of these ugly off slabs are left after what you did here. > TOTAL = OBJFREELIST + NORMAL(leftover) + NORMAL + OFF > > /Before/ > 126 = 0 + 60 + 25 + 41 > > /After/ > 126 = 97 + 12 + 15 + 2 > > Result shows that number of caches that doesn't waste memory increase > from 60 to 109. Great results. > v2: fix SLAB_DESTROTY_BY_RCU cache type handling Ok how are they handled now? Do not see that dealt with in the patch.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/17] mm/slab: introduce new freed objects management way, OBJFREELIST_SLAB js1304@gmail.com - 2016-02-26 07:10 +0100
[PATCH v2 16/17] mm/slab: introduce new slab management type, OBJFREELIST_SLAB js1304@gmail.com - 2016-02-26 07:10 +0100
Re: [PATCH v2 16/17] mm/slab: introduce new slab management type, OBJFREELIST_SLAB Christoph Lameter <cl@linux.com> - 2016-02-26 17:30 +0100
Re: [PATCH v2 16/17] mm/slab: introduce new slab management type, OBJFREELIST_SLAB Joonsoo Kim <js1304@gmail.com> - 2016-02-26 18:10 +0100
[PATCH v2 11/17] mm/slab: clean up cache type determination js1304@gmail.com - 2016-02-26 07:10 +0100
[PATCH v2 03/17] mm/slab: remove the checks for slab implementation bug js1304@gmail.com - 2016-02-26 07:10 +0100
Re: [PATCH v2 03/17] mm/slab: remove the checks for slab implementation bug Christoph Lameter <cl@linux.com> - 2016-02-26 17:10 +0100
[PATCH v2 01/17] mm/slab: fix stale code comment js1304@gmail.com - 2016-02-26 07:10 +0100
[PATCH v2 04/17] mm/slab: activate debug_pagealloc in SLAB when it is actually enabled js1304@gmail.com - 2016-02-26 07:10 +0100
Re: [PATCH v2 04/17] mm/slab: activate debug_pagealloc in SLAB when it is actually enabled Christoph Lameter <cl@linux.com> - 2016-02-26 17:10 +0100
[PATCH v2 05/17] mm/slab: use more appropriate condition check for debug_pagealloc js1304@gmail.com - 2016-02-26 07:10 +0100
Re: [PATCH v2 05/17] mm/slab: use more appropriate condition check for debug_pagealloc Christoph Lameter <cl@linux.com> - 2016-02-26 17:10 +0100
[PATCH v2 09/17] mm/slab: put the freelist at the end of slab page js1304@gmail.com - 2016-02-26 07:10 +0100
[PATCH v2 07/17] mm/slab: alternative implementation for DEBUG_SLAB_LEAK js1304@gmail.com - 2016-02-26 07:10 +0100
[PATCH v2 13/17] mm/slab: make criteria for off slab determination robust and simple js1304@gmail.com - 2016-02-26 07:10 +0100
[PATCH v2 12/17] mm/slab: do not change cache size if debug pagealloc isn't possible js1304@gmail.com - 2016-02-26 07:10 +0100
Re: [PATCH v2 12/17] mm/slab: do not change cache size if debug pagealloc isn't possible Christoph Lameter <cl@linux.com> - 2016-02-26 17:20 +0100
Re: [PATCH v2 12/17] mm/slab: do not change cache size if debug pagealloc isn't possible Joonsoo Kim <js1304@gmail.com> - 2016-02-26 18:10 +0100
[PATCH v2 17/17] mm/slab: avoid returning values by reference js1304@gmail.com - 2016-02-26 07:10 +0100
Re: [PATCH v2 17/17] mm/slab: avoid returning values by reference Christoph Lameter <cl@linux.com> - 2016-02-26 17:30 +0100
[PATCH v2 06/17] mm/slab: clean up DEBUG_PAGEALLOC processing code js1304@gmail.com - 2016-02-26 07:10 +0100
[PATCH v2 08/17] mm/slab: remove object status buffer for DEBUG_SLAB_LEAK js1304@gmail.com - 2016-02-26 07:10 +0100
csiph-web