* How to find out, what "pdflush" is working on
@ 2008-09-16 13:09 Martin Knoblauch
2008-09-16 19:07 ` Chris Snook
0 siblings, 1 reply; 4+ messages in thread
From: Martin Knoblauch @ 2008-09-16 13:09 UTC (permalink / raw)
To: linux-kernel; +Cc: Peter zijlstra, Fengguang Wu
Hi,
I find the following comment in mm/pdflush.c
/*
* The pdflush threads are worker threads for writing back dirty data.
* Ideally, we'd like one thread per active disk spindle. But the disk
* topology is very hard to divine at this level. Instead, we take
* care in various places to prevent more than one pdflush thread from
* performing writeback against a single filesystem. pdflush threads
* have the PF_FLUSHER flag set in current->flags to aid in this.
*/
Is there a way to find out what a certain instance of "pdflush" is working on? Like which block-device or which fliesystem it is writing to? I am still (2.6.27) trying to track down why writing a single file can make linux very sluggish and unresponsive. If that happens I usually see all possible 8 "pdflush" threads being in "D"-state. According to above comment only one of them should be really busy.
Cheers
Martin
------------------------------------------------------
Martin Knoblauch
email: k n o b i AT knobisoft DOT de
www: http://www.knobisoft.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to find out, what "pdflush" is working on
2008-09-16 13:09 How to find out, what "pdflush" is working on Martin Knoblauch
@ 2008-09-16 19:07 ` Chris Snook
2008-09-26 21:24 ` Frank Ch. Eigler
0 siblings, 1 reply; 4+ messages in thread
From: Chris Snook @ 2008-09-16 19:07 UTC (permalink / raw)
To: Martin Knoblauch; +Cc: linux-kernel, Peter zijlstra, Fengguang Wu
Martin Knoblauch wrote:
> Hi,
>
> I find the following comment in mm/pdflush.c
>
> /* * The pdflush threads are worker threads for writing back dirty data. *
> Ideally, we'd like one thread per active disk spindle. But the disk *
> topology is very hard to divine at this level. Instead, we take * care in
> various places to prevent more than one pdflush thread from * performing
> writeback against a single filesystem. pdflush threads * have the PF_FLUSHER
> flag set in current->flags to aid in this. */
>
> Is there a way to find out what a certain instance of "pdflush" is working
> on? Like which block-device or which fliesystem it is writing to? I am still
> (2.6.27) trying to track down why writing a single file can make linux very
> sluggish and unresponsive. If that happens I usually see all possible 8
> "pdflush" threads being in "D"-state. According to above comment only one of
> them should be really busy.
The key word is "ideally". We'd like it to work that way, but it doesn't.
Patches to fix this are welcome.
-- Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to find out, what "pdflush" is working on
@ 2008-09-17 8:11 Martin Knoblauch
0 siblings, 0 replies; 4+ messages in thread
From: Martin Knoblauch @ 2008-09-17 8:11 UTC (permalink / raw)
To: Chris Snook; +Cc: linux-kernel, Peter zijlstra, Fengguang Wu
----- Original Message ----
> From: Chris Snook <csnook@redhat.com>
> To: Martin Knoblauch <knobi@knobisoft.de>
> Cc: linux-kernel@vger.kernel.org; Peter zijlstra <a.p.zijlstra@chello.nl>; Fengguang Wu <wfg@mail.ustc.edu.cn>
> Sent: Tuesday, September 16, 2008 9:07:29 PM
> Subject: Re: How to find out, what "pdflush" is working on
>
> Martin Knoblauch wrote:
> > Hi,
> >
> > I find the following comment in mm/pdflush.c
> >
> > /* * The pdflush threads are worker threads for writing back dirty data. *
> > Ideally, we'd like one thread per active disk spindle. But the disk *
> > topology is very hard to divine at this level. Instead, we take * care in
> > various places to prevent more than one pdflush thread from * performing
> > writeback against a single filesystem. pdflush threads * have the PF_FLUSHER
> > flag set in current->flags to aid in this. */
> >
> > Is there a way to find out what a certain instance of "pdflush" is working
> > on? Like which block-device or which fliesystem it is writing to? I am still
> > (2.6.27) trying to track down why writing a single file can make linux very
> > sluggish and unresponsive. If that happens I usually see all possible 8
> > "pdflush" threads being in "D"-state. According to above comment only one of
> > them should be really busy.
>
> The key word is "ideally". We'd like it to work that way, but it doesn't.
> Patches to fix this are welcome.
>
Now, I am pretty much aware that apparently things are not "ideal". Therefore my question. Because before doing patches, one has to analyze.
Cheers
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to find out, what "pdflush" is working on
2008-09-16 19:07 ` Chris Snook
@ 2008-09-26 21:24 ` Frank Ch. Eigler
0 siblings, 0 replies; 4+ messages in thread
From: Frank Ch. Eigler @ 2008-09-26 21:24 UTC (permalink / raw)
To: Chris Snook
Cc: Martin Knoblauch, linux-kernel, Peter zijlstra, Fengguang Wu,
systemtap
> [...]
>> Is there a way to find out what a certain instance of "pdflush" is
>> working on? Like which block-device or which fliesystem it is
>> writing to? [...]
Something based upon the following systemtap script may help:
probe kernel.function("__writeback_single_inode") {
if (execname() == "pdflush")
printf("pdflush %d writeback bdev %x inode %x\n", tid(), $inode->i_rdev, $inode->i_ino)
}
Other fields are available as $inode->FOO.
- FChE
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-26 21:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16 13:09 How to find out, what "pdflush" is working on Martin Knoblauch
2008-09-16 19:07 ` Chris Snook
2008-09-26 21:24 ` Frank Ch. Eigler
-- strict thread matches above, loose matches on Subject: below --
2008-09-17 8:11 Martin Knoblauch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox