Dear Nish,
Sorry that I cannot share the entire code as I have to face some licensing issues.
Please find the required code snapshots below.
please ask if I have missed something ...
Please see the source code explained briefly below:-
/* my_msleep() sleep milli(msec) seconds */
void my_msleep(int msec)
{
current->state = TASK_INTERRUPTIBLE;
schedule_timeout((msec * HZ)/1000);
}
{
MMCSD_RESPONSE2
{
..............
.............
/* gather the hardware interrupt reg status that is updated in the ISR context*/
..............
............
}
StandbyMMCSD(PCMMCSD pSD)
{
do
{
tifm_msleep(300);
}while(!MMCSD_RESPONSE2(pSD, 31, 31, false));
}
Code Description:
This is a part SD card Driver for 2.6.10 kernel & it works fine.
This part of the code is called in the ISR context from the bottomhalf when the SD Card is inserted to initialize the SD slot & card.
How did I diagnose the delay:
1) After inserting the card, I tried pressing the character '1' expecting the shedule_tiemout works by giving the keyboard process its time to execute and print 1's onto the screen. Instead, I found the a BIG delay of 20 characters. i.e. 20 characters printed at once after the SD card initialization is done.
2) With debug messages immediately before & after the schedule_timeout call.
3) Commenting the schedule_timeout call.
Regards,
Mukund Jampala
-----Original Message-----
From: Nish Aravamudan [mailto:[email protected]]
Sent: Monday, November 07, 2005 8:24 PM
To: Mukund JB.
Cc: Adrian Bunk; [email protected]
Subject: Re: Comments on 2.6.10 schedule_timeout please
On 11/7/05, Mukund JB. <[email protected]> wrote:
>
> Dear Kernel Developers,
>
> I have noticed the schedule_timeout behaving somewhat different as penned
> from the Linux 2.6 Oreelly books.
> I have developed a SD card Driver for 2.6.10 kernel & it works fine.
> I needed a hardware reg to update that take a time of 300ms. I have issued a
> call like..
>
> set_current_state(TASK_INTERRUPTIBLE);
> schedule_timeout (300*HZ/1000);
Full code or function snippet, please.
> But, when I finally use it I get a sufficient delay which looks like a looped delay
> not allowing the keyboard to print messages on the screen.
This would be easier to diagnose if you shared all of the code you are
using *and* verified this occurred with a current kernel (2.6.10 is
old.).
Thanks,
Nish
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]