[PATCH] zsmalloc: fix fatal corruption due to wrong size class selection

2015-03-25 Thread Heesub Shin
: d0100371 x0 : ffbc3e90 Reported-by: Sooyong Suk Signed-off-by: Heesub Shin Tested-by: Sooyong Suk Cc: Minchan Kim --- mm/zsmalloc.c | 5 - 1 file changed, 5 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 6c39ae9..a2da64b 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c

[PATCH] zsmalloc: fix fatal corruption due to wrong size class selection

2015-03-25 Thread Heesub Shin
: 0cc0 x1 : d0100371 x0 : ffbc3e90 Reported-by: Sooyong Suk s@samsung.com Signed-off-by: Heesub Shin heesub.s...@samsung.com Tested-by: Sooyong Suk s@samsung.com Cc: Minchan Kim minc...@kernel.org --- mm/zsmalloc.c | 5 - 1 file changed, 5 deletions(-) diff

Re: [PATCH 1/2] zsmalloc: do not remap dst page while prepare next src page

2015-03-24 Thread Heesub Shin
Hello, On 03/25/2015 12:24 AM, Sergey Senozhatsky wrote: > object may belong to different pages. zs_object_copy() handles > this case and maps a new source page (get_next_page() and > kmap_atomic()) when object crosses boundaries of the current > source page. But it also performs unnecessary

Re: [PATCH 1/2] zsmalloc: do not remap dst page while prepare next src page

2015-03-24 Thread Heesub Shin
Hello, On 03/25/2015 12:24 AM, Sergey Senozhatsky wrote: object may belong to different pages. zs_object_copy() handles this case and maps a new source page (get_next_page() and kmap_atomic()) when object crosses boundaries of the current source page. But it also performs unnecessary

Re: [PATCH v2 3/7] zsmalloc: support compaction

