Re: Question: schedule()

Previous thread: [PATCH] x86_64 irq: keep consistent for changing IRQ0_VECTOR from 0x20 to 0x30 by Yinghai Lu on Tuesday, March 6, 2007 - 12:59 am. (6 messages)

Next thread: [PATCH 0/3][RFC] Containers: Pagecache accounting and control subsystem (v1) by Vaidyanathan Srinivasan on Tuesday, March 6, 2007 - 1:23 am. (10 messages)
From: Mockern
Date: Tuesday, March 6, 2007 - 1:18 am

Hi,

What does schedule() function do? I want to make my kthread preemptive.

Thanks
-

From: albcamus
Date: Tuesday, March 6, 2007 - 2:13 am

your kthread IS preemptible unless you call preempt_disable or some
locking functions explicitly .

Regards,
albcamus

-

From: Bill Davidsen
Date: Thursday, March 8, 2007 - 9:39 pm

I think he's trying to go the other way, make his thread the highest 
priority to blow anything else in the system out of the water. See his 
previous post "how to make kernel thread more faster?"

-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
-

From: Schmidt Michal
Date: Tuesday, March 6, 2007 - 2:14 am

It makes a scheduling decision, i.e. it assigns the CPU time to a
suitable runnable task. If called with the current task's state set to 
TASK_(UN)INTERRUPTIBLE, it puts the task to sleep.
Kernel threads are preemptible if the kernel is configured with 
CONFIG_PREEMPT.
What exactly are you trying to do?

If you're new to Linux kernel programming, I suggest you read Robert
Love's book "Linux Kernel Development".
"Linux Device Drivers" by J.Corbet, A.Rubini and G.Kroah-Hartman will be
very helpful too and it is available online: http://lwn.net/Kernel/LDD3/

Michal
-

Previous thread: [PATCH] x86_64 irq: keep consistent for changing IRQ0_VECTOR from 0x20 to 0x30 by Yinghai Lu on Tuesday, March 6, 2007 - 12:59 am. (6 messages)

Next thread: [PATCH 0/3][RFC] Containers: Pagecache accounting and control subsystem (v1) by Vaidyanathan Srinivasan on Tuesday, March 6, 2007 - 1:23 am. (10 messages)