![]() |
BFS for the power kernel
Hi all!
I have completed a first attempt at applying the BFS scheduler patch to both the power and the stock 2.6.28-omap1 kernel. The debian files here: http://coreyoconnor.com/downloads/ Will install the equivalent of the latest kernel-power + BFS patches. This can be installed over kernel-power just fine; The package manager will consider it an update. The patch for the stock kernel is located at: http://coreyoconnor.com/downloads/ke...6.28-bfs.patch I will be packaging up the patch for kernel-power shortly. For me kernel-power + BFS works great. Still, since I just got this working only apply if you are OK reflashing your device if something goes wrong. This will uninstall in the same way as kernel-power. The basic procedure for patching the stock kernel is similar to what is listed here: http://natisbad.org/N900/n900-custom-kernel.html suppose your stock kernel source is in the directory kernel-2.6.28-stock and the patch file is copied to the same directory then the procedure is Code:
host# cd kernel-2.6.28-stock Now switch to the kernel-2.6.28-stock within the scratchbox environment Code:
[sbox-FREMANTLE_ARMEL: ~/kernel-2.6.28-stock] > make rx51_defconfig I'm going to leave the instructions incomplete. If you've flashed a kernel and updated the kernel modules on your device you should be fine. Otherwise.. try it with the stock kernel first! How to package this up into a deb? Any pointers? UPDATE I have uploaded deb packages that are equivalent to the latest kernel-power packages plus the bfs patches. |
Re: BFS scheduler for N900
Where are your benchmarks? Unless this patch makes things perceptibly faster, (and subjective is not a good enough metric) then what is the point?
|
Re: BFS scheduler for N900
Ask the Android kids what the point is.
Plus, if you had read up on BFS you'd know it's goal is to reduce latency and benchmarking latency is much harder than the typical benchmarking of a single process performance. Which is what most benchmarks tests. Good for testing overclocking, doesn't tell you much of anything in this case. I can think of a few good latency tests but the error bounds may be quite high. Unless somebody has a robot to push buttons for me.... Single process benchmarks, like a web browser javascript benchmark, are easy to schedule. So the difference between CFS and BFS should be negligable. Still, i might as well run a few. what benchmarks would you like to see? One subjective difference that is significant enough to, IMO, be interesting is: the speed of my interactions with the phone are not diminished significantly when i am installing an application in the background. Not even the silly little graphical effects. |
Re: BFS scheduler for N900
It would be really cool it this was incorporated into Power kernel. Is it possible to have more than one scheduler in one kernel and doing a switch (not necessarily in runtime but after a reboot maybe).
When n900 is on high load its responsiveness leaves a great deal to be desired. Its even worse when it is overclocked. It sometimes (ie after installing an app in HAM) stalls for 30 or more seconds not responding to any user activity. I would like to test if and how BFS affects that but I really don't want to loose Power kernel features. |
Re: BFS scheduler for N900
Agreed. Integrating this patch into the power kernel would be great. I haven't checked out the power kernel patches yet, but I suspect they are largely orthogonal to this patch and should integrate easily.
|
Re: BFS for the power kernel
I added the voltage scaling patch referenced here:
http://omappedia.org/wiki/Patches_be..._yet_submitted The debs can be found at: http://www.tothepowerofdisco.com/downloads/ I am going to try to apply the patches under the "smart reflex fixes" heading next. No idea if these, or even the vp force patch, make any difference at all. |
Re: BFS for the power kernel
What about the other way - ask Titan to include BFS into Power Kernel. I do not think forking his job and creating new kernel line is advantageous. He recently corrected fcam-drivers in his kernel. Are you sure you want to maintain separate kernel line?
|
Re: BFS for the power kernel
This kernel is a branch of the git repository for Titan's kernel. :) So eventual inclusion should be easy.
The biggest reason I haven't been able to even send patches to Titan is that I am a git newbie and my repository is a mess! I'm not really even sure how to spit out patches O_o Some other reasons tho:
Um.. I think that's it! Thoughts? |
Re: BFS for the power kernel
will try this now... let you know how I do,
|
Re: BFS for the power kernel
I will give this a shot and run linpack benchmarks pre/post.
http://www.phoronix.com/scan.php?pag...nchmarks&num=1 For those who have no idea what this is about. Connor - looks like you have used ver 38 rather than 37 of Titans kernel - is that correct? |
Re: BFS for the power kernel
n900 says incompatible package : how do I install this properly?
also had right click and save-as to download as microb and me laptop both opened as txt documents which is weird. |
Re: BFS for the power kernel
Quote:
I think both are caused by my web serving giving no MIME type for the deb files. My bad. Give me a few minutes hehe Will post when I've verified as fixed. |
Re: BFS for the power kernel
Quote:
Well looks like I may have gotten myself fubared with this release. Boot loop. EDIT: Thank God for multiboot. Managed to boot into the stock kernel. Looks like you might need to check your files again CC. Just as a FYI I installed the 4 kernel-power debs and added a boot option to multiboot for the new kernel. Could the problem be the kernel image having the .fiasco extension and the modules dir not. |
Re: BFS for the power kernel
I have not used multiboot.
The install process should be identical to the kernel-power install process. I did not modify that part of debian control files. At least in theory. I will check :-) |
Re: BFS for the power kernel
Quote:
Ok have yet to be able to get this to boot. Sorry CC - will have to try it at some later date when its multiboot compat. Right now I have to work on getting back to a stable maemo env. |
Re: BFS for the power kernel
No worries at all!
I'll try out multiboot to see where the packages went wrong. Sounds like a nice idea: Rapidly switch between kernels. Would make comparison tests easier! |
Re: BFS for the power kernel
Installed and working on my test N900.
Will ensure validity of packages and then start benchmarking everything. |
Re: BFS for the power kernel
Installed and works fine so far ...
|
Re: BFS for the power kernel
I tested the equivalent of the latest kernel-power + BFS (used titan's ideal and default configuration).
I found that video on youtube always flickers if you use firefox mobile. Also the top opera status bar and the buttons located in the bottom left and right in opera start to flicker if you open a location. |
Re: BFS for the power kernel
Quote:
I have read that using the BFS scheduler can exacerbate race conditions. I thought it was in the BFS FAQ but now I can't locate where i read this. *shrug* I'll try firefox and opera out. While reading the BFS FAQ I noticed that Con recommends a different kernel timer config than this kernel is built with. That might also effect this. |
Re: BFS for the power kernel
It should be fairly easy to change the scheduler *live*... ;)
On any other Linux variant You can change it by using /sys/block/<block-device>/queue/scheduler... ;) I just had a look: Code:
N900:~# cat /sys/block/mmcblk0/queue/scheduler Code:
N900:~# echo noop > /sys/block/mmcblk0/queue/scheduler BTW - I'm using the power kernel (.37). EDIT - NEVERMIND! :) BFS isn't an I/O scheduler (guess I forgot that somewhere along the road)... I still wonder why CFQ is used instead of noop... ;) |
Re: BFS for the power kernel
Why would they use noop? The N900 doesn't have an SSD, and the flash in it behaves nothing like an SSD. noop is probably not that good of an idea..
Besides, you're talking about disk schedulers while the original poster was talking about the CPU scheduler... |
Re: BFS for the power kernel
Quote:
"NOOP scheduler is best used with solid state devices such as flash memory or in general with devices that do not depend on mechanical movement to access data" Quote:
|
Re: BFS for the power kernel
Quote:
What advantage is there to using noop? The popular Android device kernel from http://wiki.cyanogenmod.com uses the BFQ IO scheduler: http://lwn.net/Articles/275978/ I was considering incorporating this patch. Cause, hey, the Android kids presumably liked it for a reason. |
Re: BFS for the power kernel
Quote:
That's the way SSD's function (AFAIK), but I'm not sure about flash. Maybe shadowjk knows... :) Lot's of sites mention using noop for flash based drives: http://stackoverflow.com/questions/1...-i-o-scheduler: Quote:
Quote:
Quote:
|
Re: BFS for the power kernel
Well even the term "seek" is wrong for flash.. And ramdisks behave *completely* differently..
To simplify: when writing, a flash drive behaves alot like a slow harddrive from 1995 when reading, it's more like "seeks are free".. In other words, "seeks" matter if there's any write activity going on, and there cfq can help a bit What's more, a 256k sequential write can be as slow/fast as a 4k write, depending on the access patterns. Unfortunately no schedulers are flash aware. Yes, some are SSD aware, but SSDs have big friggin ARM processors and heaps of RAM to reorder data so that the weak parts of flash performance is hidden.. |
Re: BFS for the power kernel
Quote:
For anyone interested more info here... :) |
Re: BFS for the power kernel
I just leave this here for who is thinking wat?
don't mind me http://ck.kolivas.org/patches/bfs/sched-BFS.txt |
Re: BFS for the power kernel
I have just installed and tested it. The first thing that I have noticed is that vibration after touching the screen can take be up to 1 second long on high loads. On non-BFS kernels vibration was always very short (and on high load there was no vibration at all as device was not responding at all). I did a test with app manager - and it was certainly better than non-BFS because even with high load and paging I was able to interact with UI. But it was far from smooth. So far it is good. If I find anything interesting I will post here.
|
Re: BFS for the power kernel
Quote:
Intrestng stuff, but the most crucial: Quote:
Quote:
Intel needed to add a big ARM processor and megabytes of ram, not for buffer/cache, but for essentially running a log structured filesystem ontop of the raw flash :) The amount of resources they needed to make it fast all the time wont fit in a SD/mmc for quite some years yet :) |
Re: BFS for the power kernel
I have noticed that Opera is heavily influenced by BFS kernel. There is a lot of flickering and UI flashes and it looks buggy as hell. As I use Opera alot and this renders using this browser not very pleasant experience I will switch back to power kernel. This is propably due to bad coding in Opera exposed by BFS. Other software does not seem to be influenced at all.
|
Re: BFS for the power kernel
Quote:
Code:
The Simple I/O scheduler is an extremely simple scheduler, |
Re: BFS for the power kernel
Quote:
|
Re: BFS for the power kernel
This article mentions some new patches aimed at improving desktop responsiveness: http://www.phoronix.com/scan.php?pag...item&px=ODQ3Mw
I have been super busy lately with other projects but I will try back porting these patches in the next few days. |
Re: BFS for the power kernel
Quote:
|
Re: BFS for the power kernel
Quote:
Also, I'm sure you've came across this post too: Quote:
Just a heads-up, not a request ;) One more question btw: which version of BFS have you incorporated in the kernel-power? And if possible and time permits, could you try compiling the latest BFS patch with the (if possible, newest) kernel-power? Keep up the good work, I really like this thread. -iDont |
Re: BFS for the power kernel
Quote:
http://lkml.org/lkml/2010/8/1/40 However the 2.6.34+ vmscan.c has changed significantly from the 2.6.28 vmscan.c. I think I messed up somewhere cause my patch causes the device to stick in lumpy reclaim mode continuously. Basically makes it unusable as soon as any VM scan operation occurs. I have been travelling and haven't had a chance to work on any of the newer patches either. but I plan to! Quote:
I specifically started with the BFS 316 patch for 2.6.27 here: http://ck.kolivas.org/patches/bfs/Un...C-2.6.27.patch Although it contains a few bits and pieces from the 2.6.31 BFS 316 patch - Just because some of the 2.6.27 patch does not apply to 2.6.28. Course, now that I check I find that BFS is now up to 330.. HMM! Looks like an update is in order. My code is a proper branch of the kernel-power git tree. First on my list is to make a garage page for this branch. |
Re: BFS for the power kernel
I have no plans to enable BFS in the official kernel-power package as BFS seems to be to unstable and cannot be disabled during runtime.
You could, however, join the kernel-power project and create a git branch for your patches. Quote:
|
Re: BFS for the power kernel
Quote:
|
Re: BFS for the power kernel
Quote:
Quote:
Quote:
Again, keep up the good work, both you and Titan! -iDont |
All times are GMT. The time now is 05:27. |
vBulletin® Version 3.8.8