mem/tunable: fix the overcommitting possible failure

1. CommitLimit may be changed when set another overcommit_memory
   value.
2. Test overcommit_memory=2 first to avoid the condition
   committed > CommitLimited.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Tested-by: Caspar Zhang <caspar@casparzhang.com>
1 file changed