mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC PATCH 0/3] add tlsf memory allocator
Date: Fri, 23 Dec 2011 14:20:38 +0300	[thread overview]
Message-ID: <CAA4bVAH_4iBABSq0dixBGkK=ddNGyHeD8-oqv+F6YC43idyJvQ@mail.gmail.com> (raw)
In-Reply-To: <20111223100421.GB27267@pengutronix.de>

On 23 December 2011 14:04, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Fri, Dec 09, 2011 at 10:17:29AM +0100, Sascha Hauer wrote:
>> Hi Antony,
>>
>> On Thu, Dec 08, 2011 at 06:03:46PM +0400, Antony Pavlov wrote:
>> > This patch series adds the tlsf memory allocator to barebox.
>> >
>> > TLSF: Two Level Segregated Fit memory allocator implementation.
>> > Written by Matthew Conte (matt@baisoku.org).
>> > Public Domain, no restrictions.
>> >
>> > [RFC PATCH 1/3] import TLSF 2.0
>> > [RFC PATCH 2/3] adapt tlsf for barebox
>> > [RFC PATCH 3/3] add tlsf-based malloc implementation
>>
>> The tlsf code looks really nice. Not that I even tried to understand it,
>> but it looks like one *could* understand the code when he has to (unlike
>> the dlmalloc code). It is also smaller in binary space and it has the
>> great advantage of having memory pools. Memory pools can be useful to
>> seperate the general malloc space from the ramfs malloc space, so that
>> a full ramfs does not crash barebox. It could also be used to implement
>> dma_alloc_coherent().
>>
>> Unfortunately there are two downsides. As the author already says on the
>> webpage it's slightly slower than dlmalloc. That's ok as long we do not
>> store big files in ramfs. The second one is that it needs a
>> memset(pool, 0, size) on initialization. Without it I was not able to
>> test your patches as barebox crashes before even the console was
>> initialized.
>
> This issue goes down to a bug in the console drivers. The most console
> drivers use xmalloc instead of xzalloc which caused unitialized flags.
> Somehow the tlsf allocater triggered this.
>
> So I'm going to merge this series.

Thank you, Sascha!

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2011-12-23 11:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08 14:03 Antony Pavlov
2011-12-08 14:03 ` [RFC PATCH 1/3] import TLSF 2.0 from http://tlsf.baisoku.org/tlsf-2.0.zip Antony Pavlov
2011-12-09  9:24   ` Sascha Hauer
2011-12-08 14:03 ` [RFC PATCH 2/3] adapt tlsf for barebox Antony Pavlov
2011-12-08 14:03 ` [RFC PATCH 3/3] add tlsf-based malloc implementation Antony Pavlov
2011-12-09  9:31   ` Sascha Hauer
2011-12-09  9:17 ` [RFC PATCH 0/3] add tlsf memory allocator Sascha Hauer
2011-12-23 10:04   ` Sascha Hauer
2011-12-23 11:20     ` Antony Pavlov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA4bVAH_4iBABSq0dixBGkK=ddNGyHeD8-oqv+F6YC43idyJvQ@mail.gmail.com' \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox