linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unneeded kernel threads (xfs, jfs, gfs2)
@ 2008-05-12 22:55 Georgi Chorbadzhiyski
  2008-05-12 23:21 ` Jan Engelhardt
  2008-05-13  5:29 ` Donald Douwsma
  0 siblings, 2 replies; 13+ messages in thread
From: Georgi Chorbadzhiyski @ 2008-05-12 22:55 UTC (permalink / raw)
  To: xfs, jfs-discussion, cluster-devel; +Cc: Linux Kernel Mailing List

Hi guys, I know that not all kernel thread users are converted to
start only when needed but the following is little annoying specially
when I'm not even using jfs, xfs and gfs2.

Look at the ps output from a standard distro 2.6.24.5 kernel after a
fresh boot:

>   PID TTY      STAT   TIME COMMAND
>     2 ?        S<     0:00 [kthreadd]
>     3 ?        S<     0:00  \_ [migration/0]
>     4 ?        S<     0:00  \_ [ksoftirqd/0]
>     5 ?        S<     0:00  \_ [migration/1]
>     6 ?        S<     0:00  \_ [ksoftirqd/1]
>     7 ?        S<     0:00  \_ [events/0]
>     8 ?        S<     0:00  \_ [events/1]
>     9 ?        S<     0:00  \_ [khelper]
>   102 ?        S<     0:00  \_ [kblockd/0]
>   103 ?        S<     0:00  \_ [kblockd/1]
>   106 ?        S<     0:00  \_ [kacpid]
>   107 ?        S<     0:00  \_ [kacpi_notify]
>   230 ?        S<     0:00  \_ [ata/0]
>   231 ?        S<     0:00  \_ [ata/1]
>   232 ?        S<     0:00  \_ [ata_aux]
>   233 ?        S<     0:00  \_ [ksuspend_usbd]
>   239 ?        S<     0:00  \_ [khubd]
>   242 ?        S<     0:00  \_ [kseriod]
>   284 ?        S      0:00  \_ [pdflush]
>   285 ?        S      0:00  \_ [pdflush]
>   286 ?        S<     0:00  \_ [kswapd0]
>   326 ?        S<     0:00  \_ [aio/0]
>   327 ?        S<     0:00  \_ [aio/1]
>   349 ?        S<     0:00  \_ [jfsIO]
>   350 ?        S<     0:00  \_ [jfsCommit]
>   351 ?        S<     0:00  \_ [jfsCommit]
>   352 ?        S<     0:00  \_ [jfsSync]

Not needed here, because no jfs partition is in use.

>   354 ?        S<     0:00  \_ [xfslogd/0]
>   355 ?        S<     0:00  \_ [xfslogd/1]
>   356 ?        S<     0:00  \_ [xfsdatad/0]
>   357 ?        S<     0:00  \_ [xfsdatad/1]
>   361 ?        S<     0:00  \_ [xfs_mru_cache]

Not needed here, because no xfs partition is in use.

>   366 ?        S<     0:00  \_ [gfs2_scand]
>   367 ?        S<     0:00  \_ [glock_workqueue]
>   368 ?        S<     0:00  \_ [glock_workqueue]

I dont use gfs2

>  1047 ?        S<     0:00  \_ [scsi_tgtd/0]
>  1048 ?        S<     0:00  \_ [scsi_tgtd/1]
>  1118 ?        S<     0:00  \_ [scsi_eh_2]
>  1120 ?        S<     0:00  \_ [scsi_eh_3]
>  1122 ?        S<     0:00  \_ [scsi_eh_4]
>  1124 ?        S<     0:00  \_ [scsi_eh_5]
>  1133 ?        S<     0:00  \_ [exec-osm/0]
>  1134 ?        S<     0:00  \_ [exec-osm/1]
>  1140 ?        S<     0:00  \_ [block-osm/0]
>  1141 ?        S<     0:00  \_ [block-osm/1]

What is osm? Can't find anything in kernel config?

>  1148 ?        S<     0:00  \_ [khpsbpkt]

What is this?

>  1193 ?        S<     0:00  \_ [ksnapd]
>  1201 ?        S<     0:00  \_ [rpciod/0]
>  1202 ?        S<     0:00  \_ [rpciod/1]
>  1204 ?        S<     0:00  \_ [kjournald]
>  2448 ?        S<     0:00  \_ [kjournald]
>  2649 ?        S      0:00  \_ [lockd]

