From owner-svn-src-all@freebsd.org Thu Oct 17 06:58:09 2019 Return-Path: Delivered-To: svn-src-all@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 26AF11483B0; Thu, 17 Oct 2019 06:58:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46v0Nw53lkz3Nm8; Thu, 17 Oct 2019 06:58:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DF281CCC1; Thu, 17 Oct 2019 06:58:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9H6w8Ha050980; Thu, 17 Oct 2019 06:58:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9H6w89c050978; Thu, 17 Oct 2019 06:58:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201910170658.x9H6w89c050978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 17 Oct 2019 06:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353679 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 353679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2019 06:58:09 -0000 Author: avg Date: Thu Oct 17 06:58:07 2019 New Revision: 353679 URL: https://svnweb.freebsd.org/changeset/base/353679 Log: document taskqueue_start_threads_in_proc While here, fix taskqueue_start_threads_cpuset that was documented under old name of taskqueue_start_threads_pinned. MFC after: 4 weeks Modified: head/share/man/man9/Makefile head/share/man/man9/taskqueue.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Oct 17 06:32:34 2019 (r353678) +++ head/share/man/man9/Makefile Thu Oct 17 06:58:07 2019 (r353679) @@ -2085,7 +2085,8 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 taskqueue_run.9 \ taskqueue.9 taskqueue_set_callback.9 \ taskqueue.9 taskqueue_start_threads.9 \ - taskqueue.9 taskqueue_start_threads_pinned.9 \ + taskqueue.9 taskqueue_start_threads_cpuset.9 \ + taskqueue.9 taskqueue_start_threads_in_proc.9 \ taskqueue.9 taskqueue_unblock.9 \ taskqueue.9 TIMEOUT_TASK_INIT.9 MLINKS+=tcp_functions.9 register_tcp_functions.9 \ Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Thu Oct 17 06:32:34 2019 (r353678) +++ head/share/man/man9/taskqueue.9 Thu Oct 17 06:58:07 2019 (r353679) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 21, 2018 +.Dd October 17, 2019 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -69,10 +69,15 @@ struct timeout_task; .Ft int .Fn taskqueue_start_threads "struct taskqueue **tqp" "int count" "int pri" "const char *name" "..." .Ft int -.Fo taskqueue_start_threads_pinned -.Fa "struct taskqueue **tqp" "int count" "int pri" "int cpu_id" +.Fo taskqueue_start_threads_cpuset +.Fa "struct taskqueue **tqp" "int count" "int pri" "cpuset_t *mask" .Fa "const char *name" "..." .Fc +.Ft int +.Fo taskqueue_start_threads_in_proc +.Fa "struct taskqueue **tqp" "int count" "int pri" "struct proc *proc" +.Fa "const char *name" "..." +.Fc .Ft void .Fn taskqueue_set_callback "struct taskqueue *queue" "enum taskqueue_callback_type cb_type" "taskqueue_callback_fn callback" "void *context" .Ft void @@ -152,14 +157,20 @@ Any tasks that are on the queue will be executed at th which the thread servicing the queue will be signaled that it should exit. .Pp Once a taskqueue has been created, its threads should be started using -.Fn taskqueue_start_threads +.Fn taskqueue_start_threads , +.Fn taskqueue_start_threads_cpuset or -.Fn taskqueue_start_threads_pinned . -.Fn taskqueue_start_threads_pinned +.Fn taskqueue_start_threads_in_proc . +.Fn taskqueue_start_threads_cpuset takes a -.Va cpu_id +.Va cpuset argument which will cause the threads which are started for the taskqueue -to be pinned to run on the given CPU. +to be restricted to run on the given CPUs. +.Fn taskqueue_start_threads_in_proc +takes a +.Va proc +argument which will cause the threads which are started for the taskqueue +to be assigned to the given kernel process. Callbacks may optionally be registered using .Fn taskqueue_set_callback . Currently, callbacks may be registered for the following purposes: