From owner-freebsd-current@FreeBSD.ORG Thu Aug 13 10:10:52 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E17C1065676; Thu, 13 Aug 2009 10:10:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id A79698FC47; Thu, 13 Aug 2009 10:10:51 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n7DAAj2F022308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Aug 2009 13:10:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n7DAAiNB056530; Thu, 13 Aug 2009 13:10:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n7DAAinG056529; Thu, 13 Aug 2009 13:10:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 13 Aug 2009 13:10:44 +0300 From: Kostik Belousov To: Andrew Thompson Message-ID: <20090813101044.GV1884@deviant.kiev.zoral.com.ua> References: <20090813073002.GA66860@citylink.fud.org.nz> <20090813082318.GP1884@deviant.kiev.zoral.com.ua> <1280352d0908130209m21ae1d48ud2881e84b5e18a78@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Z+65snTBT714SHJP" Content-Disposition: inline In-Reply-To: <1280352d0908130209m21ae1d48ud2881e84b5e18a78@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: current@freebsd.org, Hans Petter Selasky Subject: Re: usb kthreads X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 13 Aug 2009 10:10:52 -0000 --Z+65snTBT714SHJP Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 13, 2009 at 10:09:37AM +0100, Andrew Thompson wrote: > 2009/8/13 Kostik Belousov > > > > On Thu, Aug 13, 2009 at 12:30:02AM -0700, Andrew Thompson wrote: > > > Hi, > > > > > > > > > Here is an aesthetic patch to change the usb kernel processes to thre= ads, > > > this hides them from the usual 'ps' output. Please test and review. > > > > > > =9A1290 =9A?? =9ADL =9A =9A 0:00.00 [usbus0] > > > =9A[lots and lots more...] > > > =9A1309 =9A?? =9ADL =9A =9A 0:00.00 [usbus4] > > > > > > After the patch they can be seen as kernel threads. > > > > > > =9A PID =9A =9ATID COMM =9A =9A =9A =9A =9A =9A TDNAME =9A =9A =9A = =9A =9A CPU =9APRI STATE =9A WCHAN > > > =9A =9A 0 100000 kernel =9A =9A =9A =9A =9A swapper =9A =9A =9A =9A = =9A =9A0 =9A 68 sleep =9A sched > > > =9A =9A 0 100009 kernel =9A =9A =9A =9A =9A firmware taskq =9A =9A 0 = =9A 92 sleep =9A - > > > =9A =9A 0 100020 kernel =9A =9A =9A =9A =9A kqueue taskq =9A =9A =9A = 0 =9A 92 sleep =9A - > > > =9A =9A 0 100021 kernel =9A =9A =9A =9A =9A acpi_task_0 =9A =9A =9A = =9A0 =9A 92 sleep =9A - > > > =9A =9A 0 100022 kernel =9A =9A =9A =9A =9A acpi_task_1 =9A =9A =9A = =9A0 =9A 92 sleep =9A - > > > =9A =9A 0 100023 kernel =9A =9A =9A =9A =9A acpi_task_2 =9A =9A =9A = =9A0 =9A 92 sleep =9A - > > > =9A =9A 0 100027 kernel =9A =9A =9A =9A =9A thread taskq =9A =9A =9A = 0 =9A 92 sleep =9A - > > > =9A =9A 0 100031 kernel =9A =9A =9A =9A =9A bwi0 taskq =9A =9A =9A = =9A 0 =9A 16 sleep =9A - > > > =9A =9A 0 100032 kernel =9A =9A =9A =9A =9A bwi0 taskq =9A =9A =9A = =9A 0 =9A 16 sleep =9A - > > > =9A =9A 0 100106 kernel =9A =9A =9A =9A =9A usbus0 =9A =9A =9A =9A = =9A =9A 0 =9A 20 sleep =9A wmsg > > > =9A =9A 0 100107 kernel =9A =9A =9A =9A =9A usbus0 =9A =9A =9A =9A = =9A =9A 0 =9A 16 sleep =9A wmsg > > > =9A =9A 0 100108 kernel =9A =9A =9A =9A =9A usbus0 =9A =9A =9A =9A = =9A =9A 0 =9A 20 sleep =9A wmsg > > > =9A =9A 0 100109 kernel =9A =9A =9A =9A =9A usbus0 =9A =9A =9A =9A = =9A =9A 0 =9A 20 sleep =9A wmsg > > > =9A =9A [ ... ] > > > =9A =9A 0 100127 kernel =9A =9A =9A =9A =9A usbus4 =9A =9A =9A =9A = =9A =9A 0 =9A 20 sleep =9A wmsg > > > > > Can you use this opportunity to change "wmsg" wait channel name > > to something having "usb" in the name ? >=20 > When the thread is idle this should be `-` ? Taskqueue loop uses "-" as a name for the wait channel used when no work is scheduled, see subr_taskqueue.c:404.=20 --Z+65snTBT714SHJP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqD5qQACgkQC3+MBN1Mb4jyCQCgo8hN03Ml70gDzPr6Fm1XJXWU 6HgAoPYIBvI1xoXgTXPbCvAM5nyx4lmC =zk82 -----END PGP SIGNATURE----- --Z+65snTBT714SHJP--