From owner-freebsd-current@freebsd.org Thu Oct 24 18:46:45 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CB84177237 for ; Thu, 24 Oct 2019 18:46:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46zbnJ3YK9z4SKJ for ; Thu, 24 Oct 2019 18:46:44 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f173.google.com with SMTP id s5so6151113oie.10 for ; Thu, 24 Oct 2019 11:46:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wjOYhqUQ5vLP+Uh3y9g+UtNhpcluDCoNu4uEx6+h4EA=; b=HQnaGeEiKg1LDFGmLLtx26p7GGxGSW36ofj0cY7mtO7cOWE9Qf7NBO5m0Ac1XGWDbU 2TfiAgFSCjF8HofZaT9u5BeJT83r7skT5D66Z/cYaRsGmD308apSPZRx5wMKzS4FNYaB OUo/F4nhKXjZ6xlFPWjBJq9CBrWvoxCiDpfafNbORaKTb/x+FzgbQidysuExeXMaOvas cHoNSJVsbdMFHBu2KiLLGublx+vtGfuHv99xC2xdgLiLki7+zSGat+gSnarRMql1s9pr zrFcpy6SzKwLV0T4EJffu6HxNRPJ0PEtCKI8a7ARlGcpVtO4OOqHavt7mwzPTBLT0r3M 1wyw== X-Gm-Message-State: APjAAAV4EAk4HHT3FQ8C7O8zP3MjlSqHegJyoQ6n5xXSooTxE6DuYxla AnWx34Yn2XYB1QAmywDXIbHobKN1S+Ut/DUyOJTqW68/mcs= X-Google-Smtp-Source: APXvYqw/d7dVeoQJ4bjn1uoApJVqlVHK2yqsowWRntqYIABcxB+kEQ5b2x/PiNv/dFYFm3xrKc7sIakIkQe87QMN/GY= X-Received: by 2002:a54:4519:: with SMTP id l25mr5747796oil.143.1571942802714; Thu, 24 Oct 2019 11:46:42 -0700 (PDT) MIME-Version: 1.0 From: Alan Somers Date: Thu, 24 Oct 2019 12:46:31 -0600 Message-ID: Subject: Best thread pool implementation for the base system? To: FreeBSD CURRENT X-Rspamd-Queue-Id: 46zbnJ3YK9z4SKJ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.173 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.16 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[173.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.16)[ip: (-0.45), ipnet: 209.85.128.0/17(-3.22), asn: 15169(-2.05), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[173.167.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2019 18:46:45 -0000 I count 5 thread pool implementations in contrib: * cddl/compat/opensolaris/misc/thread_pool.c * contrib/apr-util/misc/apr_thread_pool.c * contrib/llvm/lib/Support/ThreadPool.cpp * contrib/openmp/runtime/src/kmp_tasking.cpp * contrib/ofed/opensm/complib/cl_threadpool.c However, I can't find any examples outside of contrib. I'd like to use one in /sbin/geli. Shall I roll my own (as everybody else apparently does), or is there something I'm not aware of? -Alan