2005-11-07 13:59:54

by Mukund JB.

[permalink] [raw]
Subject: Comments on 2.6.10 schedule_timeout please


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);

I guess schedule_timeout should calls the scheduler after ensuring that the current process is awakened at timeout
expiration.
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.

I verified it ...

1) with debug messages immediately before & after the schedule_timeout call.
2) Commenting the schedule_timeout call.

Can someone comment on the schedule_timeout please?

Regards,
Mukund Jampala

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Mukund JB.
Sent: Monday, November 07, 2005 6:39 PM
To: Adrian Bunk
Cc: [email protected]
Subject: RE: Which version of 2.6.11 is most stable



Dear Adrian,

Thanks for the information.
Also Can you please give inputs regarding.....

I have an existing Linux 2.6.11 BSP for an AMD GX processor.
What would it take me to port the complete BSP to 2.6.12 kernel?
Can I prefer to work on 2.6.11 kernel which makes me get the system up in no time without any changes made?
I guess 2.6.11 kernel will work with just a recompilation over 2.6.11.12 kernel.

An inquisitive question about Linux kernels versioning ...
How do 2.6.(x).1 and 2.6.(x).12 kernels vary?

Regards,
Mukund Jampala


-----Original Message-----
From: Adrian Bunk [mailto:[email protected]]
Sent: Monday, November 07, 2005 5:22 PM
To: Mukund JB.
Cc: [email protected]
Subject: Re: Which version of 2.6.11 is most stable


On Mon, Nov 07, 2005 at 03:38:13PM +0530, Mukund JB. wrote:
>
> Dear All,
>
> I am in the phase of development of a Linux BSP for 2.6.11 kernel.
> Which version of 2.6.11 kernel can be called best stable? In general where do i get this king of info?
> I serched in the http://www.lwn.net but i failed to get the required info.

The latest, IOW 2.6.11.12 .

But note that the 2.6.11 branch is no longer maintained since kernel
2.6.12 was released 5 months ago, and therefore lacks e.g. current
security fixes.

> Regards,
> Mukund Jampala

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


2005-11-07 14:53:31

by Nish Aravamudan

[permalink] [raw]
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

2005-11-07 16:07:38

by Mukund JB.

[permalink] [raw]
Subject: RE: Comments on 2.6.10 schedule_timeout please


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