atomisp: use low order to allocate pages as our mobile memory is limited
authorxiaobing tu <xiaobing.tu@intel.com>
Wed, 18 Apr 2012 07:04:45 +0000 (15:04 +0800)
committerbuildbot <buildbot@intel.com>
Mon, 23 Apr 2012 11:08:34 +0000 (04:08 -0700)
BZ:31085 31905

REVERTME after changing the codes better.

With MTBF and Monkey testing, system often reset
vmstat shows memory is used up. kernel stack dump shows atomisp driver
is used to allocate many pages with order 3. It's quite too high, especially
when running on Lexington with 512M memory.
The patch changes it to use order 0 always.
Signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
Change-Id: I2ceb3de6120a009c7cf3d649ee53f96a18143f44
Reviewed-on: http://android.intel.com:8080/43840
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: Zhang, Yanmin <yanmin.zhang@intel.com>
Reviewed-by: Jarzmik, Robert <robert.jarzmik@intel.com>
Reviewed-by: Cohen, David A <david.a.cohen@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/atomisp/hmm/hmm_bo.c

index eb26e11..f89861e 100644 (file)
@@ -319,7 +319,7 @@ static int alloc_private_pages(struct hmm_buffer_object *bo, int from_highmem,
        int i, j;
        int failure_number = 0;
        bool reduce_order = false;
-       bool lack_mem = false;
+       bool lack_mem = true;
 
        if (from_highmem)
                gfp |= __GFP_HIGHMEM;