2015-03-04 Thread Heesub Shin
Hello Minchan, Nice work! On 03/04/2015 02:01 PM, Minchan Kim wrote: > +static void putback_zspage(struct zs_pool *pool, struct size_class *class, > + struct page *first_page) > +{ > + int class_idx; > + enum fullness_group fullness; > + > +

Re: [PATCH v2 3/7] zsmalloc: support compaction

2015-03-04 Thread Heesub Shin
Hello Minchan, Nice work! On 03/04/2015 02:01 PM, Minchan Kim wrote: +static void putback_zspage(struct zs_pool *pool, struct size_class *class, + struct page *first_page) +{ + int class_idx; + enum fullness_group fullness; + +

Re: [RFC PATCH 0/9] mm/zbud: support highmem pages

2015-01-28 Thread Heesub Shin
On 01/28/2015 05:24 AM, Seth Jennings wrote: On Tue, Nov 04, 2014 at 10:33:43AM -0600, Seth Jennings wrote: On Tue, Oct 14, 2014 at 08:59:19PM +0900, Heesub Shin wrote: zbud is a memory allocator for storing compressed data pages. It keeps two data objects of arbitrary size on a single page

Re: [RFC PATCH 0/9] mm/zbud: support highmem pages

2015-01-28 Thread Heesub Shin
On 01/28/2015 05:24 AM, Seth Jennings wrote: On Tue, Nov 04, 2014 at 10:33:43AM -0600, Seth Jennings wrote: On Tue, Oct 14, 2014 at 08:59:19PM +0900, Heesub Shin wrote: zbud is a memory allocator for storing compressed data pages. It keeps two data objects of arbitrary size on a single page

Re: [PATCH v5 2/4] mm/page_alloc: add freepage on isolate pageblock to correct buddy list

2014-11-03 Thread Heesub Shin
Hello, On 10/31/2014 04:25 PM, Joonsoo Kim wrote: In free_pcppages_bulk(), we use cached migratetype of freepage to determine type of buddy list where freepage will be added. This information is stored when freepage is added to pcp list, so if isolation of pageblock of this freepage begins

Re: [PATCH v5 2/4] mm/page_alloc: add freepage on isolate pageblock to correct buddy list

2014-11-03 Thread Heesub Shin
Hello, On 10/31/2014 04:25 PM, Joonsoo Kim wrote: In free_pcppages_bulk(), we use cached migratetype of freepage to determine type of buddy list where freepage will be added. This information is stored when freepage is added to pcp list, so if isolation of pageblock of this freepage begins

Re: [PATCH] mm/zbud: init user ops only when it is needed

2014-10-15 Thread Heesub Shin
Hello, On 10/16/2014 05:17 AM, Andrew Morton wrote: On Wed, 15 Oct 2014 19:00:43 +0900 Heesub Shin wrote: When zbud is initialized through the zpool wrapper, pool->ops which points to user-defined operations is always set regardless of whether it is specified from the upper la

[PATCH] mm/zbud: init user ops only when it is needed

2014-10-15 Thread Heesub Shin
ets the user-defined ops only when it is needed, so that zbud_reclaim_page() can bail out the reclamation loop earlier if there is no user-defined operations specified. Signed-off-by: Heesub Shin --- mm/zbud.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zbud.c b/mm/zbud.c in

[PATCH] mm/zbud: init user ops only when it is needed

2014-10-15 Thread Heesub Shin
-defined ops only when it is needed, so that zbud_reclaim_page() can bail out the reclamation loop earlier if there is no user-defined operations specified. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm

Re: [PATCH] mm/zbud: init user ops only when it is needed

2014-10-15 Thread Heesub Shin
Hello, On 10/16/2014 05:17 AM, Andrew Morton wrote: On Wed, 15 Oct 2014 19:00:43 +0900 Heesub Shin heesub.s...@samsung.com wrote: When zbud is initialized through the zpool wrapper, pool-ops which points to user-defined operations is always set regardless of whether it is specified from

[RFC PATCH 1/9] mm/zbud: tidy up a bit

2014-10-14 Thread Heesub Shin
For aesthetics, add a blank line between functions, remove useless initialization statements, and simplify codes a bit. No functional differences are introduced. Signed-off-by: Heesub Shin --- mm/zbud.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git

[RFC PATCH 7/9] mm/zbud: drop zbud_header

2014-10-14 Thread Heesub Shin
off-by: Heesub Shin --- mm/zbud.c | 66 +-- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c index 8a6dd6b..5a392f3 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -60,17 +60,15 @@ * NCHUNKS_ORDER determi

[RFC PATCH 4/9] mm/zbud: remove first|last_chunks from zbud_header

2014-10-14 Thread Heesub Shin
The size information of each first and last buddy are stored into first|last_chunks in struct zbud_header respectively. Put them into page->private instead of zbud_header. Signed-off-by: Heesub Shin --- mm/zbud.c | 62 -- 1 f

[RFC PATCH 3/9] mm/zbud: remove lru from zbud_header

2014-10-14 Thread Heesub Shin
zbud_pool has an lru list for tracking zbud pages and they are strung together via zhdr->lru. If we reuse page->lru for linking zbud pages instead of it, the lru field in zbud_header can be dropped. Signed-off-by: Heesub Shin --- mm/zbud.c | 23 +-- 1 file chang

[RFC PATCH 9/9] mm/zswap: use highmem pages for compressed pool

2014-10-14 Thread Heesub Shin
Now that the zbud supports highmem, storing compressed anonymous pages on highmem looks more reasonble. So, pass __GFP_HIGHMEM flag to zpool when zswap allocates memory from it. Signed-off-by: Heesub Shin --- mm/zswap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm

[RFC PATCH 8/9] mm/zbud: allow clients to use highmem pages

2014-10-14 Thread Heesub Shin
-by: Heesub Shin --- mm/zbud.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c index 5a392f3..677fdc1 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -52,6 +52,7 @@ #include #include #include +#include

[RFC PATCH 6/9] mm/zbud: remove list_head for buddied list from zbud_header

2014-10-14 Thread Heesub Shin
lru is already in use. Signed-off-by: Heesub Shin --- mm/zbud.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c index 383bab0..8a6dd6b 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -99,10 +99,8 @@ struct zbud_p

[RFC PATCH 5/9] mm/zbud: encode zbud handle using struct page

2014-10-14 Thread Heesub Shin
, which will be implemented by following patches. Change the zbud handle to struct page* with the least significant bit indicating the first or last. All other information are hidden in the struct page. Signed-off-by: Heesub Shin --- mm/zbud.c | 50

[RFC PATCH 2/9] mm/zbud: remove buddied list from zbud_pool

2014-10-14 Thread Heesub Shin
There's no point in having the _buddied_ list of zbud_pages, as nobody refers it. Tracking it adds runtime overheads only, so let's remove it. Signed-off-by: Heesub Shin --- mm/zbud.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c

[RFC PATCH 0/9] mm/zbud: support highmem pages

2014-10-14 Thread Heesub Shin
that this kind of modification abusing several fields in struct page would be ok. Heesub Shin (9): mm/zbud: tidy up a bit mm/zbud: remove buddied list from zbud_pool mm/zbud: remove lru from zbud_header mm/zbud: remove first|last_chunks from zbud_header mm/zbud: encode zbud handle using struct

[RFC PATCH 0/9] mm/zbud: support highmem pages

2014-10-14 Thread Heesub Shin
that this kind of modification abusing several fields in struct page would be ok. Heesub Shin (9): mm/zbud: tidy up a bit mm/zbud: remove buddied list from zbud_pool mm/zbud: remove lru from zbud_header mm/zbud: remove first|last_chunks from zbud_header mm/zbud: encode zbud handle using struct

[RFC PATCH 2/9] mm/zbud: remove buddied list from zbud_pool

2014-10-14 Thread Heesub Shin
There's no point in having the _buddied_ list of zbud_pages, as nobody refers it. Tracking it adds runtime overheads only, so let's remove it. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git

[RFC PATCH 5/9] mm/zbud: encode zbud handle using struct page

2014-10-14 Thread Heesub Shin
, which will be implemented by following patches. Change the zbud handle to struct page* with the least significant bit indicating the first or last. All other information are hidden in the struct page. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 50

[RFC PATCH 6/9] mm/zbud: remove list_head for buddied list from zbud_header

2014-10-14 Thread Heesub Shin
is already in use. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c index 383bab0..8a6dd6b 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -99,10 +99,8 @@ struct

[RFC PATCH 8/9] mm/zbud: allow clients to use highmem pages

2014-10-14 Thread Heesub Shin
-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c index 5a392f3..677fdc1 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -52,6 +52,7 @@ #include linux/spinlock.h #include linux/zbud.h

[RFC PATCH 3/9] mm/zbud: remove lru from zbud_header

2014-10-14 Thread Heesub Shin
zbud_pool has an lru list for tracking zbud pages and they are strung together via zhdr-lru. If we reuse page-lru for linking zbud pages instead of it, the lru field in zbud_header can be dropped. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 23 +-- 1

[RFC PATCH 9/9] mm/zswap: use highmem pages for compressed pool

2014-10-14 Thread Heesub Shin
Now that the zbud supports highmem, storing compressed anonymous pages on highmem looks more reasonble. So, pass __GFP_HIGHMEM flag to zpool when zswap allocates memory from it. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zswap.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[RFC PATCH 1/9] mm/zbud: tidy up a bit

2014-10-14 Thread Heesub Shin
For aesthetics, add a blank line between functions, remove useless initialization statements, and simplify codes a bit. No functional differences are introduced. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 21 ++--- 1 file changed, 10 insertions(+), 11

[RFC PATCH 7/9] mm/zbud: drop zbud_header

2014-10-14 Thread Heesub Shin
-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 66 +-- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/mm/zbud.c b/mm/zbud.c index 8a6dd6b..5a392f3 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -60,17 +60,15

[RFC PATCH 4/9] mm/zbud: remove first|last_chunks from zbud_header

2014-10-14 Thread Heesub Shin
The size information of each first and last buddy are stored into first|last_chunks in struct zbud_header respectively. Put them into page-private instead of zbud_header. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- mm/zbud.c | 62

Re: [PATCH 1/1] [ion]: system-heap use PAGE_ALLOC_COSTLY_ORDER for high order

2014-10-06 Thread Heesub Shin
the system defined higher order value. Thus replacing this hard-coded value with PAGE_ALLOC_COSTLY_ORDER which is defined as 3. This will help mapping the higher order request in system heap with the actual allocation request. Quite reasonable. Reviewed-by: Heesub Shin BTW, Anyone knows how

Re: [PATCH 1/1] [ion]: system-heap use PAGE_ALLOC_COSTLY_ORDER for high order

2014-10-06 Thread Heesub Shin
the system defined higher order value. Thus replacing this hard-coded value with PAGE_ALLOC_COSTLY_ORDER which is defined as 3. This will help mapping the higher order request in system heap with the actual allocation request. Quite reasonable. Reviewed-by: Heesub Shin heesub.s...@samsung.com

Re: [RFC 3/3] zram: add swap_get_free hint

2014-09-04 Thread Heesub Shin
Hello Minchan, First of all, I agree with the overall purpose of your patch set. On 09/04/2014 10:39 AM, Minchan Kim wrote: This patch implement SWAP_GET_FREE handler in zram so that VM can know how many zram has freeable space. VM can use it to stop anonymous reclaiming once zram is full.

Re: [RFC 3/3] zram: add swap_get_free hint

2014-09-04 Thread Heesub Shin
Hello Minchan, First of all, I agree with the overall purpose of your patch set. On 09/04/2014 10:39 AM, Minchan Kim wrote: This patch implement SWAP_GET_FREE handler in zram so that VM can know how many zram has freeable space. VM can use it to stop anonymous reclaiming once zram is full.

[PATCH] staging: ion: fixup invalid kfree() calls on heap destroy

2014-06-19 Thread Heesub Shin
should have caught this before the merge, my bad. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index c826b4c..6b77c51

[PATCH] staging: ion: fixup invalid kfree() calls on heap destroy

2014-06-19 Thread Heesub Shin
should have caught this before the merge, my bad. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_system_heap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c

[PATCH v2 RESEND 3/4] staging: ion: remove order argument from free_buffer_page()

2014-05-29 Thread Heesub Shin
Now that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin Reviewed-by: Mitchel Humpherys Tested-by: John Stultz --- drivers/staging/android/ion/ion_system_heap.c | 9 - 1 file changed, 4

[PATCH v2 RESEND 4/4] staging: ion: optimize struct ion_system_heap

2014-05-29 Thread Heesub Shin
overhead to the slab. Signed-off-by: Heesub Shin Reviewed-by: Mitchel Humpherys Tested-by: John Stultz --- drivers/staging/android/ion/ion_system_heap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging

[PATCH v2 RESEND 2/4] staging: ion: remove struct page_info

2014-05-29 Thread Heesub Shin
ION system heap creates a temporary list of pages to build scatter/gather table, introducing an internal data type, page_info. Now that the order field has been removed from it, we do not need to depend on such data type anymore. Signed-off-by: Heesub Shin Reviewed-by: Mitchel Humpherys Tested

[PATCH v2 RESEND 1/4] staging: ion: remove order from struct page_info

2014-05-29 Thread Heesub Shin
ION system heap uses an internal data structure, struct page_info, for tracking down the meta information of the pages allocated from the pool. Now that the pool returns compound pages, we don't need to store page order in struct page_info. Signed-off-by: Heesub Shin Reviewed-by: Mitchel

Re: [PATCH v2 1/9] staging: ion: tidy up a bit

2014-05-29 Thread Heesub Shin
On 05/30/2014 05:42 AM, Greg Kroah-Hartman wrote: On Wed, May 28, 2014 at 03:52:52PM +0900, Heesub Shin wrote: For aesthetics and readability, rename goto labels, remove useless code lines, and clarify function return type. Signed-off-by: Heesub Shin Reviewed-by: Mitchel Humpherys Tested

Re: [PATCH v2 1/9] staging: ion: tidy up a bit

2014-05-29 Thread Heesub Shin
On 05/30/2014 05:42 AM, Greg Kroah-Hartman wrote: On Wed, May 28, 2014 at 03:52:52PM +0900, Heesub Shin wrote: For aesthetics and readability, rename goto labels, remove useless code lines, and clarify function return type. Signed-off-by: Heesub Shin heesub.s...@samsung.com Reviewed

[PATCH v2 RESEND 4/4] staging: ion: optimize struct ion_system_heap

2014-05-29 Thread Heesub Shin
overhead to the slab. Signed-off-by: Heesub Shin heesub.s...@samsung.com Reviewed-by: Mitchel Humpherys mitch...@codeaurora.org Tested-by: John Stultz john.stu...@linaro.org --- drivers/staging/android/ion/ion_system_heap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH v2 RESEND 2/4] staging: ion: remove struct page_info

2014-05-29 Thread Heesub Shin
ION system heap creates a temporary list of pages to build scatter/gather table, introducing an internal data type, page_info. Now that the order field has been removed from it, we do not need to depend on such data type anymore. Signed-off-by: Heesub Shin heesub.s...@samsung.com Reviewed

[PATCH v2 RESEND 1/4] staging: ion: remove order from struct page_info

2014-05-29 Thread Heesub Shin
ION system heap uses an internal data structure, struct page_info, for tracking down the meta information of the pages allocated from the pool. Now that the pool returns compound pages, we don't need to store page order in struct page_info. Signed-off-by: Heesub Shin heesub.s...@samsung.com

[PATCH v2 RESEND 3/4] staging: ion: remove order argument from free_buffer_page()

2014-05-29 Thread Heesub Shin
Now that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin heesub.s...@samsung.com Reviewed-by: Mitchel Humpherys mitch...@codeaurora.org Tested-by: John Stultz john.stu...@linaro.org --- drivers

[PATCH v2 7/9] staging: ion: remove order argument from free_buffer_page()

2014-05-28 Thread Heesub Shin
Now that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v2 9/9] staging: ion: optimize struct ion_system_heap

