mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gioh Kim <gioh.kim@lge.com>
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 <gioh.kim@lge.com>
Subject: [PATCHv4 0/2] staging: ion: enable shrinking of pool
Date: Mon,  6 Jul 2015 15:14:39 +0900	[thread overview]
Message-ID: <1436163281-9463-1-git-send-email-gioh.kim@lge.com> (raw)

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


             reply	other threads:[~2015-07-06  6:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06  6:14 Gioh Kim [this message]
2015-07-06  6:14 ` [PATCHv4 1/2] staging: ion: shrink page-pool by page unit Gioh Kim
2015-07-06  6:14 ` [PATCHv4 2/2] staging: ion: debugfs to shrink pool Gioh Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436163281-9463-1-git-send-email-gioh.kim@lge.com \
    --to=gioh.kim@lge.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gunho.lee@lge.com \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®