On Thu, Apr 10, 2008 at 3:32 PM, bhanu nani <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>  I am trying to test kernel preemption in my driver. When I first
>  compiled the Linux kernel and tested it, I found it to be
>  non-preemptible. Later I realised that my kernel was build with
>  premption disabled. I enabled kernel premption in processort section
>  i.e. CONFIG_PREEMPT and rebuild it.

First time I read this article:
http://www.linuxdevices.com/articles/AT8211887833.html
and I learned tons a lot.

And this:

http://www.ussg.iu.edu/hypermail/linux/kernel/0403.2/0545.html

So I think advisable NOT to set CONFIG_PREEMPT.

>  Even with change in the kernel preemption does not work. I am trying
>  it on my latest stable kernel.
>
>  Test code:
>  --------------
>  read()
>  {
>    if(down_interruptible())
>            return error;
>    mdelay(10000);
>    up();
>  }
>
>  With this code in place, I try to do a 'CTRL+C' when it hangs at that delay.

As what Mulyadi has asked, how can u enter ctrl-C to some program that
u write in userspace, and expect it to stop a kernelspace module (from
the API u used above)?

Are u doing some kind of UML?

>  It does not respond to my 'CTRL + C'.
>
>  Where am I missing the preemption thing in the kernel?
>
>  Regards,
>  Bhanu J
>
>  --
>  To unsubscribe from this list: send an email with
>  "unsubscribe kernelnewbies" to [EMAIL PROTECTED]
>  Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to