{"action":"created","issue":{"url":"https://api.github.com/repos/sultanqasim/android_device_motorola_osprey/issues/3","labels_url":"https://api.github.com/repos/sultanqasim/android_device_motorola_osprey/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/sultanqasim/android_device_motorola_osprey/issues/3/comments","events_url":"https://api.github.com/repos/sultanqasim/android_device_motorola_osprey/issues/3/events","html_url":"https://github.com/sultanqasim/android_device_motorola_osprey/pull/3","id":98655340,"number":3,"title":"fstrim","user":{"login":"lgrootnoob","id":7827382,"avatar_url":"https://avatars.githubusercontent.com/u/7827382?v=3","gravatar_id":"","url":"https://api.github.com/users/lgrootnoob","html_url":"https://github.com/lgrootnoob","followers_url":"https://api.github.com/users/lgrootnoob/followers","following_url":"https://api.github.com/users/lgrootnoob/following{/other_user}","gists_url":"https://api.github.com/users/lgrootnoob/gists{/gist_id}","starred_url":"https://api.github.com/users/lgrootnoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgrootnoob/subscriptions","organizations_url":"https://api.github.com/users/lgrootnoob/orgs","repos_url":"https://api.github.com/users/lgrootnoob/repos","events_url":"https://api.github.com/users/lgrootnoob/events{/privacy}","received_events_url":"https://api.github.com/users/lgrootnoob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-03T01:59:35Z","updated_at":"2015-08-03T02:28:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sultanqasim/android_device_motorola_osprey/pulls/3","html_url":"https://github.com/sultanqasim/android_device_motorola_osprey/pull/3","diff_url":"https://github.com/sultanqasim/android_device_motorola_osprey/pull/3.diff","patch_url":"https://github.com/sultanqasim/android_device_motorola_osprey/pull/3.patch"},"body":"I apologize for this being several requests. i'd rather not clone more shit than i have to."},"comment":{"url":"https://api.github.com/repos/sultanqasim/android_device_motorola_osprey/issues/comments/127101445","html_url":"https://github.com/sultanqasim/android_device_motorola_osprey/pull/3#issuecomment-127101445","issue_url":"https://api.github.com/repos/sultanqasim/android_device_motorola_osprey/issues/3","id":127101445,"user":{"login":"sultanqasim","id":3085708,"avatar_url":"https://avatars.githubusercontent.com/u/3085708?v=3","gravatar_id":"","url":"https://api.github.com/users/sultanqasim","html_url":"https://github.com/sultanqasim","followers_url":"https://api.github.com/users/sultanqasim/followers","following_url":"https://api.github.com/users/sultanqasim/following{/other_user}","gists_url":"https://api.github.com/users/sultanqasim/gists{/gist_id}","starred_url":"https://api.github.com/users/sultanqasim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sultanqasim/subscriptions","organizations_url":"https://api.github.com/users/sultanqasim/orgs","repos_url":"https://api.github.com/users/sultanqasim/repos","events_url":"https://api.github.com/users/sultanqasim/events{/privacy}","received_events_url":"https://api.github.com/users/sultanqasim/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T02:28:35Z","updated_at":"2015-08-03T02:28:35Z","body":"Have you tried a benchmark to verify this?\r\n\r\nFrom what I understand, f2fs does trim in a fairly intelligent manner (background trim, queuing/batching trim operations etc.) Enabling the discard option allows f2fs to do it's trim. Writing to a dirty piece of flash will require that it be wiped before it can be rewritten. Writing to a clean piece of memory should be faster than writing to a dirty one. That's the whole point of trim.\r\n\r\nNow, with ext4, it didn't do trim in a very intelligent manner, so it just discarded as you deleted files. Thus, discard slowed down the erasing of files significantly on ext4, and periodic fstrim was preferred. The f2fs filesystem is supposed to do trim more intelligently, so that enabling the discard option shouldn't significantly harm file deletion performance.\r\n\r\nCould you try making a build with your patch and verifying that using fstrim manually and disabling discard actually speeds up what you are trying to speed up?\r\n\r\nThanks"}}