lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4cefeab80803241034m6f62c01fq669129db9959f47f@mail.gmail.com>
Date:	Mon, 24 Mar 2008 23:04:18 +0530
From:	"Nitin Gupta" <nitingupta910@...il.com>
To:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 3/6] compcache: TLSF Allocator interface

On Mon, Mar 24, 2008 at 10:26 PM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Mon, 2008-03-24 at 20:34 +0530, Nitin Gupta wrote:
>  > Two Level Segregate Fit (TLSF) Allocator is used to allocate memory for
>  > variable size compressed pages. Its fast and gives low fragmentation.
>  > Following links give details on this allocator:
>  >  - http://rtportal.upv.es/rtmalloc/files/tlsf_paper_spe_2007.pdf
>  >  - http://code.google.com/p/compcache/wiki/TLSFAllocator
>  >
>  > This kernel port of TLSF (v2.3.2) introduces several changes but underlying
>  > algorithm remains the same.
>  >
>  > Changelog TLSF v2.3.2 vs this kernel port
>  >  - Pool now dynamically expands/shrinks.
>  >    It is collection of contiguous memory regions.
>  >  - Changes to pool create interface as a result of above change.
>  >  - Collect and export stats (/proc/tlsfinfo)
>  >  - Cleanups: kernel coding style, added comments, macros -> static inline, etc.
>
>  Can you explain why you need this allocator, why don't the current
>  kernel allocators work for you?
>
>

kmalloc() allocates one of pre-defined sizes (as defined in
kmalloc_sizes.h). This will surely cause severe fragmentation with
these variable sized compressed pages.

Whereas, TLSF maintains very fine grained size lists. In all the
workloads I tested, it showed <5% fragmentation. Also, its very simple
as just ~700 LOC.

- Nitin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