Re: Wait free queue



Chris,

Thank you for your inquistive curiosity. I suspected that referring
to "help wanted" might imply work-pushing, rather than work-pulling.
But you can't pull work from a thread that requires fifo order. So it
seems reasonable for each client thread to be able to establish its
own ordering requirements, without the producer threads necessarily
having to know that information.

Am I using PDR? I don't know, am I? For some strange reason, I am
having a mental block on exactly what that acronym is for (Physician's
Desk Reference maybe?). Could you please illuminate what PDR and PDR
pointer actually are? As a matter of fact, I have been enjoying your
conversations with Dmitriy on these topics, and look forward to more.

What I have built is an all-purpose multi-threaded heap management
service: wait-free, non-atomic, per-thread local allocator, free
blocks from any other allocator by any thread, and always provides
ideal alignments. It operates at three scales: a multi-threaded
managed large virtual memory block allocator and recycler, a power of
2 allocator within virtual memory blocks, and a suballocator for all
block sizes below 4k and zero fragmentation. It maintains a separate
free list for each block size. It's performance is usually around 4x
the standard new/delete, often much better than that. It is fully
self contained and makes no system calls except for the large virtual
memory block management.

This service will successfully delete blocks allocated by other
threads, even after the originating thread has terminated. This
capability is not available from the standard new/delete, nor from any
other heap implementation I know of--they all just crash, mine does
not.

I have been writing allocators since the 8-bit days, so at some point,
we just may have ourselves a shoot-out...

Regards,

Chris Cochran
.



Relevant Pages

  • [rfc][patch 2/3] mm: bootmem2 - memory block oriented boot time allocator
    ... A boot time allocator that uses a bitmap for all pages in the system, ... +static inline int bootmem_node_block ... * A memory block oriented boot-time allocator. ...
    (Linux-Kernel)
  • Re: Usage of task queues
    ... >> any reason for kfree to sleep. ... > may cause other things to trigger which eventually gets you a sleep. ... sure kfree will actually return the memory to the buddy ... allocator even if there are no more used entries on the page. ...
    (comp.os.linux.development.system)
  • Re: [GIT PATCH] x86,percpu: fix pageattr handling with remap allocator
    ... The primary reason is this: ... unreasonable to expect a system having 32 CPUs to not need PAE). ... be wise to skip remap allocator on such machines. ... of virtual address space consumption. ...
    (Linux-Kernel)
  • Re: "new byte[132]" alignment on 16 bytes
    ... > instructions on this buffer without having to copy the memory block. ... > The SSE instructon set assumes that the starting physical memory block is ... another memory allocator to solve this too. ... it's a task for the CLR's heap manager which is the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [RFC PATCH 1/3] kmemleak: Allow partial freeing of memory blocks
    ... free_bootmem is called before the slab allocator ... extern void kmemleak_free; ... extern void kmemleak_padding(const void *ptr, unsigned long offset, ... Remove the metadata for a memory block from the ...
    (Linux-Kernel)