View previous topic :: View next topic |
Author |
Message |
donmartio Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/88175638141be03d17ce8f.jpg)
Joined: 11 Dec 2004 Posts: 261
|
Posted: Thu Jan 24, 2008 12:06 pm Post subject: LatencyTop Kernelpatch [Solved] |
|
|
Hey there,
i recently found this latencytop tool and would like to test it.
It's in portage so everything is fine so far. But it needs a patched kernel.
Now my question is, is there a 'good way' to patch the gentoo-souces?
Or should i wait 'til it is included?
Or has anybody got latencytop working?
Any help appreciated. _________________ Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live.
Last edited by donmartio on Sat Jan 26, 2008 7:08 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
frenkel Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/5863892633fc10143dfad9.gif)
Joined: 13 May 2003 Posts: 1034 Location: .nl
|
Posted: Thu Jan 24, 2008 1:14 pm Post subject: |
|
|
You can patch it yourself. Just download it from: http://www.latencytop.org/download.php
Cd to your /usr/src/linux/ dir and run a command like this:
Code: | patch -p0 < /dir/to/the/patch/latencytop.patch |
If that doesn't work, you might try -p1 instead. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
donmartio Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/88175638141be03d17ce8f.jpg)
Joined: 11 Dec 2004 Posts: 261
|
Posted: Thu Jan 24, 2008 6:49 pm Post subject: |
|
|
Well... thanks for the answer.
I looked inside the patch and it seems that it is for the 2.6.24 Kernel and the gentoo sources are 2.6.23.
The Patch is not vary big so i may try to patch it by hand.
But this is the kernel... may someone get this working a more 'smoother' way.
Greetings
DonMartio _________________ Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
frenkel Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/5863892633fc10143dfad9.gif)
Joined: 13 May 2003 Posts: 1034 Location: .nl
|
Posted: Thu Jan 24, 2008 8:32 pm Post subject: |
|
|
donmartio wrote: | Well... thanks for the answer.
I looked inside the patch and it seems that it is for the 2.6.24 Kernel and the gentoo sources are 2.6.23.
The Patch is not vary big so i may try to patch it by hand.
But this is the kernel... may someone get this working a more 'smoother' way.
Greetings
DonMartio |
Currently you can't get it working without patching the kernel. Read their website. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dark_knight Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/44106427644d6517c6e7d2.gif)
Joined: 22 Apr 2006 Posts: 112
|
Posted: Fri Jan 25, 2008 10:12 am Post subject: |
|
|
donmartio, did you successfully manage to patch the kernel and run the userspace app?
I'm asking because I've patched the 24-rc8 (waiting for stabilization ), activated CONFIG_LATENCYTOP and some other stuff, rebooted, ran the userspace application, but I can't get any result.
Thanks _________________ You can say that you are a true Gentoo-addicted when you type emerge --update --deep --newuse happiness. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
donmartio Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/88175638141be03d17ce8f.jpg)
Joined: 11 Dec 2004 Posts: 261
|
Posted: Fri Jan 25, 2008 5:16 pm Post subject: |
|
|
Ho dark_knight,
no, i try it as soon as i find some time.
I presume you are using the vanilla-sources.
You can't get any result includes that you can't get any response.
Which means no errors too?
Well a i said, the patch is not very big, but this is the kernel and i have to do some safety precautions.
I post here if i'm done. _________________ Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dark_knight Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/44106427644d6517c6e7d2.gif)
Joined: 22 Apr 2006 Posts: 112
|
Posted: Fri Jan 25, 2008 5:46 pm Post subject: |
|
|
donmartio wrote: | I presume you are using the vanilla-sources. |
Yeah, I'm using vanilla ATM, because I wanted to try some new features. But I think that I will revert back to gentoo-sources, if I get no results, as soon as my mirror will catch their update to .24
donmartio wrote: | You can't get any result includes that you can't get any response.
Which means no errors too? |
Yeah, even no errors. Through inspection of the userspace code I've spotted that the data are read from /proc/latency_stats, which, in my case, is laconically empty:
Code: | dark@darkplace ~ $ cat /proc/latency_stats
Latency Top version : v0.1
dark@darkplace ~ $ |
_________________ You can say that you are a true Gentoo-addicted when you type emerge --update --deep --newuse happiness. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
donmartio Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/88175638141be03d17ce8f.jpg)
Joined: 11 Dec 2004 Posts: 261
|
Posted: Fri Jan 25, 2008 8:48 pm Post subject: |
|
|
So finally i did it.
First thing is i got the same result. Latencytop shows an empty table if i start it.
But i think that is either i don't know ho to use it now or there are some kernel options missing.
But here is the patch i have build by using the other patch for gentoo-sources-2-6-23-r6
I made a copy of it which i called gentoo-sources-2-6-23-r9.
So here it is:
http://www.larkos.de/latencytop.patch
Now the only problem ist to get it working. _________________ Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hoacker Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/116941386646b8bb56ca430.png)
Joined: 04 Aug 2007 Posts: 505 Location: Bürstadt, Germany
|
Posted: Fri Jan 25, 2008 9:26 pm Post subject: |
|
|
Latencytop patch is included in master-devel branch of zen-sources (patch set based on linus' git tree, 2.6.24) and it just works for me...
Code: | # cat /proc/latency_stats
Latency Top version : v0.1
1610 19050407 206081 page fault ()
457 920155 82536 Unknown reason (kthread_create+0xb5/0x1)
...
|
Ebuilds for zen-sources are available in layman but I don't know which git branches they pull, I don't use them atm.
See:
http://www.zen-sources.org/
https://forums.gentoo.org/viewtopic-t-641834-highlight-.html
Maybe give it a try... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dark_knight Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/44106427644d6517c6e7d2.gif)
Joined: 22 Apr 2006 Posts: 112
|
Posted: Fri Jan 25, 2008 9:37 pm Post subject: |
|
|
donmartio wrote: | So finally i did it.
First thing is i got the same result. Latencytop shows an empty table if i start it. |
It's already a step forward... I've just tried, and the patch available on the website applies flawlessly on the gentoo-sources-2.6.24. Compiles fine.
I've not rebooted yet, though. Will do over the week-end (maybe).
hoacker wrote: | Latencytop patch is included in master-devel branch of zen-sources (patch set based on linus' git tree, 2.6.24) and it just works for me... |
Thanks for the info, but ATM I do not want to try another patchset. I still think that the reason might be a misconfiguration problem on my side. Could you please paste your .config please? So I can check differences from my kernel configuration. Thanks anyway! _________________ You can say that you are a true Gentoo-addicted when you type emerge --update --deep --newuse happiness. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hoacker Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/116941386646b8bb56ca430.png)
Joined: 04 Aug 2007 Posts: 505 Location: Bürstadt, Germany
|
Posted: Fri Jan 25, 2008 9:47 pm Post subject: |
|
|
dark_knight wrote: | Could you please paste your .config please? So I can check differences from my kernel configuration. Thanks anyway! |
My .config: http://pastebin.com/m6c20c5cb |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
donmartio Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/88175638141be03d17ce8f.jpg)
Joined: 11 Dec 2004 Posts: 261
|
Posted: Fri Jan 25, 2008 9:59 pm Post subject: |
|
|
And finally i found it
The latencytop kernel support is not enabled by default.
So if you do
Code: | sysctl -w kernel.latencytop=1 |
The feature is enabled and then latencytop show a lot of things.
Hope that helps _________________ Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dark_knight Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/44106427644d6517c6e7d2.gif)
Joined: 22 Apr 2006 Posts: 112
|
Posted: Fri Jan 25, 2008 10:13 pm Post subject: |
|
|
donmartio, I owe you a beer. Now it works ![Wink ;)](images/smiles/icon_wink.gif) _________________ You can say that you are a true Gentoo-addicted when you type emerge --update --deep --newuse happiness. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dark_knight Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/44106427644d6517c6e7d2.gif)
Joined: 22 Apr 2006 Posts: 112
|
Posted: Sun Jan 27, 2008 12:45 pm Post subject: |
|
|
Ok, it works, but I have another question now about the actual output of the program
This is an example of the output of the program, while on heavy compilation:
Code: | sync_buffer __wait_on_buffer sync_dirty_buffer jou1087.7 msec 681.4 msec
sync_buffer __wait_on_buffer __ext3_get_inode_loc 430.1 msec 37.6 msec
do_lookup __link_path_walk link_path_walk path_wal429.9 msec 230.5 msec
sync_page __lock_page do_generic_mapping_read gene404.2 msec 7.1 msec
get_request_wait __make_request generic_make_reque265.1 msec 149.8 msec
ide_do_drive_cmd cdrom_queue_packet_command cdrom_ 42.2 msec 42.2 msec
ide_do_drive_cmd cdrom_queue_packet_command cdrom_ 42.2 msec 42.2 msec
ide_do_drive_cmd cdrom_queue_packet_command cdrom_ 42.2 msec 32.6 msec
ide_do_drive_cmd cdrom_queue_packet_command cdrom_ 42.2 msec 37.2 msec |
As you can see, the program outputs the "bare" name (I guess) of the function on which the system lags most, messing the layout.
On the screenshots posted on the website http://www.latencytop.org/ , instead, I see that the program "resolves" the low-level name into a more understandable human-readable name. Has anyone else encountered this problem?
--nevermind: upgrading to the latest version solved the problem _________________ You can say that you are a true Gentoo-addicted when you type emerge --update --deep --newuse happiness. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|