Re: Kernel code interrupted by Timer

2013-02-11 Thread Gaurav Jain
gt; for better performance. >> >> ** ** >> >> Jeff >> >> ** ** >> >> *From:* Gaurav Jain [mailto:gjainroor...@gmail.com] >> *Sent:* Friday, February 08, 2013 11:54 AM >> >> *To:* Jeff Haran >> *Subject:* Re: Kernel code interrupted

Re: Kernel code interrupted by Timer

2013-02-09 Thread anish kumar
On Sun, 2013-02-10 at 00:47 +0800, Peter Teoh wrote: > > > On Sun, Feb 10, 2013 at 12:22 AM, Frederic Weisbecker > wrote: > 2013/2/9 Peter Teoh : > > A search in the entire subtree of arch/x86/ and including > all its > > subdirectories, (for 3.2.0 kernel) return

Re: Kernel code interrupted by Timer

2013-02-09 Thread Peter Teoh
On Sun, Feb 10, 2013 at 12:22 AM, Frederic Weisbecker wrote: > 2013/2/9 Peter Teoh : > > A search in the entire subtree of arch/x86/ and including all its > > subdirectories, (for 3.2.0 kernel) return only TWO result where > > preempt_schedule_irq is called: kernel/entry_64.S and > kernel/entry_

Re: Kernel code interrupted by Timer

2013-02-09 Thread Frederic Weisbecker
2013/2/9 anish kumar : > Thanks Frederic. > On Sat, 2013-02-09 at 08:44 +0100, Frederic Weisbecker wrote: >> In the case you have CONFIG_PREEMPT and it's the turn for some other >> task to be scheduled, the function preempt_schedule_irq() is called >> right before the irq return to the interrupted

Re: Kernel code interrupted by Timer

2013-02-09 Thread Frederic Weisbecker
2013/2/9 Peter Teoh : > A search in the entire subtree of arch/x86/ and including all its > subdirectories, (for 3.2.0 kernel) return only TWO result where > preempt_schedule_irq is called: kernel/entry_64.S and kernel/entry_32.S. > And the called is in fact resume_kernel(), ie, it is NOT calle

Re: Kernel code interrupted by Timer

2013-02-09 Thread Peter Teoh
On Sat, Feb 9, 2013 at 8:07 PM, anish kumar wrote: > Thanks Frederic. > On Sat, 2013-02-09 at 08:44 +0100, Frederic Weisbecker wrote: > > 2013/2/8 Gaurav Jain : > > > What happens if the kernel executing in some process context (let's say > > > executing a time-consuming syscall) gets interrupted

Re: Kernel code interrupted by Timer

2013-02-09 Thread anish kumar
Thanks Frederic. On Sat, 2013-02-09 at 08:44 +0100, Frederic Weisbecker wrote: > 2013/2/8 Gaurav Jain : > > What happens if the kernel executing in some process context (let's say > > executing a time-consuming syscall) gets interrupted by the Timer - which is > > apparently allowed in 2.6 onwards

Re: Kernel code interrupted by Timer

2013-02-09 Thread Peter Teoh
On Sat, Feb 9, 2013 at 4:20 PM, Peter Teoh wrote: > > > On Sat, Feb 9, 2013 at 3:51 PM, anish kumar > wrote: > >> On Sat, 2013-02-09 at 14:57 +0800, Peter Teoh wrote: >> > >> > >> > On Sat, Feb 9, 2013 at 1:47 PM, anish kumar >> > . >> > Timer interrupts is supposed to cause scheduling a

Re: Kernel code interrupted by Timer

2013-02-09 Thread Peter Teoh
On Sat, Feb 9, 2013 at 3:51 PM, anish kumar wrote: > On Sat, 2013-02-09 at 14:57 +0800, Peter Teoh wrote: > > > > > > On Sat, Feb 9, 2013 at 1:47 PM, anish kumar > > . > > Timer interrupts is supposed to cause scheduling and scheduler > > may or > > may not pick up your las

Re: Kernel code interrupted by Timer

2013-02-08 Thread anish kumar
On Sat, 2013-02-09 at 14:57 +0800, Peter Teoh wrote: > > > On Sat, Feb 9, 2013 at 1:47 PM, anish kumar > . > Timer interrupts is supposed to cause scheduling and scheduler > may or > may not pick up your last process(we always use the term > "task" in > ke

Re: Kernel code interrupted by Timer

2013-02-08 Thread Frederic Weisbecker
2013/2/8 Gaurav Jain : > What happens if the kernel executing in some process context (let's say > executing a time-consuming syscall) gets interrupted by the Timer - which is > apparently allowed in 2.6 onwards kernels. > > My understanding is that once the interrupt handler is done executing, we

Re: Kernel code interrupted by Timer

2013-02-08 Thread Peter Teoh
On Sat, Feb 9, 2013 at 1:47 PM, anish kumar . > > Timer interrupts is supposed to cause scheduling and scheduler may or > may not pick up your last process(we always use the term "task" in > kernel space) after handling timer interrupt. > > > Sorry if I may disagree, correct me if wrong. Timer i

Re: Kernel code interrupted by Timer

2013-02-08 Thread anish kumar
On Fri, 2013-02-08 at 18:08 +0100, Gaurav Jain wrote: > What happens if the kernel executing in some process context (let's > say executing a time-consuming syscall) gets interrupted by the Timer > - which is apparently allowed in 2.6 onwards kernels. > > > My understanding is that once the inter

Re: Kernel code interrupted by Timer

2013-02-08 Thread Peter Teoh
On Sat, Feb 9, 2013 at 8:08 AM, Peter Teoh wrote: > > > On Sat, Feb 9, 2013 at 1:08 AM, Gaurav Jain wrote: > >> What happens if the kernel executing in some process context (let's say >> executing a time-consuming syscall) gets interrupted by the Timer - which >> is apparently allowed in 2.6 onwa

Re: Kernel code interrupted by Timer

2013-02-08 Thread Peter Teoh
On Sat, Feb 9, 2013 at 1:08 AM, Gaurav Jain wrote: > What happens if the kernel executing in some process context (let's say > executing a time-consuming syscall) gets interrupted by the Timer - which > is apparently allowed in 2.6 onwards kernels. > > My understanding is that once the interrupt

Kernel code interrupted by Timer

2013-02-08 Thread Gaurav Jain
What happens if the kernel executing in some process context (let's say executing a time-consuming syscall) gets interrupted by the Timer - which is apparently allowed in 2.6 onwards kernels. My understanding is that once the interrupt handler is done executing, we should switch back to where the