Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Aug 2009 11:32:44 +0100
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        current@freebsd.org, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: usb kthreads
Message-ID:  <1280352d0908130332j1487ad09t79fe0e33433021ef@mail.gmail.com>
In-Reply-To: <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> <20090813101044.GV1884@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

2009/8/13 Kostik Belousov <kostikbel@gmail.com>:
> On Thu, Aug 13, 2009 at 10:09:37AM +0100, Andrew Thompson wrote:
>> 2009/8/13 Kostik Belousov <kostikbel@gmail.com>
>> >
>> > 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 threads,
>> > > this hides them from the usual 'ps' output. Please test and review.
>> > >
>> > >  1290  ??  DL     0:00.00 [usbus0]
>> > >  [lots and lots more...]
>> > >  1309  ??  DL     0:00.00 [usbus4]
>> > >
>> > > After the patch they can be seen as kernel threads.
>> > >
>> > >   PID    TID COMM             TDNAME           CPU  PRI STATE   WCHAN
>> > >     0 100000 kernel           swapper            0   68 sleep   sched
>> > >     0 100009 kernel           firmware taskq     0   92 sleep   -
>> > >     0 100020 kernel           kqueue taskq       0   92 sleep   -
>> > >     0 100021 kernel           acpi_task_0        0   92 sleep   -
>> > >     0 100022 kernel           acpi_task_1        0   92 sleep   -
>> > >     0 100023 kernel           acpi_task_2        0   92 sleep   -
>> > >     0 100027 kernel           thread taskq       0   92 sleep   -
>> > >     0 100031 kernel           bwi0 taskq         0   16 sleep   -
>> > >     0 100032 kernel           bwi0 taskq         0   16 sleep   -
>> > >     0 100106 kernel           usbus0             0   20 sleep   wmsg
>> > >     0 100107 kernel           usbus0             0   16 sleep   wmsg
>> > >     0 100108 kernel           usbus0             0   20 sleep   wmsg
>> > >     0 100109 kernel           usbus0             0   20 sleep   wmsg
>> > >     [ ... ]
>> > >     0 100127 kernel           usbus4             0   20 sleep   wmsg
>> > >
>> > Can you use this opportunity to change "wmsg" wait channel name
>> > to something having "usb" in the name ?
>>
>> 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.
>

Since the usb thread also uses a taskqueue-like system I will make it the same.

Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1280352d0908130332j1487ad09t79fe0e33433021ef>