mm: percpu: Add PCPU_FC_FIXED to pcpu_fc for setting fixed pcpu_atom_size.
authorShuoX Liu <shuox.liu@intel.com>
Tue, 24 Apr 2012 04:51:58 +0000 (12:51 +0800)
committerbuildbot <buildbot@intel.com>
Mon, 30 Apr 2012 11:51:25 +0000 (04:51 -0700)
commit989c34fdc76591efb7bebf2d0f1e66497e14fe23
tree20bd95e72020527715c18eb7a72ddfd26be6cb48
parent03a672a46d11a73c0cd11011c8d98fd4431cd531
mm: percpu: Add PCPU_FC_FIXED to pcpu_fc for setting fixed pcpu_atom_size.

BZ: 27672

After long running, range of VM will be fragmented and fail to create new
chunk with large pcpu_atom_size(on i386 is 4M). On our platform, i write a
patch that will alloc percpu variables with 200B size repeatly and count
the total alloced size until it return failure, the result is:
  pcpu_atom_size alloced size of test program
4M 0x2000f8
256K 0xffdcc8

The patch add one more chosen to percpu_alloc kernel parameter. Besides
page,embed,auto are available for percpu_alloc, memory size suffixed with
%K,%M are supported. It set pcpu_atom_size to fixed wanted size.

Change-Id: I8ddec17de1f7f06cba8298acb2fdec4147e79874
Signed-off-by: Yanmin Zhang <yanmin.zhang@intel.com>
Signed-off-by: ShuoX Liu <shuox.liu@intel.com>
Reviewed-on: http://android.intel.com:8080/45888
Reviewed-by: Mansoor, Illyas <illyas.mansoor@intel.com>
Reviewed-by: Jarzmik, Robert <robert.jarzmik@intel.com>
Reviewed-by: He, Bo <bo.he@intel.com>
Reviewed-by: Chotard, Celine <celine.chotard@intel.com>
Tested-by: Chotard, Celine <celine.chotard@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
arch/x86/kernel/setup_percpu.c
include/linux/percpu.h
mm/percpu.c