Kernel config can be found here:
  http://mirrors.unixsol.org/slackware/slackware-12.1/kernels/hugesmp.s/config

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-12 22:55 Unneeded kernel threads (xfs, jfs, gfs2) Georgi Chorbadzhiyski
@ 2008-05-12 23:21 ` Jan Engelhardt
  2008-05-13  8:36   ` Georgi Chorbadzhiyski
  2008-05-13  5:29 ` Donald Douwsma
  1 sibling, 1 reply; 13+ messages in thread
From: Jan Engelhardt @ 2008-05-12 23:21 UTC (permalink / raw)
  To: Georgi Chorbadzhiyski
  Cc: xfs, jfs-discussion, cluster-devel, Linux Kernel Mailing List


On Tuesday 2008-05-13 00:55, Georgi Chorbadzhiyski wrote:
>
>Not needed here, because no jfs partition is in use.
>Not needed here, because no xfs partition is in use.
>I dont use gfs2

You miss the best of Linux. So, why not unload the modules?

>>  1141 ?        S<     0:00  \_ [block-osm/1]
>
>What is osm? Can't find anything in kernel config?

drivers/message/i2o/i2o_block.c:#define OSM_NAME        "block-osm"

>>  1148 ?        S<     0:00  \_ [khpsbpkt]
>
>What is this?

ieee1394/ieee1394_core.c:static struct task_struct *khpsbpkt_thread;

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-12 22:55 Unneeded kernel threads (xfs, jfs, gfs2) Georgi Chorbadzhiyski
  2008-05-12 23:21 ` Jan Engelhardt
@ 2008-05-13  5:29 ` Donald Douwsma
  2008-05-13  5:51   ` FD Cami
                     ` (2 more replies)
  1 sibling, 3 replies; 13+ messages in thread
From: Donald Douwsma @ 2008-05-13  5:29 UTC (permalink / raw)
  To: Georgi Chorbadzhiyski
  Cc: xfs, jfs-discussion, cluster-devel, Linux Kernel Mailing List

Georgi Chorbadzhiyski wrote:
> Hi guys, I know that not all kernel thread users are converted to
> start only when needed but the following is little annoying specially
> when I'm not even using jfs, xfs and gfs2.
> 
> Look at the ps output from a standard distro 2.6.24.5 kernel after a
> fresh boot:
...

> 
> Kernel config can be found here:
>   http://mirrors.unixsol.org/slackware/slackware-12.1/kernels/hugesmp.s/config
> 

Your distro is building all of these modules into the kernel.
	CONFIG_XFS_FS=y
	CONFIG_JFS_FS=y
	CONFIG_GFS2_FS=y

This isnt exactly standard practice, normally they'd be set to =m and only
used if required to mount a filesystem. You may want to ask the slackware
people why they chose to do this for their hugexxx.s kernels.

Don




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  5:29 ` Donald Douwsma
@ 2008-05-13  5:51   ` FD Cami
  2008-05-13  8:33     ` Georgi Chorbadzhiyski
  2008-05-13  8:30   ` Georgi Chorbadzhiyski
  2008-05-13 13:31   ` Lennart Sorensen
  2 siblings, 1 reply; 13+ messages in thread
From: FD Cami @ 2008-05-13  5:51 UTC (permalink / raw)
  To: Donald Douwsma
  Cc: Georgi Chorbadzhiyski, xfs, jfs-discussion, cluster-devel,
	Linux Kernel Mailing List, volkerdi

On Tue, 13 May 2008 15:29:38 +1000
Donald Douwsma <donaldd@sgi.com> wrote:

> Georgi Chorbadzhiyski wrote:
> > Hi guys, I know that not all kernel thread users are converted to
> > start only when needed but the following is little annoying specially
> > when I'm not even using jfs, xfs and gfs2.
> > 
> > Look at the ps output from a standard distro 2.6.24.5 kernel after a
> > fresh boot:
> ...
> 
> > 
> > Kernel config can be found here:
> >   http://mirrors.unixsol.org/slackware/slackware-12.1/kernels/hugesmp.s/config
> > 
> 
> Your distro is building all of these modules into the kernel.
> 	CONFIG_XFS_FS=y
> 	CONFIG_JFS_FS=y
> 	CONFIG_GFS2_FS=y
> 
> This isnt exactly standard practice, normally they'd be set to =m and only
> used if required to mount a filesystem. You may want to ask the slackware
> people why they chose to do this for their hugexxx.s kernels.

