fstrim support

For general discussion and questions specific to Android development for HTC HD2/Leo
Moderator: Forum Moderator

fstrim support

Postby activ » Wed Feb 12, 2014 10:16 am

Hey Gyus,

Did anyone succeed to enable fstrim support on NexusHD2 ? i've tried on last tytung's KitKat but with no luck.

tried this:
http://android.stackexchange.com/questi ... from-shell

it gives me message "fstrim: FSTRIM: Not a typewriter"

i've read that its kernel related, but it should work becouse kernel in kitkat is "Linux localhost 2.6.32_tytung_jellybean_r2 #302 PREEMPT Sat Mar 16 15:38:22 CST 2013 armv7l GNU/Linux" and as i read here:
nexushd2-jellybean-cm10-2-t78-140.html#p1774
it should work from 2.6.32

tytung, can you do sth with that?

i think it will increase speed of our hd2's becouse it write is faster when using trim.

i've done fstrim with success but only on my ext4 partition, by putting in to my linux machine, mounting and trimming in there, but it's not solution imho.
activ
Junior Member
 
Posts: 3
Joined: Mon Aug 12, 2013 12:55 pm
Country: Poland (pl)
Has thanked: 0 time
Been thanked: 2 times

Advertisement
 

Re: fstrim support

Postby zenida » Wed Feb 12, 2014 3:27 pm

I think fstrim can't works on all kind of file system, I should check. So maybe on NAND where we use yaffs2 is not possible
zenida
Junior Member
 
Posts: 16
Joined: Mon Jul 01, 2013 4:40 am
Has thanked: 7 times
Been thanked: 4 times

Re: fstrim support

Postby activ » Wed Feb 12, 2014 3:32 pm

i dont think so. i have sd-ext which is ext4 and i cant use fstrim on it from phone, but i can do that plugging my card into linux machine.
activ
Junior Member
 
Posts: 3
Joined: Mon Aug 12, 2013 12:55 pm
Country: Poland (pl)
Has thanked: 0 time
Been thanked: 2 times

Re: fstrim support

Postby tytung » Wed Feb 12, 2014 7:27 pm

activ wrote:Hey Gyus,

Did anyone succeed to enable fstrim support on NexusHD2 ? i've tried on last tytung's KitKat but with no luck.

tried this:
http://android.stackexchange.com/questi ... from-shell

it gives me message "fstrim: FSTRIM: Not a typewriter"

i've read that its kernel related, but it should work becouse kernel in kitkat is "Linux localhost 2.6.32_tytung_jellybean_r2 #302 PREEMPT Sat Mar 16 15:38:22 CST 2013 armv7l GNU/Linux" and as i read here:
nexushd2-jellybean-cm10-2-t78-140.html#p1774
it should work from 2.6.32

tytung, can you do sth with that?

i think it will increase speed of our hd2's becouse it write is faster when using trim.

i've done fstrim with success but only on my ext4 partition, by putting in to my linux machine, mounting and trimming in there, but it's not solution imho.


I'm busy.
My kernel is open source. Please add any features yourself. Thanks.
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: fstrim support

Postby activ » Wed Feb 12, 2014 10:45 pm

okey. this is what i found:

trim support starts from 2.6.37 kernel.
last 3 functions in this file do the job:
https://github.com/torvalds/linux/blob/ ... /mballoc.c

i've tried to backport them - but with no luck. too many connections and changes between code.

yaffs2 do not supports trim - only ext4.
ext4 (so data on ext and nativesd) users will experience huge speed improvemend using trim.
activ
Junior Member
 
Posts: 3
Joined: Mon Aug 12, 2013 12:55 pm
Country: Poland (pl)
Has thanked: 0 time
Been thanked: 2 times


Return to HD2 Android Q&A, Help & Troubleshooting and General

Who is online

Users browsing this forum: No registered users and 2 guests

cron