[RFC] libdispatch (aka Grand Central Dispatch) in base

Nathan Whitehorn nwhitehorn at freebsd.org
Wed Oct 30 04:01:57 UTC 2013


On 10/29/13 21:04, Teske, Devin wrote:
> Hi all,
>
> I'd like to bring up the discussion for topic..
>
> Importing libdispatch (aka Apple's Grand Central Dispatch) into base (contrib?).
>
> Specifically into HEAD then MFC'd only as far back as stable/10.
>
> Here's the reason why:
> http://devinteske.com/freebsd-installer-enhancements
>
> Summary:
> For the purpose of providing a concurrency model better than pthreads for the
> expressed desire to bring about concurrent data processing (applicable directly
> to distributions, packages, signing and more).
>
> Multiple people have confirmed with me with respect to the above blog article
> that the concurrency model would be most efficient with libdispatch.
>
> Since the tool mentioned in the blog is
> a. Compiling with clang
> b. Requires newest dialog(3) that is only in stable/10 or higher
>
> I'd say that it looks like a match made in heaven.
>
> But of course, there's that one hang-up... dispatch is not available in base yet.
>
> Is anyone working on getting dispatch into base?

I have no opinion on GCD in base -- probably a good idea -- but I was 
hoping you could explain further what you are trying to do here. 
Parallelism in these steps is usually of very limited utility. For 
checksum evaluation, it could speed things up on multicore systems. For 
fetch and extract, however, it either has no effect (if you are 
bandwidth limited during fetch) or slows things down significantly by 
causing extra seeks. This problem is especially bad for CD installs. For 
extract, it can actually cause lasting problems on the installed system 
by increasing disk fragmentation.
-Nathan


More information about the freebsd-current mailing list