To be able to use those filesystems on root partitions without requiring
an initrd. 

Georgi might be interested to use the generic kernel instead of the huge
one, it is available there :
http://mirrors.unixsol.org/slackware/slackware-12.1/slackware/a/kernel-generic-smp-2.6.24.5_smp-i686-2.tgz

Documentation :
http://mirrors.unixsol.org/slackware/slackware-12.1/README.TXT
http://mirrors.unixsol.org/slackware/slackware-12.1/README.initrd
http://mirrors.unixsol.org/slackware/slackware-12.1/RELEASE_NOTES

Cheers

Francois

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  5:29 ` Donald Douwsma
  2008-05-13  5:51   ` FD Cami
@ 2008-05-13  8:30   ` Georgi Chorbadzhiyski
  2008-05-13  9:03     ` David Chinner
  2008-05-13 13:31   ` Lennart Sorensen
  2 siblings, 1 reply; 13+ messages in thread
From: Georgi Chorbadzhiyski @ 2008-05-13  8:30 UTC (permalink / raw)
  To: Donald Douwsma
  Cc: xfs, jfs-discussion, cluster-devel, Linux Kernel Mailing List

Donald Douwsma mumbled something about, On 5/13/08 8:29 AM:
> Georgi Chorbadzhiyski wrote:
>> Hi guys, I know that not all kernel thread users are converted to
>> start only when needed but the following is little annoying specially
>> when I'm not even using jfs, xfs and gfs2.
>>
>> Look at the ps output from a standard distro 2.6.24.5 kernel after a
>> fresh boot:
> ...
> 
>> Kernel config can be found here:
>>   
>> http://mirrors.unixsol.org/slackware/slackware-12.1/kernels/hugesmp.s/config 
> 
> Your distro is building all of these modules into the kernel.
>     CONFIG_XFS_FS=y
>     CONFIG_JFS_FS=y
>     CONFIG_GFS2_FS=y
> 
> This isnt exactly standard practice, normally they'd be set to =m and only
> used if required to mount a filesystem. You may want to ask the slackware
> people why they chose to do this for their hugexxx.s kernels.

I know that they are compiled in the kernel, but since they
are not used isn't starting their own kthreads kind of
unnecessary? Surely the threads can be started on demand
only when xfs/etc volume is mounted.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  5:51   ` FD Cami
@ 2008-05-13  8:33     ` Georgi Chorbadzhiyski
  0 siblings, 0 replies; 13+ messages in thread
From: Georgi Chorbadzhiyski @ 2008-05-13  8:33 UTC (permalink / raw)
  To: FD Cami
  Cc: Donald Douwsma, xfs, jfs-discussion, cluster-devel,
	Linux Kernel Mailing List, volkerdi

FD Cami mumbled something about, On 5/13/08 8:51 AM:
> On Tue, 13 May 2008 15:29:38 +1000
> Donald Douwsma <donaldd@sgi.com> wrote:
> 
>> Georgi Chorbadzhiyski wrote:
>>> Hi guys, I know that not all kernel thread users are converted to
>>> start only when needed but the following is little annoying specially
>>> when I'm not even using jfs, xfs and gfs2.
>>>
>>> Look at the ps output from a standard distro 2.6.24.5 kernel after a
>>> fresh boot:
>> ...
>>
>>> Kernel config can be found here:
>>>   http://mirrors.unixsol.org/slackware/slackware-12.1/kernels/hugesmp.s/config
>>>
>> Your distro is building all of these modules into the kernel.
>> 	CONFIG_XFS_FS=y
>> 	CONFIG_JFS_FS=y
>> 	CONFIG_GFS2_FS=y
>>
>> This isnt exactly standard practice, normally they'd be set to =m and only
>> used if required to mount a filesystem. You may want to ask the slackware
>> people why they chose to do this for their hugexxx.s kernels.
> 
> To be able to use those filesystems on root partitions without requiring
> an initrd. 
> 
> Georgi might be interested to use the generic kernel instead of the huge
> one, it is available there :
> http://mirrors.unixsol.org/slackware/slackware-12.1/slackware/a/kernel-generic-smp-2.6.24.5_smp-i686-2.tgz

I'm well aware of this kernels but I prefer to not use
initrd when possible and still have most of the functionality
available.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-12 23:21 ` Jan Engelhardt
@ 2008-05-13  8:36   ` Georgi Chorbadzhiyski
  2008-05-14 17:22     ` Stefan Richter
  0 siblings, 1 reply; 13+ messages in thread
