Scheduler, or task priority problem ... i need help

Thomas TESTASECCA thomas.testasecca at
Thu Sep 5 05:00:18 EDT 2002

 Hi all,
I works on our design which is similar to the cdb89712 dev board ( ep7311,
1x16bits*4Mo strataflash ...)

I works with arm-linux-2.4.18-rmk7.

This is my problem :

I' ve got a periodic task which feeds the watchdog every 2 seconds, let's us
call it the WD task.

It's a shell script which looks like that :

while true; do

    echo 3000 > /proc/WD # i feed the Watch Dog

    sleep 2


Ok, it works fine most of the time.

I also have an ftp server running (pure-ftpd), with the "ftp" directory into
a jffs2.

When i upload (by ftp) a file into the jffs2 (for a 200kByte file it takes
approx 40s) during the upload time the pure-ftpd process really loads the
system, and my WD task, doesn't run anymore until the end of the upload.

It looks like the ftpd proccess had a higher priority than the WD process,
or it is the scheduler that doesn't do his job.

So i've tried to run "nice" on the two process, with max priority for WD
task, and min prio for ftp : the result is a little better : the WD process
runs approx every 15-20s during the upload ( instead of 2seconds !!! ).

I think it may come from MTD/JFFS2 that doesn't give the hand back to the

But that's not satisfactory !! i want the WD fed, when i want !!

Does anyone has experienced the same kind of problem ?

Any idea will be really appreciate ...



More information about the linux-mtd mailing list