Re: how to calculate time required for the execution of the entry point of the driver ?

2008-11-28 Thread Michael Blizek
Hi! On 14:40 Fri 28 Nov , yogeshwar sonawane wrote: > Hi all, > > 1) I have a driver code providing ioctl,read, write, mmap etc. entry points. > Now, i want to find the execution time of each entry point for comparison. > > How this can be done ? > for ex. > > take time_stamp1 > call entry p

Re: kmalloc() 's virtual address

2008-11-28 Thread JiSheng Zhang
I test it many times, the result( __pa(...) != look through page table ) appeared only once. replace k_pgd = pgd_offset_k(ka); with k_pgd = pgd_offset(current->mm, ka); the result should be OK. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to [EMAIL PROTECTED]

RE: Detecting infinite loops

2008-11-28 Thread Hayim Shaul
You can't. This is called 'The halting problem' and Alan Turing proved it is impossible in 1936. http://en.wikipedia.org/wiki/Halting_problem From: [EMAIL PROTECTED] on behalf of Pranav Peshwe Sent: Fri 28/11/2008 5:08 PM To: Kernel Subject: Re: Detecting

Re: Detecting infinite loops

2008-11-28 Thread Pranav Peshwe
Hi, On Fri, Nov 28, 2008 at 3:49 PM, yogeshwar sonawane <[EMAIL PROTECTED]>wrote: > Hi, > Thanks for correction. > > Main idea:- > I am talking about a program running in normal mode, not in gdb > mode(not using GDB). > Suppose the expected output should come in 10 min. Now, i run that program. >

question on priority imbalance in Linux SMP scheduler!

2008-11-28 Thread Thirupathiah Annapureddy
Hi All, I am new to linux kernel. I was refering to an interesting article titled "Inside the Linux scheduler", published at http://www.ibm.com/developerworks/linux/library/l-scheduler/. I have a questions related to "priority imbalance". The article mentions that each CPU has a runqueue made up

Re: Detecting infinite loops

2008-11-28 Thread megistos triskataratos
You might be able to do it with a spinlock.. you can hold a lock on your prog and repeatedly check whatever you want for example u can use jiffies or something, so that if it loops for like 1-2 secs you can release lock or whatever links i jumped into: http://en.wikipedia.org/wiki/Spinlock http://

Re: Detecting infinite loops

2008-11-28 Thread yogeshwar sonawane
Hi, Thanks for correction. Main idea:- I am talking about a program running in normal mode, not in gdb mode(not using GDB). Suppose the expected output should come in 10 min. Now, i run that program. It is running for quite some time now, like say 1hr. Still no output. That code has some infinite

Re: Detecting infinite loops

2008-11-28 Thread Pranav Peshwe
On Fri, Nov 28, 2008 at 2:25 PM, yogeshwar sonawane <[EMAIL PROTECTED]>wrote: > Hi all, > Suppose, I have an application or library code containing following :- > > while (expected condition has not occurred) > { >handling of expected condition > } > If i'm not wrong, you mean 'while (expecte

Re: Detecting infinite loops

2008-11-28 Thread sandeep lahane
How about gdb attach process_id ? Or I am missing something? Regards, Sandeep. On Fri, Nov 28, 2008 at 2:25 PM, yogeshwar sonawane <[EMAIL PROTECTED]> wrote: > Hi all, > Suppose, I have an application or library code containing following :- > > while (expected condition has not occurred) > {

Re: Info on driver code profiling tools

2008-11-28 Thread Belisko Marek
Hi, On Fri, Nov 28, 2008 at 10:03 AM, yogeshwar sonawane <[EMAIL PROTECTED]> wrote: > Hi all, > > I need some information on profilers which can profile driver codes for linux. > Mainly, it should be able to pin-point the functions which are taking > more time, plus some other info which can be he

how to calculate time required for the execution of the entry point of the driver ?

2008-11-28 Thread yogeshwar sonawane
Hi all, 1) I have a driver code providing ioctl,read, write, mmap etc. entry points. Now, i want to find the execution time of each entry point for comparison. How this can be done ? for ex. take time_stamp1 call entry point take time_stamp2 The above code from a user application can measure th

Info on driver code profiling tools

2008-11-28 Thread yogeshwar sonawane
Hi all, I need some information on profilers which can profile driver codes for linux. Mainly, it should be able to pin-point the functions which are taking more time, plus some other info which can be helpful in making code efficient. Kindly help me. Any reference/link will be useful. With reg

Detecting infinite loops

2008-11-28 Thread yogeshwar sonawane
Hi all, Suppose, I have an application or library code containing following :- while (expected condition has not occurred) { handling of expected condition } Now, If the expected condition does not occur, the program goes into an infinite loop. Now, how to detect this ? For user of the code w