mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Haakon Riiser <haakon.riiser@fys.uio.no>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Busy-wait delay in qmail 1.03 after upgrading to Linux 2.6
Date: Tue, 13 Jan 2004 13:51:52 -0800	[thread overview]
Message-ID: <20040113135152.3ed26b85.akpm@osdl.org> (raw)
In-Reply-To: <20040113210923.GA955@s.chello.no>

Haakon Riiser <haakon.riiser@fys.uio.no> wrote:
>
> The entire output from strace is available for download from
> <http://home.chello.no/~hakonrk/2.6.1.strace.out>, but I think
> only this line is interesting:
> 
>   5083  16:00:30.714309 write(5, "\0", 1) = 1 <1.637019>
> 
> This the only write() to file descriptor 5 issued by qmail-queue,
> right before it exists, and this is what causes the delay.
> Notice that writing this single NUL-byte takes almost 1.64 seconds
> (the number in the angle brackets at the end of the line is the
> time spent in the system call, given by the -T flag to strace).
> Furthermore, the kernel appears to be busy-waiting in this system
> call, because the CPU usage quickly jumps to 100%.

Odd.

5083  16:00:30.714217 open("lock/trigger", O_WRONLY|O_NONBLOCK) = 5 <0.000013>
5083  16:00:30.714260 fcntl64(5, F_GETFL) = 0x801 (flags O_WRONLY|O_NONBLOCK) <0.000004>
5083  16:00:30.714287 fcntl64(5, F_SETFL, O_WRONLY|O_NONBLOCK) = 0 <0.000004>
5083  16:00:30.714309 write(5, "\0", 1) = 1 <1.637019>
5083  16:00:32.351378 close(5)          = 0 <0.000005>

Seems innocuous.  What filesystem type is lock/trigger on?

Can you generate a kernel profile of this activity?

Boot with `profile=1', copy this:

SM=/boot/System.map
TIMEFILE=/tmp/prof.time
sudo readprofile -r
sudo readprofile -M10
time $@
readprofile -n -v -m $SM | sort -n +2 | tail -40 | tee $TIMEFILE >&2

into /tmp/foo and do

	/tmp/foo whatever-command-you-were-using

Thanks.

  reply	other threads:[~2004-01-13 21:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13 21:09 Haakon Riiser
2004-01-13 21:51 ` Andrew Morton [this message]
2004-01-13 23:26   ` Haakon Riiser
2004-01-13 23:43     ` Andrew Morton
2004-01-14  0:07       ` Haakon Riiser
2004-01-14 11:29         ` Haakon Riiser
2004-01-20  0:46           ` Haakon Riiser
2004-01-13 23:46     ` Haakon Riiser
2004-01-14  0:06       ` Andrew Morton
2004-01-14 10:27       ` Giuliano Pochini
2004-01-14 11:20         ` Haakon Riiser
2004-01-15  0:12         ` Haakon Riiser
2004-01-20  5:51 Peter Maas
     [not found] <20040120021353.39e9155e.akpm@osdl.org>
2004-01-20 18:33 ` Fw: " Manfred Spraul
2004-01-20 19:22   ` Haakon Riiser
2004-01-20 19:45     ` Mike Fedyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040113135152.3ed26b85.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=haakon.riiser@fys.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome