Re: multi-pool malloc wip diff

2016-09-01 Thread Otto Moerbeek
On Tue, Aug 23, 2016 at 09:57:03AM +0200, Otto Moerbeek wrote: > On Mon, Aug 22, 2016 at 08:59:44PM -0400, Ted Unangst wrote: > > > Otto Moerbeek wrote: > > > > > > After a forkl of a threaded program __isthreaded is reset, but > > > existing allocations are spread around the pools. But the new

Re: multi-pool malloc wip diff

2016-08-23 Thread Otto Moerbeek
On Mon, Aug 22, 2016 at 08:59:44PM -0400, Ted Unangst wrote: > Otto Moerbeek wrote: > > > > After a forkl of a threaded program __isthreaded is reset, but > > existing allocations are spread around the pools. But the new single > > threaded child only looks in the first pool. I have to think how

Re: multi-pool malloc wip diff

2016-08-22 Thread Ted Unangst
Otto Moerbeek wrote: > > After a forkl of a threaded program __isthreaded is reset, but > existing allocations are spread around the pools. But the new single > threaded child only looks in the first pool. I have to think how to > solve this. Create a new flag, _malloc_threads. Init to 0.

Re: multi-pool malloc wip diff

2016-08-22 Thread Otto Moerbeek
On Mon, Aug 22, 2016 at 08:37:30PM +0200, Otto Moerbeek wrote: > On Mon, Aug 22, 2016 at 07:35:49PM +0200, Otto Moerbeek wrote: > > > On Mon, Aug 22, 2016 at 07:07:21PM +0200, Gregor Best wrote: > > > > > On Mon, Aug 22, 2016 at 05:03:34PM +0200, Otto Moerbeek wrote: > > > > On Mon, Aug 22,

Re: multi-pool malloc wip diff

2016-08-22 Thread Otto Moerbeek
On Mon, Aug 22, 2016 at 07:07:21PM +0200, Gregor Best wrote: > On Mon, Aug 22, 2016 at 05:03:34PM +0200, Otto Moerbeek wrote: > > On Mon, Aug 22, 2016 at 05:00:12PM +0200, Otto Moerbeek wrote: > > > > > Hmm, indeed, looking into it. > > > > Fixed diff now online, > > [...] > > With that one,

Re: multi-pool malloc wip diff

2016-08-22 Thread Gregor Best
On Mon, Aug 22, 2016 at 05:03:34PM +0200, Otto Moerbeek wrote: > On Mon, Aug 22, 2016 at 05:00:12PM +0200, Otto Moerbeek wrote: > > > Hmm, indeed, looking into it. > > Fixed diff now online, > [...] With that one, Firefox and Chromium work fine. There's a problem with Gimp though: $ gimp

Re: multi-pool malloc wip diff

2016-08-22 Thread Otto Moerbeek
On Mon, Aug 22, 2016 at 05:00:12PM +0200, Otto Moerbeek wrote: > Hmm, indeed, looking into it. Fixed diff now online, -Otto

Re: multi-pool malloc wip diff

2016-08-22 Thread Otto Moerbeek
On Mon, Aug 22, 2016 at 04:15:16PM +0200, Gregor Best wrote: > Hi, > > On Mon, Aug 22, 2016 at 08:21:08AM +0200, Otto Moerbeek wrote: > > [...] > > New diff posted in http://www.drijf.net/openbsd/malloc. > > > > The intention is that this is close to commitable. But while a > > straight merge

Re: multi-pool malloc wip diff

2016-08-22 Thread Gregor Best
Hi, On Mon, Aug 22, 2016 at 08:21:08AM +0200, Otto Moerbeek wrote: > [...] > New diff posted in http://www.drijf.net/openbsd/malloc. > > The intention is that this is close to commitable. But while a > straight merge of most recent diff with the current src, a bug > might have crept in. So

Re: multi-pool malloc wip diff

2016-08-22 Thread Otto Moerbeek
On Wed, May 11, 2016 at 10:04:48AM +0200, Otto Moerbeek wrote: > On Fri, Apr 29, 2016 at 08:42:00AM +0200, Otto Moerbeek wrote: > > > Hi, > > > > new diff in http://www.drijf.net/openbsd/malloc/ > > > > Should fix the issue Ted spotted and contains initial code to only set > > up multiple

Re: multi-pool malloc wip diff

2016-04-29 Thread Otto Moerbeek
Hi, new diff in http://www.drijf.net/openbsd/malloc/ Should fix the issue Ted spotted and contains initial code to only set up multiple pools if threaded. This one is only lightly tested by me, but I wanted to post this before I'll be away for a semi-long weekend, I don't think this is ready

Re: multi-pool malloc wip diff

