Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LatencyTop Kernelpatch [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
donmartio
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 261

PostPosted: Thu Jan 24, 2008 12:06 pm    Post subject: LatencyTop Kernelpatch [Solved] Reply with quote

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
View user's profile Send private message
frenkel
Veteran
Veteran


Joined: 13 May 2003
Posts: 1034
Location: .nl

PostPosted: Thu Jan 24, 2008 1:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
donmartio
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 261

PostPosted: Thu Jan 24, 2008 6:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
frenkel
Veteran
Veteran


Joined: 13 May 2003
Posts: 1034
Location: .nl

PostPosted: Thu Jan 24, 2008 8:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
dark_knight
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2006
Posts: 112

PostPosted: Fri Jan 25, 2008 10:12 am    Post subject: Reply with quote

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
View user's profile Send private message
donmartio
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 261

PostPosted: Fri Jan 25, 2008 5:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
dark_knight
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2006
Posts: 112

PostPosted: Fri Jan 25, 2008 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
donmartio
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 261

PostPosted: Fri Jan 25, 2008 8:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
hoacker
Guru
Guru


Joined: 04 Aug 2007
Posts: 505
Location: Bürstadt, Germany

PostPosted: Fri Jan 25, 2008 9:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
dark_knight
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2006
Posts: 112

PostPosted: Fri Jan 25, 2008 9:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
hoacker
Guru
Guru


Joined: 04 Aug 2007
Posts: 505
Location: Bürstadt, Germany

PostPosted: Fri Jan 25, 2008 9:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
donmartio
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 261

PostPosted: Fri Jan 25, 2008 9:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
dark_knight
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2006
Posts: 112

PostPosted: Fri Jan 25, 2008 10:13 pm    Post subject: Reply with quote

donmartio, I owe you a beer. Now it works ;)
_________________
You can say that you are a true Gentoo-addicted when you type emerge --update --deep --newuse happiness.
Back to top
View user's profile Send private message
dark_knight
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2006
Posts: 112

PostPosted: Sun Jan 27, 2008 12:45 pm    Post subject: Reply with quote

Ok, it works, but I have another question now :P 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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum