LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-10-2011, 11:43 AM   #1
grap
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
Lightbulb Finding out the time elapsed between a disk I/O request generation and servicing.


We want to find out the time elapsed between a disk I/O request generated and it being serviced.

We tried to do so by using the difference between jiffies but many disk I/O requests are serviced before a "jiffy" is elapsed. So the difference returned 0.

Another approach is to use do_gettimeofday() function from time.h but we feel that the overhead in finding the time would be pretty huge if this function is fired for each request.

Please hint us on how to proceed with this so as to optimize the process.

We want to find this time because we need to monitor the workload on a system.
 
Old 02-10-2011, 05:14 PM   #2
MrPolite
Member
 
Registered: Jun 2002
Location: Middle of nowhere
Posts: 109

Rep: Reputation: 15
well why don't you measure the same time interval for many disk accesses and then try to divide to get the time per single access? :P
 
Old 02-11-2011, 12:50 AM   #3
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
have you tried using the time stamp counters ?
http://lwn.net/Articles/209101/
 
Old 02-12-2011, 01:27 AM   #4
grap
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks a lot for the replies.. Will look into it and post the result (if successful) here.
 
Old 02-13-2011, 05:47 AM   #5
grap
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
struct request {

sector_t __sector; /* sector cursor */

unsigned long start_time;

int ref_count;

unsigned long deadline;

/*and many more*/

};

Could anyone explain what each of these members of struct request (/include/linux/blkdev.h) mean ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get elapsed time HarryBoy Programming 2 08-08-2008 06:13 AM
diff. between elapsed time and cpu time madhugp Linux - General 1 01-15-2007 07:57 AM
find elapsed time innuendo_98 Programming 2 11-10-2005 08:03 AM
amarok progressbar time elapsed problem abattoir Linux - Software 0 04-13-2005 10:31 AM
getting elapsed time.. Mad_C Programming 2 04-01-2003 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration