maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   BFS for the power kernel (https://talk.maemo.org/showthread.php?t=58780)

Tigerite 2011-06-02 07:40

Re: BFS for the power kernel
 
I think we're veering wildly off-topic here; I only shared my settings in an attempt to help out. This isn't really the place for I/O benchmarks (though I do find them interesting) - BFS can only affect read/write speeds if a task is deactivated when it shouldn't be, causing I/O to remain unflushed, and the -ck patchset deals with swap primarily (though another of his patches drops dirty ratios to 1 - this wouldn't work in our kernel anyway as the code specifically sets a minimum of 5, so I left it out).

Tigerite 2011-06-02 14:49

Re: BFS for the power kernel
 
There was a fairly major bug in my backport of the mm-make_swappiness_really_mean_it patch, which I've now fixed by backporting a few lines of code from 2.6.32 to check whether priority is greater than 0 _or_ there is no swap space, as intended. I also took out the final vm_swap_full() check and tidied up the remnants of a previously-removed one (it had code that was no longer needed) in the drop_swap_cache_aggressively patch.

Also, the deadline and anticipatory I/O schedulers have now been built as modules into the kernel (if you cat /sys/block/mmcblk0/queue/scheduler you will still see only noop [cfq], but deadline or anticipatory can be echo'd as root and this will automagically insert the relevant module - it'll stay in memory from there on, even if the scheduler is reverted to cfq/noop).

Here're the relevant files (the latest changes are reflected in the git tree, and neither the flasher package nor dummy package have changed, so they're pointless to re-post):

Mandatory:
Modules

Then one of:
Standard package (for use with flasher package)
Multiboot package
u-boot uImage

Add-ons:
FCam Drivers 1.0.7.2
Bleeding-edge wireless modules

Developers:
Headers (for scratchbox/MADDE)

Hurrian 2011-06-02 22:04

Re: BFS for the power kernel
 
Great! I think I'm going back to kernel-bfs from kernel-power47. Do we still use the old kernel-power-settings or did you build a new one?

Tigerite 2011-06-02 22:14

Re: BFS for the power kernel
 
The old one should work fine - I did build a settings package without the dependency to either bfs-flasher or power-flasher, though:

Settings package

I'm also currently trying to get CK's swap prefetch working - rather tricky with just a 2.6.22 and 2.6.32 patch to work from, and nothing inbetween. I only succeeded in making the device crash every time it swaps anything so far ;)

Hurrian 2011-06-03 00:09

Re: BFS for the power kernel
 
BTW, is the kernel built with EXT4 support?

EDIT: Nevermind. After reflashing, I discovered that kernel-bfs didn't play nice with my pmconfig. Ugh, had to reflash twice today. I'm going to install Backupmenu this time.

Tigerite 2011-06-03 06:21

Re: BFS for the power kernel
 
You should only have had to reflash the kernel, not the entire FIASCO image? Anyway, yes it does have EXT4 support, and more than that, the fixes I backported from 2.6.30 are included too (they are not yet in kernel-power). What's in your pmconfig? I can't think of anything that BFS would bork at, particularly..

Hurrian 2011-06-03 08:04

Re: BFS for the power kernel
 
SmartReflex VDD1&2 = 1.
I installed the kernel package, then modules, then flasher. Edited pmconfig, and it bombed. Going to do a little more testing after installing BackupMenu.

Tigerite 2011-06-03 12:32

Re: BFS for the power kernel
 
I've got SmartReflex on myself (albeit through kernel-config, rather than pmconfig) and have no problems..?

Radicalz38 2011-06-03 13:00

Re: BFS for the power kernel
 
Got mine enabled on pmconfig, and kernel-power set to default without any problems at all.

Hurrian 2011-06-03 14:29

Re: BFS for the power kernel
 
Well, you know SR's a touchy-feely part of the device.
Odd that it only happens on kernel-bfs6 and not on power47. I've got multiboot and backupmenu-multiboot, going to test to confirm tomorrow.

EDIT: What the bloody hell, it works! With SR VDD1&2 on! I must've screwed up the modules installation part/the kernel flashing part. Works as smooth as kernel-power47, without the schedtool tweaks (to be applied later. I'm sleepy.)
Anyways, I'm keeping multiboot. I NEVER, EVER want to touch Flasher-3.5 again.

BTW, can you rebuild wl1251-bfs' DEB to also depend on the bootimg? It's demanding the regular flashable kernel image.

EDIT2: Anyone else notice that fcam-driver using apps aren't working normally? blessn900 doesn't start, and fCamera keeps showing the "shutter closed" message. Blame catorise.Not catorise.

Tigerite 2011-06-03 15:01

Re: BFS for the power kernel
 
You can always install the dummy package I posted a few pages ago - you don't need the flashable kernel image. But yes, I can make it depend on either bootimg or the kernel package.

Slightly off-topic, would anyone be interested in seeing the BFQ I/O scheduler in the BFS kernel? I'm working on backporting the latest BFQ-v2, although there is a version specifically for 2.6.28 out there which I can use if all else fails.

Hurrian 2011-06-03 15:09

Re: BFS for the power kernel
 
Mmm. Low latency, and the Android kids seem to like it.
I use the pf-kernel on my desktop (BFS+BFQ) and like it, so why not?

ATM, I'm using noop for mmcblk{0,1}. Any data on BFQ's performance on flash devices?

Radicalz38 2011-06-03 22:47

Re: BFS for the power kernel
 
Hi! Dunno if I'm asking too much but can you also include Btrfs support for BFS? Tried some benchmarks on my n900 and it seems very appealing

Hurrian 2011-06-03 23:13

Re: BFS for the power kernel
 
Quote:

Originally Posted by Radicalz38 (Post 1021931)
Hi! Dunno if I'm asking too much but can you also include Btrfs support for BFS? Tried some benchmarks on my n900 and it seems very appealing

BTRFS was merged at 2.6.29, and anything before that = data corruption risk.
In fact, it didn't get stable until around 2.6.33.

Also, good luck rebalancing on the N900.

Radicalz38 2011-06-04 02:11

Re: BFS for the power kernel
 
Thanks! Didn't know someone already tried backporting it... >.< Too bad for me.

Hurrian 2011-06-04 02:32

Re: BFS for the power kernel
 
No, I didn't try backporting it. I did use the btrfs project kernel (before it got pulled into mainline) and it was... terrible.
I only switched all of my systems root to butter at 2.6.35.
Speaking of rootfs, is the N900's root compressed?

geneven 2011-06-04 03:08

Re: BFS for the power kernel
 
After watching this thread forever, I finally installed the BFS kernel. It seems to be working great for me, even with swappiness set to 0.

Hurrian 2011-06-04 03:47

Re: BFS for the power kernel
 
Ugh, fcam-drivers weren't causing my problems, it's Catorise's fault. It caused the reboots when installing blessn900, and it's causing blessn900 to not launch and fcamera to keep displaying the "open lens cover" message.

It's odd, this never happened to me on power47. Can anyone else confirm this?

Wookay. Here's my testing results:
Something's up with blessn900's postinst/postrm scripts that kill Hildon-desktop and reboot it. That is all.

Schriek 2011-06-04 14:51

Re: BFS for the power kernel
 
The only reason which keeps me from using the awesome kernel, is the noise when making calls.

The people who you call with seem to notice this as well

Hurrian 2011-06-04 14:58

Re: BFS for the power kernel
 
Hmm, I don't seem to notice any noise while calling. Tested by calling an iPhone 3GS, Nokia{E66,2700C,C3-01}.

Other than fcam-drivers not working quite as expected, it's rock solid, and when combined with the swappolube IO tweaks and swap on uSD, even on 100% load it's still buttery smooth.

Tigerite 2011-06-04 16:04

Re: BFS for the power kernel
 
I'm afraid the distortion on calls still may be an ongoing problem - iDont has had at least one, and I did this afternoon too. However this may have been related to my running the "closer-to-original" version of the 330-to-350 patch (I've reverted to the old version), or running the timer at 100 Hz (I've now raised it to 300 again, as both iDont and myself agree it's a worthwhile compromise and doesn't appear to reduce battery life), or even from testing the BFQ v2 scheduler that I've successfully backported?

Regarding BTRFS, I'd love to backport it, but I am nowhere near a good enough kernel "hacker" to even attempt it. The BFQ and -ck patchsets were relatively easy to backport (especially with BFQ as I had a "reference" 2.6.28 version to work from), and the ext4 fixes had already been backported by someone else (I just had to figure which ones had and hadn't already been applied)..

PS I do have some weird problem with fcam-drivers, and I too have Catorise installed, but I haven't yet had chance to really dig into the issue properly.

Hurrian 2011-06-05 22:47

Re: BFS for the power kernel
 
I guess it's fine to raise the timer to 300Hz, as is recommended in the official BFS FAQ:

On a side note, are you going to push an updated BFS-6 package with the new kernel timer frequency?
Quote:

Notebook / mobile device: 300 Hz Tickless Full preemption CPU frequency scaling, ondemand default

Bad_Habit 2011-06-06 06:05

Re: BFS for the power kernel
 
Quote:

Originally Posted by Tigerite (Post 1021702)
Slightly off-topic, would anyone be interested in seeing the BFQ I/O scheduler in the BFS kernel? I'm working on backporting the latest BFQ-v2, although there is a version specifically for 2.6.28 out there which I can use if all else fails.

Yes, BFQ performs very nice alongside with BFS, both my desktop and my wife's netbook run Debian with liquorix kernel, I noticed great improvement in memory load operations (Netbeans IDE runs fine on the netbook).

It must give a performance boost for N900 :)

Bad_Habit 2011-06-06 06:10

Re: BFS for the power kernel
 
Quote:

Originally Posted by Tigerite (Post 1022253)
PS I do have some weird problem with fcam-drivers, and I too have Catorise installed, but I haven't yet had chance to really dig into the issue properly.

Sometimes I see black screen when launching Camera / BlessN900. I use Camera Lens Launcher (so the camera app launches after the cover is already opened), that can be related.

When I close the cover and open it again, the image becomes displayed.

Nothing in dmesg, some messages in syslog, but they're related to the UI.

Netweaver 2011-06-07 11:31

Re: BFS for the power kernel
 
eagerly awaiting the 300 hz version of the kernel, I feel my N900 is much more responsive under load conditions but indeed I also have the voice distortion issue. I'm still using the 100 hz, as that was the last one DEBianized and delivered here.

Anyway, great work guys, I would also love to see the BFQ IO scheduler as well. In our resource-constraint little gem, it can make a difference !!

If this stabilizes further, it sure deserves to be put in extras-dev.

clasificado 2011-06-07 14:05

Re: BFS for the power kernel
 
Quote:

Originally Posted by Bad_Habit (Post 1023038)
Sometimes I see black screen when launching Camera / BlessN900. I use Camera Lens Launcher (so the camera app launches after the cover is already opened), that can be related.

When I close the cover and open it again, the image becomes displayed.

Nothing in dmesg, some messages in syslog, but they're related to the UI.

this happens to me without the BFS patch, seems like a bug in fcam, may not be related with the BFS kernel modification.

Tigerite 2011-06-08 08:53

Re: BFS for the power kernel
 
I'll post a compiled deb later on today with Hz set to 300, and the latest BFQ (v2 r1) included. I would have done so sooner, but I've been trying to figure out how to get swap prefetch working with the nuances of Nokia's remapped swap (presumably a basic form of FASS). I also wanted to be sure BFQ was rock-solid stable - so far so good on that front ;) however, I'm contemplating enabling the CGROUPS_BFQIO option (I've had it disabled so far), as although BFS does not use cgroups, other things - such as freezer and ohmd - do. Google comes up a blank when searching for a definitive answer, despite BFS+BFQ being quite common, especially in Android world. There does seem to be a significant improvement over CFQ even with it disabled (as bonnie++ benchmarks testify; the 1.96 version has latency figures too), but it'd be nice to know if the bfqio would push the boundaries further.

Talking of cgroups, did the people having problems with audio issues follow these instructions, thus causing /syspart to not be mounted and disabling the ohmd cgroup module plus associated resource distribution rules?

Code:

mv /usr/lib/ohm/libohm_cgroups.so /usr/lib/ohm/libohm_cgroups.so_
I originally had done this step, but have now reverted it, as according to Eero Tamminen,

Quote:

It handles also audio policies and tries to make sure that you get
your phone calls when the device is heavily loaded and some other
minor things.
.. and since then, haven't had a single distortion, not even a minor one. So could this be the fix?

MONVMENTVM 2011-06-08 09:07

Re: BFS for the power kernel
 
Quote:

Originally Posted by Tigerite (Post 1024838)
I'll post a compiled deb later on today with Hz set to 300, and the latest BFQ (v2 r1) included. I would have done so sooner, but I've been trying to figure out how to get swap prefetch working with the nuances of Nokia's remapped swap (presumably a basic form of FASS). I also wanted to be sure BFQ was rock-solid stable - so far so good on that front ;) however, I'm contemplating enabling the CGROUPS_BFQIO option (I've had it disabled so far), as although BFS does not use cgroups, other things - such as freezer and ohmd - do. Google comes up a blank when searching for a definitive answer, despite BFS+BFQ being quite common, especially in Android world. There does seem to be a significant improvement over CFQ even with it disabled (as bonnie++ benchmarks testify; the 1.96 version has latency figures too), but it'd be nice to know if the bfqio would push the boundaries further.

Talking of cgroups, did the people having problems with audio issues follow these instructions, thus causing /syspart to not be mounted and disabling the ohmd cgroup module plus associated resource distribution rules?

Code:

mv /usr/lib/ohm/libohm_cgroups.so /usr/lib/ohm/libohm_cgroups.so_
I originally had done this step, but have now reverted it, as according to Eero Tamminen,



.. and since then, haven't had a single distortion, not even a minor one. So could this be the fix?

I can't try this as the moment as I just have the broken USB port issue. I had cgroups disabled like this though and definately had the audio distortions. Will check it out as soon as I have a working n900 again.

hawaii 2011-06-08 13:35

Re: BFS for the power kernel
 
I did not have cgroups disabled when experiencing audio distortion.

Netweaver 2011-06-08 19:00

Re: BFS for the power kernel
 
neither did I. One thing to notice, every time i had distortion, i put the phone down and called back right away. every time the 2nd call was crystal clear.
just my 5 cents ...

Bad_Habit 2011-06-09 07:01

Re: BFS for the power kernel
 
Quote:

Originally Posted by Netweaver (Post 1025261)
every time i had distortion, i put the phone down and called back right away. every time the 2nd call was crystal clear

Yeah, just the same here.

crgoups enabled

Radicalz38 2011-06-09 08:50

Re: BFS for the power kernel
 
Still waiting for the compiled debs! :)

Tigerite 2011-06-09 15:22

Re: BFS for the power kernel
 
I haven't forgotten, but I had a kernel crash last night upon opening StorageUsage when running BFQ and the bfqio interface - a lovely NULL pointer dereference. Now, it'd be easy to blame the bfqio and just set the option back to n again, but I want to be sure and not introduce instability. So, right now I'm trying to figure out the cause and whether my backport has any errors in it. I've also noticed that the PR1.3 Nokia patches made significant changes to the CFQ scheduler, so I was wondering if it would be better to instead implement a patch to substitute the current pseudo-RR scheduling policy of CFQ with a time domain WF2Q+ scheduler, found here (the site is currently having some problems, but can be found in Google's cache). I've already worked on this patch so that it applies cleanly after Nokia's, but am yet to test it..

Update - the patch spectacularly failed ;) wouldn't even boot past the 5 dots. I'm glad for u-boot and kernel-power at such times :)

