I saw this question over and over around so I decided to post a quick guide here.
After I installed the insecure kernel on my SGS2, to allow me to root, I did a series of quadrant tests. And after comparing 10 runs with the 10 runs I did prior to root, I ended up with the impression that I lost about 200-400 points per run. The tests were not entirely conclusive, since the margin is not big (compared with the total). Regardless, I still wanted to try to squeeze out every bit of performance I can out of this beast. That's when I decided to re-flash the original stock kernel.
What you will need, is basically the same thing you did to gain root, but with another kernel.
Make sure you know what you are doing. I am not responsible if you do it wrong and brick your phone.
1. First download the stock kernel:
You can find the stock kernels here: http://nma.usk.bz/sgs2.php
DO NOT UNTAR THE FILE. Leave it as it is.
2. Now open Odin and put your phone in Download mode
3. IMPORTANT: Make sure that "Auto Reboot" and "F.Reset Time" are check. And that EVERYTHING else is UNchecked.
4. Load the .tar file on the PDA field. Just click on "PDA" and open the file.
5. Click "Start"
Done, you are back to your stock kernel and will keep root. This does not revert what you already installed (su, SuperUser, busybox, etc).
If you have any questions, post it here.
- Added XWKE7 stock kernel (05/21/2011)