Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-27 Thread Mikulas Patocka
On Fri, 27 Apr 2018, Christopher Lameter wrote: > On Thu, 26 Apr 2018, Mikulas Patocka wrote: > > > > Hmmm... order 4 for these caches may cause some concern. These should stay > > > under costly order I think. Otherwise allocations are no longer > > > guaranteed. > > > > You said that slub

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-27 Thread Mikulas Patocka
On Fri, 27 Apr 2018, Christopher Lameter wrote: > On Thu, 26 Apr 2018, Mikulas Patocka wrote: > > > > Hmmm... order 4 for these caches may cause some concern. These should stay > > > under costly order I think. Otherwise allocations are no longer > > > guaranteed. > > > > You said that slub

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-27 Thread Christopher Lameter
On Thu, 26 Apr 2018, Mikulas Patocka wrote: > > Hmmm... order 4 for these caches may cause some concern. These should stay > > under costly order I think. Otherwise allocations are no longer > > guaranteed. > > You said that slub has fallback to smaller order allocations. Yes it does... > The

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-27 Thread Christopher Lameter
On Thu, 26 Apr 2018, Mikulas Patocka wrote: > > Hmmm... order 4 for these caches may cause some concern. These should stay > > under costly order I think. Otherwise allocations are no longer > > guaranteed. > > You said that slub has fallback to smaller order allocations. Yes it does... > The

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-26 Thread Mikulas Patocka
On Thu, 26 Apr 2018, Christopher Lameter wrote: > On Wed, 25 Apr 2018, Mikulas Patocka wrote: > > > Do you want this? It deletes slab_order and replaces it with the > > "minimize_waste" logic directly. > > Well yes that looks better. Now we need to make it easy to read and less > complicated.

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-26 Thread Mikulas Patocka
On Thu, 26 Apr 2018, Christopher Lameter wrote: > On Wed, 25 Apr 2018, Mikulas Patocka wrote: > > > Do you want this? It deletes slab_order and replaces it with the > > "minimize_waste" logic directly. > > Well yes that looks better. Now we need to make it easy to read and less > complicated.

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-26 Thread Christopher Lameter
On Wed, 25 Apr 2018, Mikulas Patocka wrote: > Do you want this? It deletes slab_order and replaces it with the > "minimize_waste" logic directly. Well yes that looks better. Now we need to make it easy to read and less complicated. Maybe try to keep as much as possible of the old code and also

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-26 Thread Christopher Lameter
On Wed, 25 Apr 2018, Mikulas Patocka wrote: > Do you want this? It deletes slab_order and replaces it with the > "minimize_waste" logic directly. Well yes that looks better. Now we need to make it easy to read and less complicated. Maybe try to keep as much as possible of the old code and also

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-26 Thread Christopher Lameter
On Wed, 25 Apr 2018, Mikulas Patocka wrote: > > > > Could yo move that logic into slab_order()? It does something awfully > > similar. > > But slab_order (and its caller) limits the order to "max_order" and we > want more. > > Perhaps slab_order should be dropped and calculate_order totally >

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-26 Thread Christopher Lameter
On Wed, 25 Apr 2018, Mikulas Patocka wrote: > > > > Could yo move that logic into slab_order()? It does something awfully > > similar. > > But slab_order (and its caller) limits the order to "max_order" and we > want more. > > Perhaps slab_order should be dropped and calculate_order totally >

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-25 Thread Mikulas Patocka
On Wed, 25 Apr 2018, Mikulas Patocka wrote: > > > On Wed, 18 Apr 2018, Christopher Lameter wrote: > > > On Tue, 17 Apr 2018, Mikulas Patocka wrote: > > > > > I can make a slub-only patch with no extra flag (on a freshly booted > > > system it increases only the order of caches "TCPv6" and

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-25 Thread Mikulas Patocka
On Wed, 25 Apr 2018, Mikulas Patocka wrote: > > > On Wed, 18 Apr 2018, Christopher Lameter wrote: > > > On Tue, 17 Apr 2018, Mikulas Patocka wrote: > > > > > I can make a slub-only patch with no extra flag (on a freshly booted > > > system it increases only the order of caches "TCPv6" and

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-25 Thread Mikulas Patocka
On Wed, 18 Apr 2018, Christopher Lameter wrote: > On Tue, 17 Apr 2018, Mikulas Patocka wrote: > > > I can make a slub-only patch with no extra flag (on a freshly booted > > system it increases only the order of caches "TCPv6" and "sighand_cache" > > by one - so it should not have unexpected

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-25 Thread Mikulas Patocka
On Wed, 18 Apr 2018, Christopher Lameter wrote: > On Tue, 17 Apr 2018, Mikulas Patocka wrote: > > > I can make a slub-only patch with no extra flag (on a freshly booted > > system it increases only the order of caches "TCPv6" and "sighand_cache" > > by one - so it should not have unexpected

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-18 Thread Christopher Lameter
On Tue, 17 Apr 2018, Mikulas Patocka wrote: > I can make a slub-only patch with no extra flag (on a freshly booted > system it increases only the order of caches "TCPv6" and "sighand_cache" > by one - so it should not have unexpected effects): > > Doing a generic solution for slab would be more

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-18 Thread Christopher Lameter
On Tue, 17 Apr 2018, Mikulas Patocka wrote: > I can make a slub-only patch with no extra flag (on a freshly booted > system it increases only the order of caches "TCPv6" and "sighand_cache" > by one - so it should not have unexpected effects): > > Doing a generic solution for slab would be more

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Vlastimil Babka
On 04/17/2018 07:26 PM, Mikulas Patocka wrote: > > > On Tue, 17 Apr 2018, Vlastimil Babka wrote: > >> On 04/17/2018 04:45 PM, Christopher Lameter wrote: >>> On Mon, 16 Apr 2018, Mikulas Patocka wrote: >>> This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This flag

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Vlastimil Babka
On 04/17/2018 07:26 PM, Mikulas Patocka wrote: > > > On Tue, 17 Apr 2018, Vlastimil Babka wrote: > >> On 04/17/2018 04:45 PM, Christopher Lameter wrote: >>> On Mon, 16 Apr 2018, Mikulas Patocka wrote: >>> This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This flag

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Mikulas Patocka
On Tue, 17 Apr 2018, Christopher Lameter wrote: > On Tue, 17 Apr 2018, Vlastimil Babka wrote: > > > On 04/17/2018 04:45 PM, Christopher Lameter wrote: > > > > But then higher order allocs are generally seen as problematic. > > > > I think in this case they are better than wasting/fragmenting

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Mikulas Patocka
On Tue, 17 Apr 2018, Christopher Lameter wrote: > On Tue, 17 Apr 2018, Vlastimil Babka wrote: > > > On 04/17/2018 04:45 PM, Christopher Lameter wrote: > > > > But then higher order allocs are generally seen as problematic. > > > > I think in this case they are better than wasting/fragmenting

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Mikulas Patocka
On Tue, 17 Apr 2018, Christopher Lameter wrote: > On Mon, 16 Apr 2018, Mikulas Patocka wrote: > > > This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This > > flag causes allocation of larger slab caches in order to minimize wasted > > space. > > > > This is needed because we

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Mikulas Patocka
On Tue, 17 Apr 2018, Christopher Lameter wrote: > On Mon, 16 Apr 2018, Mikulas Patocka wrote: > > > This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This > > flag causes allocation of larger slab caches in order to minimize wasted > > space. > > > > This is needed because we

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Mikulas Patocka
On Tue, 17 Apr 2018, Vlastimil Babka wrote: > On 04/17/2018 04:45 PM, Christopher Lameter wrote: > > On Mon, 16 Apr 2018, Mikulas Patocka wrote: > > > >> This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This > >> flag causes allocation of larger slab caches in order to

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Mikulas Patocka
On Tue, 17 Apr 2018, Vlastimil Babka wrote: > On 04/17/2018 04:45 PM, Christopher Lameter wrote: > > On Mon, 16 Apr 2018, Mikulas Patocka wrote: > > > >> This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This > >> flag causes allocation of larger slab caches in order to

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Christopher Lameter
On Tue, 17 Apr 2018, Vlastimil Babka wrote: > On 04/17/2018 04:45 PM, Christopher Lameter wrote: > > But then higher order allocs are generally seen as problematic. > > I think in this case they are better than wasting/fragmenting 384kB for > 640kB object. Well typically we have suggested that

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Christopher Lameter
On Tue, 17 Apr 2018, Vlastimil Babka wrote: > On 04/17/2018 04:45 PM, Christopher Lameter wrote: > > But then higher order allocs are generally seen as problematic. > > I think in this case they are better than wasting/fragmenting 384kB for > 640kB object. Well typically we have suggested that

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Vlastimil Babka
On 04/17/2018 04:45 PM, Christopher Lameter wrote: > On Mon, 16 Apr 2018, Mikulas Patocka wrote: > >> This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This >> flag causes allocation of larger slab caches in order to minimize wasted >> space. >> >> This is needed because we want

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Vlastimil Babka
On 04/17/2018 04:45 PM, Christopher Lameter wrote: > On Mon, 16 Apr 2018, Mikulas Patocka wrote: > >> This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This >> flag causes allocation of larger slab caches in order to minimize wasted >> space. >> >> This is needed because we want

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Christopher Lameter
On Mon, 16 Apr 2018, Mikulas Patocka wrote: > This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This > flag causes allocation of larger slab caches in order to minimize wasted > space. > > This is needed because we want to use dm-bufio for deduplication index and > there are

Re: [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-17 Thread Christopher Lameter
On Mon, 16 Apr 2018, Mikulas Patocka wrote: > This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This > flag causes allocation of larger slab caches in order to minimize wasted > space. > > This is needed because we want to use dm-bufio for deduplication index and > there are

[PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-16 Thread Mikulas Patocka
This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This flag causes allocation of larger slab caches in order to minimize wasted space. This is needed because we want to use dm-bufio for deduplication index and there are existing installations with non-power-of-two block sizes

[PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-16 Thread Mikulas Patocka
This patch introduces a flag SLAB_MINIMIZE_WASTE for slab and slub. This flag causes allocation of larger slab caches in order to minimize wasted space. This is needed because we want to use dm-bufio for deduplication index and there are existing installations with non-power-of-two block sizes