2014-05-28 Thread Heesub Shin
overhead to the slab. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index d78d589e..690d866

[PATCH v2 8/9] staging: ion: shrink highmem pages on kswapd

2014-05-28 Thread Heesub Shin
-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index c1cea42b..5864f3d 100644 --- a/drivers/staging/android/ion

[PATCH v2 6/9] staging: ion: remove struct page_info

2014-05-28 Thread Heesub Shin
ION system heap creates a temporary list of pages to build scatter/gather table, introducing an internal data type, page_info. Now that the order field has been removed from it, we do not need to depend on such data type anymore. Signed-off-by: Heesub Shin --- drivers/staging/android/ion

[PATCH v2 5/9] staging: ion: remove order from struct page_info

2014-05-28 Thread Heesub Shin
ION system heap uses an internal data structure, struct page_info, for tracking down the meta information of the pages allocated from the pool. Now that the pool returns compound pages, we don't need to store page order in struct page_info. Signed-off-by: Heesub Shin --- drivers/staging/android

[PATCH v2 4/9] staging: ion: use compound pages on high order pages for system heap

2014-05-28 Thread Heesub Shin
Using compound pages relieves burden on tracking the meta information which are currently stored in page_info. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 4 +++- drivers/staging/android/ion/ion_system_heap.c | 2 +- 2 files changed, 4 insertions(+), 2

