tunable/min_free_kbytes: add 32-bit system limit

in 32-bit system, one process only allocate 3Gb memory at
most, even though there are enough memory and setting
overcommit_memory=1, the porcess always exit when it arrives
in 3Gb memory.

the patch use '__WORDSIZE' macro to avoid the incorrect 'TFAIL'
without the patch:
 ---- snip ----
 min_free_kbytes    0  TINFO  :  set overcommit_memory to 1
 min_free_kbytes    0  TINFO  :  set min_free_kbytes to 3794
 memfree is 15478420 kB before eatup mem
 memfree is 12333408 kB after eatup mem
 min_free_kbytes    3  TFAIL  :  child unexpectedly failed: 0
 min_free_kbytes    0  TINFO  :  set min_free_kbytes to 7588
 ---- snip ----

after applying the patch:
 ---- snip ----
 min_free_kbytes    0  TINFO  :  set overcommit_memory to 1
 min_free_kbytes    0  TINFO  :  set min_free_kbytes to 3794
 memfree is 15478420 kB before eatup mem
 memfree is 12333408 kB after eatup mem
 min_free_kbytes    0  TINFO  :  Child can't allocate >3Gb memory in 32bit system
 min_free_kbytes    0  TINFO  :  set min_free_kbytes to 7588
 ---- snip ----

Reported-by: Shuang Qiu <shuang.qiu@oracle.com>
Signed-off-by: Zhouping Liu <zliu@redhat.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
1 file changed