From: "Fajun Chen" <fajunchen@gmail.com>
To: James Chapman <jchapman@katalix.com>
Cc: Tejun Heo <htejun@gmail.com>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
linux-scsi@vger.kernel.org
Subject: Re: Process Scheduling Issue using sg/libata
Date: Sat, 17 Nov 2007 12:37:36 -0700 [thread overview]
Message-ID: <8202f4270711171137s46bbd096h2da024dd2d0d59da@mail.gmail.com> (raw)
In-Reply-To: <473F2154.3010201@katalix.com>
On 11/17/07, James Chapman <jchapman@katalix.com> wrote:
> Fajun Chen wrote:
> > On 11/16/07, Tejun Heo <htejun@gmail.com> wrote:
> >> Fajun Chen wrote:
> >>> I use sg/libata and ata pass through for read/writes. Linux 2.6.18-rc2
> >>> and libata version 2.00 are loaded on ARM XScale board. Under heavy
> >>> cpu load (e.g. when blocks per transfer/sector count is set to 1),
> >>> I've observed that the test application can suck cpu away for long
> >>> time (more than 20 seconds) and other processes including high
> >>> priority shell can not get the time slice to run. What's interesting
> >>> is that if the application is under heavy IO load (e.g. when blocks
> >>> per transfer/sector count is set to 256), the problem goes away. I
> >>> also tested with open source code sg_utils and got the same result, so
> >>> this is not a problem specific to my user-space application.
> >>>
> >>> Since user preemption is checked when the kernel is about to return to
> >>> user-space from a system call, process scheduler should be invoked
> >>> after each system call. Something seems to be broken here. I found a
> >>> similar issue below:
> >>> http://marc.info/?l=linux-arm-kernel&m=103121214521819&w=2
> >>> But that turns out to be an issue with MTD/JFFS2 drivers, which are
> >>> not used in my system.
> >>>
> >>> Has anyone experienced similar issues with sg/libata? Any information
> >>> would be greatly appreciated.
> >> That's one weird story. Does kernel say anything during that 20 seconds?
> >>
> > No. Nothing in kernel log.
> >
> > Fajun
>
> Have you considered using oprofile to find out what the CPU is doing
> during the 20 seconds?
>
Haven't tried oprofile yet, not sure if it will get the time slice to
run though. During this 20 seconds, I've verified that my application
is still busy with R/W ops.
> Does the problem occur when you put it under load using another method?
> What are the ATA and network drivers here? I've seen some awful
> out-of-tree device drivers hog the CPU with busy-waits and other crap.
> Oprofile results should show the culprit.
If blocks per transfer/sector count is set to 256, which means cpu has
less load (any other implications?), this problem no longer occurs.
Our target system uses libata sil24/pata680 drivers, has a customized
FIFO driver but no network driver. The relevant variable here is
blocks per transfer/sector count, which seems to matter only to
sg/libata.
Thanks,
Fajun
next prev parent reply other threads:[~2007-11-17 19:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-17 0:49 Process Scheduling Issue using sg/libata Fajun Chen
2007-11-17 3:02 ` Tejun Heo
2007-11-17 6:14 ` Fajun Chen
2007-11-17 17:13 ` James Chapman
2007-11-17 19:37 ` Fajun Chen [this message]
2007-11-17 4:30 ` Mark Lord
2007-11-17 7:20 ` Fajun Chen
2007-11-17 16:25 ` Mark Lord
2007-11-17 19:20 ` Fajun Chen
2007-11-17 19:55 ` Mark Lord
2007-11-18 6:48 ` Fajun Chen
2007-11-18 14:32 ` Mark Lord
2007-11-18 19:14 ` Fajun Chen
2007-11-18 19:54 ` Mark Lord
2007-11-18 22:29 ` Fajun Chen
2007-11-18 23:07 ` Mark Lord
2007-11-19 16:40 ` James Chapman
2007-11-19 16:51 ` Tejun Heo
2007-11-19 17:17 ` Alan Cox
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=8202f4270711171137s46bbd096h2da024dd2d0d59da@mail.gmail.com \
--to=fajunchen@gmail.com \
--cc=htejun@gmail.com \
--cc=jchapman@katalix.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@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