[PATCH v2 3/9] staging: ion: remove struct ion_page_pool_item

2014-05-28 Thread Heesub Shin
for it. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 27 +-- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index 1684780..111777c 100644

[PATCH v2 1/9] staging: ion: tidy up a bit

2014-05-28 Thread Heesub Shin
For aesthetics and readability, rename goto labels, remove useless code lines, and clarify function return type. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 2 +- drivers/staging/android/ion/ion_priv.h| 2 +- drivers/staging/android/ion

[PATCH v2 2/9] staging: ion: simplify ion_page_pool_total()

2014-05-28 Thread Heesub Shin
ion_page_pool_total() returns the total number of pages in the pool. Depending on the argument passed, it counts highmem pages in or not. This commit simplifies the code lines for better readability. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 10 +- 1

[PATCH v2 0/9] staging: ion: system heap and page pool fixes

2014-05-28 Thread Heesub Shin
Hi, Here is my patchset with some modification, hoping reviews or comments from you guys. v2: o No changes in the code, just reworded changelog o Reorder patch Heesub Shin (9): staging: ion: tidy up a bit staging: ion: simplify ion_page_pool_total() staging: ion: remove struct

[PATCH v2 0/9] staging: ion: system heap and page pool fixes

2014-05-28 Thread Heesub Shin
Hi, Here is my patchset with some modification, hoping reviews or comments from you guys. v2: o No changes in the code, just reworded changelog o Reorder patch Heesub Shin (9): staging: ion: tidy up a bit staging: ion: simplify ion_page_pool_total() staging: ion: remove struct

