Re: [PATCH v2] driver : staging : ion: optimization for decreasing memory fragmentaion

From: Greg KH
Date: Wed Mar 27 2019 - 14:31:23 EST


On Wed, Mar 20, 2019 at 02:38:23PM +0800, Zhaoyang Huang wrote:
> From: Zhaoyang Huang <zhaoyang.huang@xxxxxxxxxx>
>
> Two action for this patch:
> 1. set a batch size for system heap's shrinker, which can have it buffer
> reasonable page blocks in pool for future allocation.
> 2. reverse the order sequence when free page blocks, the purpose is also
> to have system heap keep as more big blocks as it can.
>
> By testing on an android system with 2G RAM, the changes with setting
> batch = 48MB can help reduce the fragmentation obviously and improve
> big block allocation speed for 15%.
>
> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@xxxxxxxxxx>
> ---
> drivers/staging/android/ion/ion_heap.c | 16 +++++++++++++++-
> drivers/staging/android/ion/ion_system_heap.c | 2 +-
> 2 files changed, 16 insertions(+), 2 deletions(-)

What changed from v1? Always put that below the --- line as the
documentation asks you to.

thanks,

greg k-h