Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753775AbbGFGNq (ORCPT ); Mon, 6 Jul 2015 02:13:46 -0400 Received: from lgeamrelo01.lge.com ([156.147.1.125]:38295 "EHLO lgeamrelo01.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751242AbbGFGM4 (ORCPT ); Mon, 6 Jul 2015 02:12:56 -0400 X-Original-SENDERIP: 165.186.175.39 X-Original-MAILFROM: gioh.kim@lge.com From: Gioh Kim To: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com, labbott@redhat.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, gunho.lee@lge.com, Gioh Kim Subject: [PATCHv4 0/2] staging: ion: enable shrinking of pool Date: Mon, 6 Jul 2015 15:14:39 +0900 Message-Id: <1436163281-9463-1-git-send-email-gioh.kim@lge.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1910 Lines: 59 Hello, The ion has internal page pool to keep freed pages. There is no way to shrink the pool so that the pool sometimes grows too big. For example my platform allocates some graphic memory via ion. Sometimes the pool can be several hundreds MB. I want to flush the pool before critical page shortage. This patch set combines 2 patches like followings. 1. Patch 1/2: make individual pool work by page unit This patch makes the pool be shrinked in page unit. 2. Patch 2/2: enable pool shrink This patch enables pool shrink and make debugfs to specify shrink amount. The pool shrink is almost implemented but it is not complete. This patch completes the implementation. For instance, this shrinks all pages in every pool. echo 0 > /sys/kernel/debug/ion/heaps/system_shrink If you want specify the number of pages to be shrinked: echo 30 > /sys/kernel/debug/ion/heaps/system_shrink My thanks to Laura Abbott for reviews of the v3&v2 patchset. Most of the changes below were based on her feedback. Changes since v3: - Add reviewer Laura Abbott - Fix description of patch 2/2 Changes since v2: - Rebased to v4.1 - Call shrinker interfaces instead of calling heap->ops->shrink - Add more description about the reason - Remove a patch to limit pool size This patchset is based on v4.1 Gioh Kim (2): staging: ion: shrink page-pool by page unit staging: ion: debugfs to shrink pool drivers/staging/android/ion/ion.c | 22 +++++++++------------- drivers/staging/android/ion/ion_page_pool.c | 5 +++-- drivers/staging/android/ion/ion_system_heap.c | 16 ++++++++++++++-- 3 files changed, 26 insertions(+), 17 deletions(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/