Estel 2011-06-09 17:58

Re: BFS for the power kernel
 
Maybe this question is slight off-topiic, but that changes that Nokia did to CFQ can be responsible for increase of problems under heavy I/O (when no tweaked)? Qole stated that decompressing time of ED image (and reboot problems) become much worse after PR1.3, but he wasn't able to filter change to blame.

Netweaver 2011-06-09 20:33

Re: BFS for the power kernel
 
on the camera issue, i have the same problem but even after repeated slide open/close, the screen stays black. so basically camera is useless for now.
the joys of being on the bleeding edge of technology... :)

Tigerite 2011-06-12 07:51

Re: BFS for the power kernel
 
Sorry to have kept you all waiting with this.. I finally tracked down the cause of the kernel crashes - it was only occurring within code that was executed when the cgroup option was enabled, which is why I hadn't spotted it earlier. However, it's now fixed, so we can run the latest'n'greatest BFQ and BFQIO subsystem running in tandem! Here are the debs and uImage - thanks for the patience :)

Mandatory Modules

Plus one of
Multiboot deb
U-boot image
Standard deb

Headers for developers

PS The only bad thing to report is that I have had a call distortion over the past few days.. :(

Hurrian 2011-06-12 11:40

Re: BFS for the power kernel
 
It probably should've been BFS6.1 -- because I use multiboot, it didn't see that the kernel changed, and went ape.
Had to use flasher to flash the zImage.

Oh, and music stuttering every few seconds is now gone.

fw190 2011-06-12 12:32

Re: BFS for the power kernel
 
maybe this was asked earlier but is it possible to merge BFS kernel and Power Kernel?

Tigerite 2011-06-12 13:19

Re: BFS for the power kernel
 
Personally I don't think they should be merged, even as and when it becomes completely stable (no distortion in calls etc). This kernel can never be "mainline" for obvious reasons, and most people will generally prefer to go with power (which uses CFS, cgroups and so forth) simply because it closer resembles the stock 2.6.28(.10) kernel. However, that said, the BFS kernel does contain all of the patches merged into the power kernel to date, and several others that I've backported, including the latest BFQ scheduler so you're getting the best of both worlds..

Sorry about the multiboot problem. I personally don't know about its nuances as I don't use it, so I wasn't aware this would be an issue. Could people please test out the BFQ scheduler (echo bfq > /sys/block/mmcblk0/queue/scheduler) and let me know of any kernel crashes? Typically, a short time after posting the newest version, I had another one related to swap. I've since disabled the final patch of the v2 r1 series, which delays writes if there are fewer than 32 sectors, in the hope that this was the cause (it may be also because I still had remnants of the swap prefetch patch included in the kernel I was running - this isn't present in the images I posted - but I doubt that).

iDont 2011-06-12 13:51

Re: BFS for the power kernel
 
Quote:

Originally Posted by Hurrian (Post 1027521)
It probably should've been BFS6.1 -- because I use multiboot, it didn't see that the kernel changed, and went ape.
Had to use flasher to flash the zImage.

Oh, and music stuttering every few seconds is now gone.

Don't forget the fact that this isn't an official release; you can look at -bfs6 as a GIT snapshot, or maybe even more bleeding-edge than GIT, considering the BFQ patches aren't in there yet.

The latest official release of kernel-bfs can be found on its garage page under "Files", which is -bfs5. We're still discussing what to do with -bfs6, whether we'll continue holding it off until we've made progress on the distortion, or release it anyway. Tigerite just happens to be so kind to provide precompiled debs of -bfs6 already, for those interested in it ;)


All times are GMT. The time now is 13:48.

vBulletin® Version 3.8.8