[PATCH v2 2/9] staging: ion: simplify ion_page_pool_total()

2014-05-28 Thread Heesub Shin
ion_page_pool_total() returns the total number of pages in the pool. Depending on the argument passed, it counts highmem pages in or not. This commit simplifies the code lines for better readability. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion

[PATCH v2 1/9] staging: ion: tidy up a bit

2014-05-28 Thread Heesub Shin
For aesthetics and readability, rename goto labels, remove useless code lines, and clarify function return type. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 2 +- drivers/staging/android/ion/ion_priv.h| 2 +- drivers/staging

[PATCH v2 3/9] staging: ion: remove struct ion_page_pool_item

2014-05-28 Thread Heesub Shin
for it. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 27 +-- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index

[PATCH v2 4/9] staging: ion: use compound pages on high order pages for system heap

2014-05-28 Thread Heesub Shin
Using compound pages relieves burden on tracking the meta information which are currently stored in page_info. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 4 +++- drivers/staging/android/ion/ion_system_heap.c | 2 +- 2 files changed, 4

[PATCH v2 5/9] staging: ion: remove order from struct page_info

2014-05-28 Thread Heesub Shin
ION system heap uses an internal data structure, struct page_info, for tracking down the meta information of the pages allocated from the pool. Now that the pool returns compound pages, we don't need to store page order in struct page_info. Signed-off-by: Heesub Shin heesub.s...@samsung.com