2016-04-28 Thread Otto Moerbeek
On Thu, Apr 28, 2016 at 01:07:30PM -0400, Ted Unangst wrote: > Otto Moerbeek wrote: > > static void > > -ofree(struct dir_info *pool, void *p) > > +ofree(struct dir_info *argpool, void *p) > > { > > + struct dir_info *pool; > > struct region_info *r; > > size_t sz; > > + int i; > >

Re: multi-pool malloc wip diff

2016-04-28 Thread Ted Unangst
Otto Moerbeek wrote: > static void > -ofree(struct dir_info *pool, void *p) > +ofree(struct dir_info *argpool, void *p) > { > + struct dir_info *pool; > struct region_info *r; > size_t sz; > + int i; > > + pool = argpool; > r = find(pool, p); > if (r ==

Re: multi-pool malloc wip diff

2016-04-07 Thread Otto Moerbeek
On Wed, Mar 30, 2016 at 06:30:53PM +0200, Norman Golisz wrote: > On Mon Mar 28 2016 11:27, Otto Moerbeek wrote: > > Second diff. Only one person (Stefan Kempf, thanks!) gave feedback... > > Sorry, running with this patch since a week, but missed to give > feedback. > > As others already

Re: multi-pool malloc wip diff

2016-03-30 Thread Norman Golisz
On Mon Mar 28 2016 11:27, Otto Moerbeek wrote: > Second diff. Only one person (Stefan Kempf, thanks!) gave feedback... Sorry, running with this patch since a week, but missed to give feedback. As others already reported, no regressions here on amd64 also.

Re: multi-pool malloc wip diff

2016-03-29 Thread Juan Francisco Cantero Hurtado
On Mon, Mar 28, 2016 at 11:27:32AM +0200, Otto Moerbeek wrote: > On Wed, Mar 23, 2016 at 08:00:19AM +0100, Otto Moerbeek wrote: > > > Hi, > > > > first diff that seems to work. Tested on amd64 and compile tested on > > sparc64. > > > > It is alo available at http://www.drijf.net/openbsd/malloc

Re: multi-pool malloc wip diff

2016-03-29 Thread Stuart Henderson
On 2016/03/28 11:27, Otto Moerbeek wrote: > Second diff. Only one person (Stefan Kempf, thanks!) gave feedback... I've done i386 port bulk builds with both iterations of this, no problems seen yet.

Re: multi-pool malloc wip diff

2016-03-29 Thread Mike Larkin
On Mon, Mar 28, 2016 at 11:27:32AM +0200, Otto Moerbeek wrote: > On Wed, Mar 23, 2016 at 08:00:19AM +0100, Otto Moerbeek wrote: > > > Hi, > > > > first diff that seems to work. Tested on amd64 and compile tested on > > sparc64. > > > > It is alo available at http://www.drijf.net/openbsd/malloc

Re: multi-pool malloc wip diff

2016-03-28 Thread Daniel Micay
> - Curently fixed at 4 pools with a fixed thread -> pool mapping. > - All pools are always initialized, even for single threaded programs, > where >   only one pool is used. > - Especially realloc gets quite a bit uglier. > - I'm pondering storing the thread -> pool mapping in the thread >  

Re: multi-pool malloc wip diff

2016-03-28 Thread Henrik Friedrichsen
Just a subjective opinion (if that counts as feedback): This in combination with the scheduler patch by mpi@ seems to greatly improve the browsing experience with Chrome, esp. when opening/closing tabs, which I suppose involves a lot of memory management calls? Other than that I haven't noticed

Re: multi-pool malloc wip diff

2016-03-28 Thread Otto Moerbeek
On Mon, Mar 28, 2016 at 11:43:22AM +0200, Otto Moerbeek wrote: > No specifics, just watch out for malloc related bugs. It's > both important that non-threaded programs and non-threaded programs > show no new bugs. And don't forget to test non-threaded programs ;-)

Re: multi-pool malloc wip diff

2016-03-28 Thread Otto Moerbeek
On Mon, Mar 28, 2016 at 03:40:21AM -0600, Abel Abraham Camarillo Ojeda wrote: > On Mon, Mar 28, 2016 at 3:27 AM, Otto Moerbeek wrote: > > On Wed, Mar 23, 2016 at 08:00:19AM +0100, Otto Moerbeek wrote: > > > >> Hi, > >> > >> first diff that seems to work. Tested on amd64 and

Re: multi-pool malloc wip diff

2016-03-28 Thread Abel Abraham Camarillo Ojeda
On Mon, Mar 28, 2016 at 3:27 AM, Otto Moerbeek wrote: > On Wed, Mar 23, 2016 at 08:00:19AM +0100, Otto Moerbeek wrote: > >> Hi, >> >> first diff that seems to work. Tested on amd64 and compile tested on >> sparc64. >> >> It is alo available at http://www.drijf.net/openbsd/malloc

Re: multi-pool malloc wip diff

2016-03-28 Thread Otto Moerbeek
On Wed, Mar 23, 2016 at 08:00:19AM +0100, Otto Moerbeek wrote: > Hi, > > first diff that seems to work. Tested on amd64 and compile tested on > sparc64. > > It is alo available at http://www.drijf.net/openbsd/malloc > > Form the README: > > The diff should be applied while in /usr/src/lib,

multi-pool malloc wip diff

2016-03-23 Thread Otto Moerbeek
Hi, first diff that seems to work. Tested on amd64 and compile tested on sparc64. It is alo available at http://www.drijf.net/openbsd/malloc Form the README: The diff should be applied while in /usr/src/lib, it will patch both librthreads as as well as libc. THIS IS WORK IN PROGRESS. It