On Thu, Sep 24, 2009 at 5:44 AM, Shameem Ahamed <[email protected]> wrote: > Hi, > > I was trying to implement a system tap script to measure the performance of > buffer (Primary Ram, not the processor cache). > > When i went through the kernel code, i could see that > > kernel will call the function __getblk to check whether the data is in > buffer or not. If it is not able to find the buffer in the hash table, it > will call the function __find_get_block_slow, to get the data from hard disk. > With the __find_get_block_slow i am not getting correct performance data. > > Am i right about the disk access function ?. Can anyone point me to the > correct disk access function to get data from HD in case of cache miss. > > Please help me. > > > Regards, > Shameem >
doing a ftrace stacktrace on a typical "head /var/log/messages" operation, i got the following stack trace: 475 head-25243 [000] 20698.350154: ext3_block_to_path <-ext3_get_blocks_handle 476 head-25243 [000] 20698.350154: <stack trace> 477 => ext3_get_blocks_handle 478 => ext3_getblk 479 => ext3_find_entry 480 => ext3_lookup 481 => do_lookup 482 => __link_path_walk 483 => path_walk 484 => do_path_lookup and here: 525 head-25243 [000] 20698.350215: __find_get_block_slow <-__find_get_block 526 head-25243 [000] 20698.350215: <stack trace> 527 => __find_get_block 528 => __getblk 529 => ext3_getblk 530 => ext3_find_entry 531 => ext3_lookup 532 => do_lookup 533 => __link_path_walk 534 => path_walk and here: 625 head-25243 [000] 20698.350325: __find_get_block_slow <-__find_get_block 626 head-25243 [000] 20698.350325: <stack trace> 627 => __find_get_block 628 => __getblk 629 => ext3_getblk 630 => ext3_bread 631 => dx_probe 632 => ext3_find_entry 633 => ext3_lookup 634 => do_lookup 635 head-25243 [000] 20698.350334: ext3_block_to_path <-ext3_get_blocks_handle 636 head-25243 [000] 20698.350334: <stack trace> 637 => ext3_get_blocks_handle 638 => ext3_getblk 639 => ext3_bread 640 => ext3_find_entry 641 => ext3_lookup 642 => do_lookup 643 => __link_path_walk 644 => path_walk Over the few snapshot/evolution of the stacktrace, you can more or less see how the calls are made. -- 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