[PATCH v2 6/9] staging: ion: remove struct page_info

2014-05-28 Thread Heesub Shin
ION system heap creates a temporary list of pages to build scatter/gather table, introducing an internal data type, page_info. Now that the order field has been removed from it, we do not need to depend on such data type anymore. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers

[PATCH v2 8/9] staging: ion: shrink highmem pages on kswapd

2014-05-28 Thread Heesub Shin
...@samsung.com Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index c1cea42b..5864f3d

[PATCH v2 9/9] staging: ion: optimize struct ion_system_heap

2014-05-28 Thread Heesub Shin
overhead to the slab. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_system_heap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c

[PATCH v2 7/9] staging: ion: remove order argument from free_buffer_page()

2014-05-28 Thread Heesub Shin
Now that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_system_heap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions

Re: [PATCH 1/9] staging: ion: tidy up a bit

2014-05-26 Thread Heesub Shin
Hello Carpenter, On 05/26/2014 07:36 PM, Dan Carpenter wrote: On Mon, May 26, 2014 at 07:04:53PM +0900, Heesub Shin wrote: @@ -124,7 +122,6 @@ static struct page_info *alloc_largest_available(struct ion_system_heap *heap, info->page = page; info->

Re: [PATCH 4/9] staging: ion: remove struct ion_page_pool_item

2014-05-26 Thread Heesub Shin
Hello, On 05/26/2014 07:04 PM, Heesub Shin wrote: Now that the order information is held on struct page itself, we do not need to use extra data structure. This commit reduces unnecessary slab usage for allocating small objects. Oops. I need to amend changelog above and resend this patchset

[PATCH 5/9] staging: ion: remove order from struct page_info

2014-05-26 Thread Heesub Shin
ION system heap uses an internal data structure, struct page_info, for tracking down the meta information of the pages allocated from the pool. Now that the pool returns compound pages, we don't need to store page order in struct page_info. Signed-off-by: Heesub Shin --- drivers/staging/android

[PATCH 6/9] staging: ion: remove struct page_info

2014-05-26 Thread Heesub Shin
ION system heap uses a temporary list holding meta data on pages allocated to build scatter/gather table. Now that the pages are compound pages, we do not need to introduce a new data type redundantly. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 47

[PATCH 3/9] staging: ion: use compound pages on high order pages for system heap

2014-05-26 Thread Heesub Shin
Using compound pages relieves burden on tracking the meta information which are currently stored in page_info. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 4 +++- drivers/staging/android/ion/ion_system_heap.c | 2 +- 2 files changed, 4 insertions(+), 2

[PATCH 4/9] staging: ion: remove struct ion_page_pool_item

2014-05-26 Thread Heesub Shin
Now that the order information is held on struct page itself, we do not need to use extra data structure. This commit reduces unnecessary slab usage for allocating small objects. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 27 +-- 1 file

[PATCH 9/9] staging: ion: optimize struct ion_system_heap

2014-05-26 Thread Heesub Shin
overhead to the slab. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index d78d589e..690d866

[PATCH 8/9] staging: ion: shrink highmem pages on kswapd

2014-05-26 Thread Heesub Shin
-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index c1cea42b..5864f3d 100644 --- a/drivers/staging/android/ion

[PATCH 7/9] staging: ion: remove order argument from free_buffer_page()

2014-05-26 Thread Heesub Shin
Not that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 2/9] staging: ion: simplify ion_page_pool_total()

