Hello guys,
i wanted to share some information here about trim. Many of you encountered problems with my new kernel, however i have seen no
useful log (its not your fault, i just had to point out how to give logs properly).
I spend a lot of time debugging it and figuring out why it works for some and for some not.
Here is my kernel log, in case you want to see/learn something about that.
My investigation is, that trim only crashes on startup. In the first ~2 minutes the system load is around 100%, if the discard option
is enabled or if trim gets executed in this window its likely that the kernel crashes (see log how exactly).
I went through all upstream patches and merged them in, however this couldn't fix the problem.
So i am assuming there must be some deadlock/race condition in those 2 minutes where trim tries to access /data while
another process tries exactly the same.
So i decided to write my own patch for this; patch on github
Now the funny things; trim works now on bootup for me, no crashes / no kernel panic,
however while its trimming you shouldn't interact with the device itself to be sure.
Actually this might be a huge deal, have a look at the current mainline kernel here .
It doesn't seem that its fixed there. This either means my patch won't work or they fixed it otherwise or (and thats the point)
it isn't fixed on upstream. If its the last case this could be my first contribution to upstream.
I just wanted to share this (since its a development thread after all) and want to hear some thoughts about this (developers are welcome!).
I don't know if this fixes everything, i have tested it only on 4.2 with the method mentioned above.
Maybe someone might have some ideas about that. Any feedback is highly appreciated!
i wanted to share some information here about trim. Many of you encountered problems with my new kernel, however i have seen no
useful log (its not your fault, i just had to point out how to give logs properly).
I spend a lot of time debugging it and figuring out why it works for some and for some not.
Here is my kernel log, in case you want to see/learn something about that.
My investigation is, that trim only crashes on startup. In the first ~2 minutes the system load is around 100%, if the discard option
is enabled or if trim gets executed in this window its likely that the kernel crashes (see log how exactly).
I went through all upstream patches and merged them in, however this couldn't fix the problem.
So i am assuming there must be some deadlock/race condition in those 2 minutes where trim tries to access /data while
another process tries exactly the same.
So i decided to write my own patch for this; patch on github
Now the funny things; trim works now on bootup for me, no crashes / no kernel panic,
however while its trimming you shouldn't interact with the device itself to be sure.
Actually this might be a huge deal, have a look at the current mainline kernel here .
It doesn't seem that its fixed there. This either means my patch won't work or they fixed it otherwise or (and thats the point)
it isn't fixed on upstream. If its the last case this could be my first contribution to upstream.
I just wanted to share this (since its a development thread after all) and want to hear some thoughts about this (developers are welcome!).
I don't know if this fixes everything, i have tested it only on 4.2 with the method mentioned above.
Maybe someone might have some ideas about that. Any feedback is highly appreciated!