Re: [dm-devel] [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-06-13 Thread Mikulas Patocka
On Wed, 13 Jun 2018, Christoph Hellwig wrote: > On Wed, Jun 13, 2018 at 01:01:22PM -0400, Mikulas Patocka wrote: > > Hi > > > > I'd like to ask about this patch - will you commit it, or do you want to > > make some more changes to it? > > How about you resend it with the series adding an act

Re: [dm-devel] [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-06-13 Thread Christoph Hellwig
On Wed, Jun 13, 2018 at 01:01:22PM -0400, Mikulas Patocka wrote: > Hi > > I'd like to ask about this patch - will you commit it, or do you want to > make some more changes to it? How about you resend it with the series adding an actual user once ready? I haven't actually seen patches using it p

Re: [dm-devel] [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-06-13 Thread Mikulas Patocka
Hi I'd like to ask about this patch - will you commit it, or do you want to make some more changes to it? Mikulas On Fri, 27 Apr 2018, Mikulas Patocka wrote: > > > On Fri, 27 Apr 2018, Christopher Lameter wrote: > > > On Thu, 26 Apr 2018, Mikulas Patocka wrote: > > > > > > Hmmm... order

Re: [dm-devel] [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 has

Re: [dm-devel] [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 wh

Re: [dm-devel] [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: [dm-devel] [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 th

Re: [dm-devel] [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 > rewr

Re: [dm-devel] [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 "s

Re: [dm-devel] [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 eff

Re: [dm-devel] [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 co

Re: [dm-devel] [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-18 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: [dm-devel] [PATCH RESEND] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-04-18 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 cau

Re: [dm-devel] [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 3

Re: [dm-devel] [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: [dm-devel] [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 minimi

Re: [dm-devel] [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 p

Re: [dm-devel] [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 exis

[dm-devel] [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 (su