2014-05-26 Thread Heesub Shin
ion_page_pool_total() returns the total number of pages in the pool. Depending on the argument passed, it counts pages from highmem zone in or not. This commit simplifies the code lines for better readability. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 10

[PATCH 1/9] staging: ion: tidy up a bit

2014-05-26 Thread Heesub Shin
For aesthetics and readability, rename goto labels, remove useless code lines, and clarify function return type. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_page_pool.c | 2 +- drivers/staging/android/ion/ion_priv.h| 2 +- drivers/staging/android/ion

[PATCH 1/9] staging: ion: tidy up a bit

2014-05-26 Thread Heesub Shin
For aesthetics and readability, rename goto labels, remove useless code lines, and clarify function return type. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 2 +- drivers/staging/android/ion/ion_priv.h| 2 +- drivers/staging

[PATCH 7/9] staging: ion: remove order argument from free_buffer_page()

2014-05-26 Thread Heesub Shin
Not that the pages returned from the pool are compound pages, we do not need to pass the order information to free_buffer_page(). Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_system_heap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions

[PATCH 2/9] staging: ion: simplify ion_page_pool_total()

2014-05-26 Thread Heesub Shin
ion_page_pool_total() returns the total number of pages in the pool. Depending on the argument passed, it counts pages from highmem zone in or not. This commit simplifies the code lines for better readability. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion

[PATCH 8/9] staging: ion: shrink highmem pages on kswapd

2014-05-26 Thread Heesub Shin
...@samsung.com Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index c1cea42b..5864f3d

[PATCH 9/9] staging: ion: optimize struct ion_system_heap

2014-05-26 Thread Heesub Shin
overhead to the slab. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_system_heap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c

[PATCH 3/9] staging: ion: use compound pages on high order pages for system heap

2014-05-26 Thread Heesub Shin
Using compound pages relieves burden on tracking the meta information which are currently stored in page_info. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 4 +++- drivers/staging/android/ion/ion_system_heap.c | 2 +- 2 files changed, 4

[PATCH 4/9] staging: ion: remove struct ion_page_pool_item

2014-05-26 Thread Heesub Shin
Now that the order information is held on struct page itself, we do not need to use extra data structure. This commit reduces unnecessary slab usage for allocating small objects. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion/ion_page_pool.c | 27

[PATCH 6/9] staging: ion: remove struct page_info

2014-05-26 Thread Heesub Shin
ION system heap uses a temporary list holding meta data on pages allocated to build scatter/gather table. Now that the pages are compound pages, we do not need to introduce a new data type redundantly. Signed-off-by: Heesub Shin heesub.s...@samsung.com --- drivers/staging/android/ion

[PATCH 5/9] staging: ion: remove order from struct page_info

