Your safest bet is to perform a fresh install of 3.9 to a spare partition rather than in in-place upgrade from 3.1/3.5. Then you can set about tweaking it one patch at a time until you have it how you want it. Feel free to PM me for if you need any specific advice btw.