From: Georgi Chorbadzhiyski @ 2008-05-13  8:36 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: xfs, jfs-discussion, cluster-devel, Linux Kernel Mailing List

Jan Engelhardt mumbled something about, On 5/13/08 2:21 AM:
> On Tuesday 2008-05-13 00:55, Georgi Chorbadzhiyski wrote:
>> Not needed here, because no jfs partition is in use.
>> Not needed here, because no xfs partition is in use.
>> I dont use gfs2
> 
> You miss the best of Linux. So, why not unload the modules?

ext3 is working just fine for now, thanks (:

>>>  1141 ?        S<     0:00  \_ [block-osm/1]
>> What is osm? Can't find anything in kernel config?
> 
> drivers/message/i2o/i2o_block.c:#define OSM_NAME        "block-osm"
> 
>>>  1148 ?        S<     0:00  \_ [khpsbpkt]
>> What is this?
> 
> ieee1394/ieee1394_core.c:static struct task_struct *khpsbpkt_thread;

Strange names :)

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  8:30   ` Georgi Chorbadzhiyski
@ 2008-05-13  9:03     ` David Chinner
  2008-05-13  9:21       ` [Jfs-discussion] " Christoph Hellwig
  0 siblings, 1 reply; 13+ messages in thread
From: David Chinner @ 2008-05-13  9:03 UTC (permalink / raw)
  To: Georgi Chorbadzhiyski
  Cc: Donald Douwsma, xfs, jfs-discussion, cluster-devel,
	Linux Kernel Mailing List

On Tue, May 13, 2008 at 11:30:59AM +0300, Georgi Chorbadzhiyski wrote:
> >>http://mirrors.unixsol.org/slackware/slackware-12.1/kernels/hugesmp.s/config 
> >
> >Your distro is building all of these modules into the kernel.
> >    CONFIG_XFS_FS=y
> >    CONFIG_JFS_FS=y
> >    CONFIG_GFS2_FS=y
> >
> >This isnt exactly standard practice, normally they'd be set to =m and only
> >used if required to mount a filesystem. You may want to ask the slackware
> >people why they chose to do this for their hugexxx.s kernels.
> 
> I know that they are compiled in the kernel, but since they
> are not used isn't starting their own kthreads kind of
> unnecessary? Surely the threads can be started on demand
> only when xfs/etc volume is mounted.

Sure - XFS will start another three kernel threads per filesystem
that gets mounted. And for good measure, it cleans them up again
on unmount. :)

The other threads are per-cpu workqueue threads that are shared
across all XFS filesystems in the system and hence are started
when XFS is initialised rather than when a mount occurs.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Jfs-discussion] Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  9:03     ` David Chinner
@ 2008-05-13  9:21       ` Christoph Hellwig
  2008-05-13  9:28         ` Christoph Hellwig
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Hellwig @ 2008-05-13  9:21 UTC (permalink / raw)
  To: David Chinner
  Cc: Georgi Chorbadzhiyski, cluster-devel, Linux Kernel Mailing List,
	jfs-discussion, Donald Douwsma, xfs

On Tue, May 13, 2008 at 07:03:11PM +1000, David Chinner wrote:
> Sure - XFS will start another three kernel threads per filesystem
> that gets mounted. And for good measure, it cleans them up again
> on unmount. :)
> 
> The other threads are per-cpu workqueue threads that are shared
> across all XFS filesystems in the system and hence are started
> when XFS is initialised rather than when a mount occurs.

Well, we could refcount the number of active xfs instances and
start/stop the global threads based on that.  Not really worth my
time IHMO, but if someone comes up with a clean enough patch it should
go in.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Jfs-discussion] Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  9:21       ` [Jfs-discussion] " Christoph Hellwig
@ 2008-05-13  9:28         ` Christoph Hellwig
  2008-05-13 15:31           ` Eric Sandeen
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Hellwig @ 2008-05-13  9:28 UTC (permalink / raw)
  To: David Chinner
  Cc: Georgi Chorbadzhiyski, cluster-devel, Linux Kernel Mailing List,
	jfs-discussion, Donald Douwsma, xfs

On Tue, May 13, 2008 at 05:21:56AM -0400, Christoph Hellwig wrote:
> Well, we could refcount the number of active xfs instances and
> start/stop the global threads based on that.  Not really worth my
> time IHMO, but if someone comes up with a clean enough patch it should
> go in.

Actually doing it in the VFS might be even better.  Add ->init and
->exit methods to struct file_system_type and then the filesystems can
move most of module_init/exit into the new methods.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  5:29 ` Donald Douwsma
  2008-05-13  5:51   ` FD Cami
  2008-05-13  8:30   ` Georgi Chorbadzhiyski