2014-05-26 Thread Heesub Shin
ION system heap uses an internal data structure, struct page_info, for tracking down the meta information of the pages allocated from the pool. Now that the pool returns compound pages, we don't need to store page order in struct page_info. Signed-off-by: Heesub Shin heesub.s...@samsung.com

Re: [PATCH 4/9] staging: ion: remove struct ion_page_pool_item

2014-05-26 Thread Heesub Shin
Hello, On 05/26/2014 07:04 PM, Heesub Shin wrote: Now that the order information is held on struct page itself, we do not need to use extra data structure. This commit reduces unnecessary slab usage for allocating small objects. Oops. I need to amend changelog above and resend this patchset

Re: [PATCH 1/9] staging: ion: tidy up a bit

2014-05-26 Thread Heesub Shin
Hello Carpenter, On 05/26/2014 07:36 PM, Dan Carpenter wrote: On Mon, May 26, 2014 at 07:04:53PM +0900, Heesub Shin wrote: @@ -124,7 +122,6 @@ static struct page_info *alloc_largest_available(struct ion_system_heap *heap, info-page = page; info-order = orders

Re: [RFC PATCH 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-14 Thread Heesub Shin
Hello, On 05/15/2014 10:53 AM, Joonsoo Kim wrote: On Tue, May 13, 2014 at 12:00:57PM +0900, Minchan Kim wrote: Hey Joonsoo, On Thu, May 08, 2014 at 09:32:23AM +0900, Joonsoo Kim wrote: CMA is introduced to provide physically contiguous pages at runtime. For this purpose, it reserves memory

Re: [RFC PATCH 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-14 Thread Heesub Shin
Hello, On 05/15/2014 10:53 AM, Joonsoo Kim wrote: On Tue, May 13, 2014 at 12:00:57PM +0900, Minchan Kim wrote: Hey Joonsoo, On Thu, May 08, 2014 at 09:32:23AM +0900, Joonsoo Kim wrote: CMA is introduced to provide physically contiguous pages at runtime. For this purpose, it reserves memory

[PATCH 1/2] mm/compaction: clean up unused code lines

2014-04-03 Thread Heesub Shin
This commit removes code lines currently not in use or never called. Signed-off-by: Heesub Shin Cc: Dongjun Shin Cc: Sunghwan Yun --- mm/compaction.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 9635083..1ef9144 100644 --- a/mm

[PATCH 2/2] mm/compaction: fix to initialize free scanner properly

2014-04-03 Thread Heesub Shin
ree scanner tries to isolate free pages from the middle of pageblock to the end, which can be very small range. Signed-off-by: Heesub Shin Cc: Dongjun Shin Cc: Sunghwan Yun --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c in

[PATCH 1/2] mm/compaction: clean up unused code lines

2014-04-03 Thread Heesub Shin
This commit removes code lines currently not in use or never called. Signed-off-by: Heesub Shin heesub.s...@samsung.com Cc: Dongjun Shin d.j.s...@samsung.com Cc: Sunghwan Yun sunghwan@samsung.com --- mm/compaction.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/mm

[PATCH 2/2] mm/compaction: fix to initialize free scanner properly

2014-04-03 Thread Heesub Shin
scanner tries to isolate free pages from the middle of pageblock to the end, which can be very small range. Signed-off-by: Heesub Shin heesub.s...@samsung.com Cc: Dongjun Shin d.j.s...@samsung.com Cc: Sunghwan Yun sunghwan@samsung.com --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] fs/buffer.c: use lowmem_page_address instead of page_address

2013-08-12 Thread Heesub Shin
Here, the page has been identified as lowmem already. So, calling lowmem_page_address() directly is a little cheaper than page_address(). Signed-off-by: Heesub Shin Cc: Dongjun Shin --- fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/buffer.c b/fs/buffer.c

[PATCH] fs/buffer.c: use lowmem_page_address instead of page_address

2013-08-12 Thread Heesub Shin
Here, the page has been identified as lowmem already. So, calling lowmem_page_address() directly is a little cheaper than page_address(). Signed-off-by: Heesub Shin heesub.s...@samsung.com Cc: Dongjun Shin d.j.s...@samsung.com --- fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

  1   2   >