@ 2008-05-13 13:31   ` Lennart Sorensen
  2 siblings, 0 replies; 13+ messages in thread
From: Lennart Sorensen @ 2008-05-13 13:31 UTC (permalink / raw)
  To: Donald Douwsma
  Cc: Georgi Chorbadzhiyski, xfs, jfs-discussion, cluster-devel,
	Linux Kernel Mailing List

On Tue, May 13, 2008 at 03:29:38PM +1000, Donald Douwsma wrote:
> Your distro is building all of these modules into the kernel.
> 	CONFIG_XFS_FS=y
> 	CONFIG_JFS_FS=y
> 	CONFIG_GFS2_FS=y
> 
> This isnt exactly standard practice, normally they'd be set to =m and only
> used if required to mount a filesystem. You may want to ask the slackware
> people why they chose to do this for their hugexxx.s kernels.

Because they have always done it that way so it has to be right? :)

-- 
Len Sorensen

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Jfs-discussion] Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  9:28         ` Christoph Hellwig
@ 2008-05-13 15:31           ` Eric Sandeen
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Sandeen @ 2008-05-13 15:31 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: David Chinner, Georgi Chorbadzhiyski, cluster-devel,
	Linux Kernel Mailing List, jfs-discussion, Donald Douwsma, xfs

Christoph Hellwig wrote:
> On Tue, May 13, 2008 at 05:21:56AM -0400, Christoph Hellwig wrote:
>> Well, we could refcount the number of active xfs instances and
>> start/stop the global threads based on that.  Not really worth my
>> time IHMO, but if someone comes up with a clean enough patch it should
>> go in.
> 
> Actually doing it in the VFS might be even better.  Add ->init and
> ->exit methods to struct file_system_type and then the filesystems can
> move most of module_init/exit into the new methods.

Hmm I like that idea! :)

-Eric

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Unneeded kernel threads (xfs, jfs, gfs2)
  2008-05-13  8:36   ` Georgi Chorbadzhiyski
@ 2008-05-14 17:22     ` Stefan Richter
  0 siblings, 0 replies; 13+ messages in thread
From: Stefan Richter @ 2008-05-14 17:22 UTC (permalink / raw)
  To: Georgi Chorbadzhiyski
  Cc: Jan Engelhardt, xfs, jfs-discussion, cluster-devel,
	Linux Kernel Mailing List

Georgi Chorbadzhiyski wrote:
> Jan Engelhardt mumbled something about, On 5/13/08 2:21 AM:
>> On Tuesday 2008-05-13 00:55, Georgi Chorbadzhiyski wrote:
>>>>  1148 ?        S<     0:00  \_ [khpsbpkt]
>>> What is this?
>> 
>> ieee1394/ieee1394_core.c:static struct task_struct *khpsbpkt_thread;
> 
> Strange names :)

Fixed in drivers/firewire/.  :-)

PS:
"k" = kernel
"hpsb" = High Performance Serial Bus ( = IEEE 1394)
"pkt" = packet  (The thread completes split transactions associated with
outbound request packets.)
-- 
Stefan Richter
-=====-==--- -=-= -===-
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-05-14 17:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-12 22:55 Unneeded kernel threads (xfs, jfs, gfs2) Georgi Chorbadzhiyski
2008-05-12 23:21 ` Jan Engelhardt
2008-05-13  8:36   ` Georgi Chorbadzhiyski
2008-05-14 17:22     ` Stefan Richter
2008-05-13  5:29 ` Donald Douwsma
2008-05-13  5:51   ` FD Cami
2008-05-13  8:33     ` Georgi Chorbadzhiyski
2008-05-13  8:30   ` Georgi Chorbadzhiyski
2008-05-13  9:03     ` David Chinner
2008-05-13  9:21       ` [Jfs-discussion] " Christoph Hellwig
2008-05-13  9:28         ` Christoph Hellwig
2008-05-13 15:31           ` Eric Sandeen
2008-05-13 13:31   ` Lennart Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).