[PATCH v5 3/4] zram: make deduplication feature optional

2017-05-11 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional in Kconfig and device param. Default is 'off'. This option will be beneficial for users who use the zram as blockdev and stores build output to it.

[PATCH v5 2/4] zram: implement deduplication in zram

2017-05-11 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is

[PATCH v5 0/4] zram: implement deduplication in zram

2017-05-11 Thread js1304
From: Joonsoo Kim Changes from v4 o rebase on next-20170511 o collect Reviewed-by from Sergey Changes from v3 o fix module build problem o make zram_dedup_enabled() statically return false if CONFIG_ZRAM_DEDUP=n Changes from v2 o rebase to latest zram code o manage

[PATCH v5 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-05-11 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of

[PATCH v5 4/4] zram: compare all the entries with same checksum for deduplication

2017-05-11 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same

[PATCH v5 2/4] zram: implement deduplication in zram

2017-05-11 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is a paper that reports

[PATCH v5 0/4] zram: implement deduplication in zram

2017-05-11 Thread js1304
From: Joonsoo Kim Changes from v4 o rebase on next-20170511 o collect Reviewed-by from Sergey Changes from v3 o fix module build problem o make zram_dedup_enabled() statically return false if CONFIG_ZRAM_DEDUP=n Changes from v2 o rebase to latest zram code o manage alloc/free of the zram_entry

[PATCH v5 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-05-11 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of zsmalloc handle. Many lines

[PATCH v5 4/4] zram: compare all the entries with same checksum for deduplication

2017-05-11 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same checksum. Since this event

[PATCH v4 4/4] zram: compare all the entries with same checksum for deduplication

2017-04-25 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same

[PATCH v4 4/4] zram: compare all the entries with same checksum for deduplication

2017-04-25 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same checksum. Since this event

[PATCH v4 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-04-25 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of

[PATCH v4 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-04-25 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of zsmalloc handle. Many lines

[PATCH v4 2/4] zram: implement deduplication in zram

2017-04-25 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is

[PATCH v4 2/4] zram: implement deduplication in zram

2017-04-25 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is a paper that reports

[PATCH v4 3/4] zram: make deduplication feature optional

2017-04-25 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional in Kconfig and device param. Default is 'off'. This option will be beneficial for users who use the zram as blockdev and stores

[PATCH v4 3/4] zram: make deduplication feature optional

2017-04-25 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional in Kconfig and device param. Default is 'off'. This option will be beneficial for users who use the zram as blockdev and stores build output to it.

[PATCH v4 0/4] zram: implement deduplication in zram

2017-04-25 Thread js1304
From: Joonsoo Kim Changes from v3 o fix module build problem o make zram_dedup_enabled() statically return false if CONFIG_ZRAM_DEDUP=n Changes from v2 o rebase to latest zram code o manage alloc/free of the zram_entry in zram_drv.c o remove useless RB_CLEAR_NODE o set

[PATCH v4 0/4] zram: implement deduplication in zram

2017-04-25 Thread js1304
From: Joonsoo Kim Changes from v3 o fix module build problem o make zram_dedup_enabled() statically return false if CONFIG_ZRAM_DEDUP=n Changes from v2 o rebase to latest zram code o manage alloc/free of the zram_entry in zram_drv.c o remove useless RB_CLEAR_NODE o set RO permission tor

[PATCH v3 2/4] zram: implement deduplication in zram

2017-04-20 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is

[PATCH v3 2/4] zram: implement deduplication in zram

2017-04-20 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is a paper that reports

[PATCH v3 4/4] zram: compare all the entries with same checksum for deduplication

2017-04-20 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same

[PATCH v3 4/4] zram: compare all the entries with same checksum for deduplication

2017-04-20 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same checksum. Since this event

[PATCH v3 0/4] zram: implement deduplication in zram

2017-04-20 Thread js1304
From: Joonsoo Kim Changes from v2 o rebase to latest zram code o manage alloc/free of the zram_entry in zram_drv.c o remove useless RB_CLEAR_NODE o set RO permission tor use_deup sysfs entry if CONFIG_ZRAM_DEDUP=n Changes from v1 o reogranize dedup specific functions o

[PATCH v3 3/4] zram: make deduplication feature optional

2017-04-20 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional in Kconfig and device param. Default is 'off'. This option will be beneficial for users who use the zram as blockdev and stores

[PATCH v3 0/4] zram: implement deduplication in zram

2017-04-20 Thread js1304
From: Joonsoo Kim Changes from v2 o rebase to latest zram code o manage alloc/free of the zram_entry in zram_drv.c o remove useless RB_CLEAR_NODE o set RO permission tor use_deup sysfs entry if CONFIG_ZRAM_DEDUP=n Changes from v1 o reogranize dedup specific functions o support Kconfig on/off o

[PATCH v3 3/4] zram: make deduplication feature optional

2017-04-20 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional in Kconfig and device param. Default is 'off'. This option will be beneficial for users who use the zram as blockdev and stores build output to it.

[PATCH v3 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-04-20 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of

[PATCH v3 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-04-20 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of zsmalloc handle. Many lines

[PATCH v7 1/7] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request

2017-04-10 Thread js1304
From: Joonsoo Kim Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that important to reserve. When ZONE_MOVABLE is used, this problem would theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE allocation request which is mainly used

[PATCH v7 1/7] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request

2017-04-10 Thread js1304
From: Joonsoo Kim Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that important to reserve. When ZONE_MOVABLE is used, this problem would theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE allocation request which is mainly used for page cache and anon

[PATCH v7 6/7] mm/cma: remove per zone CMA stat

2017-04-10 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA so we don't need to maintain CMA stat in other zones. Remove it. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Signed-off-by:

[PATCH v7 6/7] mm/cma: remove per zone CMA stat

2017-04-10 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA so we don't need to maintain CMA stat in other zones. Remove it. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- fs/proc/meminfo.c | 2 +- include/linux/cma.h

[PATCH v7 7/7] ARM: CMA: avoid re-mapping CMA region if CONFIG_HIGHMEM

2017-04-10 Thread js1304
From: Joonsoo Kim CMA region is now managed by the separate zone, ZONE_CMA, to fix many MM related problems. In this implementation, it is possible that ZONE_CMA contains two CMA regions that are on the both, lowmem and highmem, respectively. To handle this case properly,

[PATCH v7 7/7] ARM: CMA: avoid re-mapping CMA region if CONFIG_HIGHMEM

2017-04-10 Thread js1304
From: Joonsoo Kim CMA region is now managed by the separate zone, ZONE_CMA, to fix many MM related problems. In this implementation, it is possible that ZONE_CMA contains two CMA regions that are on the both, lowmem and highmem, respectively. To handle this case properly, ZONE_CMA is considered

[PATCH v7 3/7] mm/cma: populate ZONE_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Until now, reserved pages for CMA are managed in the ordinary zones where page's pfn are belong to. This approach has numorous problems and fixing them isn't easy. (It is mentioned on previous patch.) To fix this situation, ZONE_CMA is introduced in

[PATCH v7 2/7] mm/cma: introduce new zone, ZONE_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Attached cover-letter: This series try to solve problems of current CMA implementation. CMA is introduced to provide physically contiguous pages at runtime without exclusive reserved memory area. But, current implementation works like as previous

[PATCH v7 3/7] mm/cma: populate ZONE_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Until now, reserved pages for CMA are managed in the ordinary zones where page's pfn are belong to. This approach has numorous problems and fixing them isn't easy. (It is mentioned on previous patch.) To fix this situation, ZONE_CMA is introduced in previous patch, but, not yet

[PATCH v7 2/7] mm/cma: introduce new zone, ZONE_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Attached cover-letter: This series try to solve problems of current CMA implementation. CMA is introduced to provide physically contiguous pages at runtime without exclusive reserved memory area. But, current implementation works like as previous reserved memory approach,

[PATCH v7 5/7] mm/cma: remove MIGRATE_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and there is no other type of pages. Therefore, we don't need to use MIGRATE_CMA to distinguish and handle differently for CMA pages and ordinary pages. Remove MIGRATE_CMA. Unfortunately,

[PATCH v7 5/7] mm/cma: remove MIGRATE_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and there is no other type of pages. Therefore, we don't need to use MIGRATE_CMA to distinguish and handle differently for CMA pages and ordinary pages. Remove MIGRATE_CMA. Unfortunately, this patch make free

[PATCH v7 4/7] mm/cma: remove ALLOC_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and it only serves for GFP_HIGHUSER_MOVABLE. Therefore, we don't need to consider ALLOC_CMA at all. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil

[PATCH v7 4/7] mm/cma: remove ALLOC_CMA

2017-04-10 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and it only serves for GFP_HIGHUSER_MOVABLE. Therefore, we don't need to consider ALLOC_CMA at all. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- mm/compaction.c | 4

[PATCH v7 0/7] Introduce ZONE_CMA

2017-04-10 Thread js1304
ml/2014/10/15/623 [4] http://www.spinics.net/lists/linux-mm/msg100562.html [5] https://lkml.kernel.org/r/20160425053653.GA25662@js1304-P5Q-DELUXE [6] https://lkml.kernel.org/r/1919a85d-6e1e-374f-b8c3-1236c36b0...@suse.cz Joonsoo Kim (7): mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE reque

[PATCH v7 0/7] Introduce ZONE_CMA

2017-04-10 Thread js1304
s.net/lists/linux-mm/msg100562.html [5] https://lkml.kernel.org/r/20160425053653.GA25662@js1304-P5Q-DELUXE [6] https://lkml.kernel.org/r/1919a85d-6e1e-374f-b8c3-1236c36b0...@suse.cz Joonsoo Kim (7): mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request mm/cma: introduce new zon

[PATCH v2 3/4] zram: make deduplication feature optional

2017-03-29 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional in Kconfig and device param. Default is 'off'. This option will be beneficial for users who use the zram as blockdev and stores

[PATCH v2 4/4] zram: compare all the entries with same checksum for deduplication

2017-03-29 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same

[PATCH v2 3/4] zram: make deduplication feature optional

2017-03-29 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional in Kconfig and device param. Default is 'off'. This option will be beneficial for users who use the zram as blockdev and stores build output to it.

[PATCH v2 4/4] zram: compare all the entries with same checksum for deduplication

2017-03-29 Thread js1304
From: Joonsoo Kim Until now, we compare just one entry with same checksum when checking duplication since it is the simplest way to implement. However, for the completeness, checking all the entries is better so this patch implement to compare all the entries with same checksum. Since this event

[PATCH v2 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-03-29 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of

[PATCH v2 2/4] zram: implement deduplication in zram

2017-03-29 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is

[PATCH v2 1/4] zram: introduce zram_entry to prepare dedup functionality

2017-03-29 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of zsmalloc handle. Many lines

[PATCH v2 2/4] zram: implement deduplication in zram

2017-03-29 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is a paper that reports

[PATCH v2 0/4] zram: implement deduplication in zram

2017-03-29 Thread js1304
From: Joonsoo Kim Changes from v1 o reogranize dedup specific functions o support Kconfig on/off o update zram documents o compare all the entries with same checksum (patch #4) This patchset implements deduplication feature in zram. Motivation is to save memory usage by

[PATCH v2 0/4] zram: implement deduplication in zram

2017-03-29 Thread js1304
From: Joonsoo Kim Changes from v1 o reogranize dedup specific functions o support Kconfig on/off o update zram documents o compare all the entries with same checksum (patch #4) This patchset implements deduplication feature in zram. Motivation is to save memory usage by zram. There are detailed

[PATCH 4/4] zram: make deduplication feature optional

2017-03-15 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional. Signed-off-by: Joonsoo Kim --- drivers/block/zram/zram_drv.c | 80

[PATCH 0/4] zram: implement deduplication in zram

2017-03-15 Thread js1304
From: Joonsoo Kim This patchset implements deduplication feature in zram. Motivation is to save memory usage by zram. There are detailed description about motivation and experimental results on patch 3 so please refer it. Thanks. Joonsoo Kim (4): mm/zsmalloc: always

[PATCH 4/4] zram: make deduplication feature optional

2017-03-15 Thread js1304
From: Joonsoo Kim Benefit of deduplication is dependent on the workload so it's not preferable to always enable. Therefore, make it optional. Signed-off-by: Joonsoo Kim --- drivers/block/zram/zram_drv.c | 80 ++- drivers/block/zram/zram_drv.h | 1 + 2

[PATCH 0/4] zram: implement deduplication in zram

2017-03-15 Thread js1304
From: Joonsoo Kim This patchset implements deduplication feature in zram. Motivation is to save memory usage by zram. There are detailed description about motivation and experimental results on patch 3 so please refer it. Thanks. Joonsoo Kim (4): mm/zsmalloc: always set movable/highmem flag

[PATCH 3/4] zram: implement deduplication in zram

2017-03-15 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is

[PATCH 3/4] zram: implement deduplication in zram

2017-03-15 Thread js1304
From: Joonsoo Kim This patch implements deduplication feature in zram. The purpose of this work is naturally to save amount of memory usage by zram. Android is one of the biggest users to use zram as swap and it's really important to save amount of memory usage. There is a paper that reports

[PATCH 2/4] zram: introduce zram_entry to prepare dedup functionality

2017-03-15 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of

[PATCH 1/4] mm/zsmalloc: always set movable/highmem flag to the zspage

2017-03-15 Thread js1304
From: Joonsoo Kim Zspage is always movable and is used through zs_map_object() function which returns directly accessible pointer that contains content of zspage. It is independent on the user's allocation flag. Therefore, it's better to always set movable/highmem flag to

[PATCH 2/4] zram: introduce zram_entry to prepare dedup functionality

2017-03-15 Thread js1304
From: Joonsoo Kim Following patch will implement deduplication functionality in the zram and it requires an indirection layer to manage the life cycle of zsmalloc handle. To prepare that, this patch introduces zram_entry which can be used to manage the life-cycle of zsmalloc handle. Many lines

[PATCH 1/4] mm/zsmalloc: always set movable/highmem flag to the zspage

2017-03-15 Thread js1304
From: Joonsoo Kim Zspage is always movable and is used through zs_map_object() function which returns directly accessible pointer that contains content of zspage. It is independent on the user's allocation flag. Therefore, it's better to always set movable/highmem flag to the zspage. After that,

[PATCH v6 2/6] mm/cma: introduce new zone, ZONE_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Attached cover-letter: This series try to solve problems of current CMA implementation. CMA is introduced to provide physically contiguous pages at runtime without exclusive reserved memory area. But, current implementation works like as previous

[PATCH v6 5/6] mm/cma: remove MIGRATE_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and there is no other type of pages. Therefore, we don't need to use MIGRATE_CMA to distinguish and handle differently for CMA pages and ordinary pages. Remove MIGRATE_CMA. Unfortunately,

[PATCH v6 1/6] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request

2016-10-13 Thread js1304
From: Joonsoo Kim Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that important to reserve. When ZONE_MOVABLE is used, this problem would theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE allocation request which is mainly used

[PATCH v6 6/6] mm/cma: remove per zone CMA stat

2016-10-13 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA so we don't need to maintain CMA stat in other zones. Remove it. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Signed-off-by:

[PATCH v6 1/6] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request

2016-10-13 Thread js1304
From: Joonsoo Kim Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that important to reserve. When ZONE_MOVABLE is used, this problem would theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE allocation request which is mainly used for page cache and anon

[PATCH v6 6/6] mm/cma: remove per zone CMA stat

2016-10-13 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA so we don't need to maintain CMA stat in other zones. Remove it. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- fs/proc/meminfo.c | 2 +- include/linux/cma.h

[PATCH v6 2/6] mm/cma: introduce new zone, ZONE_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Attached cover-letter: This series try to solve problems of current CMA implementation. CMA is introduced to provide physically contiguous pages at runtime without exclusive reserved memory area. But, current implementation works like as previous reserved memory approach,

[PATCH v6 5/6] mm/cma: remove MIGRATE_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and there is no other type of pages. Therefore, we don't need to use MIGRATE_CMA to distinguish and handle differently for CMA pages and ordinary pages. Remove MIGRATE_CMA. Unfortunately, this patch make free

[PATCH v6 3/6] mm/cma: populate ZONE_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Until now, reserved pages for CMA are managed in the ordinary zones where page's pfn are belong to. This approach has numorous problems and fixing them isn't easy. (It is mentioned on previous patch.) To fix this situation, ZONE_CMA is introduced in

[PATCH v6 4/6] mm/cma: remove ALLOC_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and it only serves for GFP_HIGHUSER_MOVABLE. Therefore, we don't need to consider ALLOC_CMA at all. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil

[PATCH v6 3/6] mm/cma: populate ZONE_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Until now, reserved pages for CMA are managed in the ordinary zones where page's pfn are belong to. This approach has numorous problems and fixing them isn't easy. (It is mentioned on previous patch.) To fix this situation, ZONE_CMA is introduced in previous patch, but, not yet

[PATCH v6 4/6] mm/cma: remove ALLOC_CMA

2016-10-13 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and it only serves for GFP_HIGHUSER_MOVABLE. Therefore, we don't need to consider ALLOC_CMA at all. Reviewed-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- mm/compaction.c | 4

[PATCH v6 0/6] Introduce ZONE_CMA

2016-10-13 Thread js1304
l.org/lkml/2014/5/28/64 [2] https://lkml.org/lkml/2014/11/4/55 [3] https://lkml.org/lkml/2014/10/15/623 [4] http://www.spinics.net/lists/linux-mm/msg100562.html [5] https://lkml.kernel.org/r/20160425053653.GA25662@js1304-P5Q-DELUXE [6] https://lkml.kernel.org/r/1919a85d-6e1e-374f-b8c3-1236c36b0...@sus

[PATCH v6 0/6] Introduce ZONE_CMA

2016-10-13 Thread js1304
//lkml.org/lkml/2014/11/4/55 [3] https://lkml.org/lkml/2014/10/15/623 [4] http://www.spinics.net/lists/linux-mm/msg100562.html [5] https://lkml.kernel.org/r/20160425053653.GA25662@js1304-P5Q-DELUXE [6] https://lkml.kernel.org/r/1919a85d-6e1e-374f-b8c3-1236c36b0...@suse.cz Joonsoo Kim (6): mm/page_

[RFC PATCH 3/5] mm/page_alloc: stop instantly reusing freed page

2016-10-13 Thread js1304
From: Joonsoo Kim Allocation/free pattern is usually sequantial. If they are freed to the buddy list, they can be coalesced. However, we first keep these freed pages at the pcp list and try to reuse them until threshold is reached so we don't have enough chance to get a

[RFC PATCH 5/5] mm/page_alloc: support fixed migratetype pageblock

2016-10-13 Thread js1304
From: Joonsoo Kim We have migratetype facility to minimise fragmentation. It dynamically changes migratetype of pageblock based on some criterias but it never be perfect. Some migratetype pages are often placed in the other migratetype pageblock. We call this pageblock as

[RFC PATCH 3/5] mm/page_alloc: stop instantly reusing freed page

2016-10-13 Thread js1304
From: Joonsoo Kim Allocation/free pattern is usually sequantial. If they are freed to the buddy list, they can be coalesced. However, we first keep these freed pages at the pcp list and try to reuse them until threshold is reached so we don't have enough chance to get a high order freepage. This

[RFC PATCH 5/5] mm/page_alloc: support fixed migratetype pageblock

2016-10-13 Thread js1304
From: Joonsoo Kim We have migratetype facility to minimise fragmentation. It dynamically changes migratetype of pageblock based on some criterias but it never be perfect. Some migratetype pages are often placed in the other migratetype pageblock. We call this pageblock as mixed pageblock. There

[RFC PATCH 0/5] Reduce fragmentation

2016-10-13 Thread js1304
From: Joonsoo Kim Hello, This is a patchset to reduce fragmentation. Patch 1 ~ 3 changes allocation/free logic to reduce fragmentation. Patch 4 ~ 5 is to manually control number of unmovable/reclaimable pageblock by user. Usually user has more knowledge about their

[RFC PATCH 4/5] mm/page_alloc: add fixed migratetype pageblock infrastructure

2016-10-13 Thread js1304
From: Joonsoo Kim Following patch will support permanent migratetype pageblock by kernel boot parameter. For preparation, this patch adds infrastructure for it. Once fixed, migratetype cannot be changed anymore until power off. Signed-off-by: Joonsoo Kim

[RFC PATCH 0/5] Reduce fragmentation

2016-10-13 Thread js1304
From: Joonsoo Kim Hello, This is a patchset to reduce fragmentation. Patch 1 ~ 3 changes allocation/free logic to reduce fragmentation. Patch 4 ~ 5 is to manually control number of unmovable/reclaimable pageblock by user. Usually user has more knowledge about their system and if the number of

[RFC PATCH 4/5] mm/page_alloc: add fixed migratetype pageblock infrastructure

2016-10-13 Thread js1304
From: Joonsoo Kim Following patch will support permanent migratetype pageblock by kernel boot parameter. For preparation, this patch adds infrastructure for it. Once fixed, migratetype cannot be changed anymore until power off. Signed-off-by: Joonsoo Kim --- include/linux/pageblock-flags.h |

[RFC PATCH 1/5] mm/page_alloc: always add freeing page at the tail of the buddy list

2016-10-13 Thread js1304
From: Joonsoo Kim Currently, freeing page can stay longer in the buddy list if next higher order page is in the buddy list in order to help coalescence. However, it doesn't work for the simplest sequential free case. For example, think about the situation that 8

[RFC PATCH 1/5] mm/page_alloc: always add freeing page at the tail of the buddy list

2016-10-13 Thread js1304
From: Joonsoo Kim Currently, freeing page can stay longer in the buddy list if next higher order page is in the buddy list in order to help coalescence. However, it doesn't work for the simplest sequential free case. For example, think about the situation that 8 consecutive pages are freed in

[RFC PATCH 2/5] mm/page_alloc: use smallest fallback page first in movable allocation

2016-10-13 Thread js1304
From: Joonsoo Kim When we try to find freepage in fallback buddy list, we always serach the largest one. This would help for fragmentation if we process unmovable/reclaimable allocation request because it could cause permanent fragmentation on movable pageblock and spread

[RFC PATCH 2/5] mm/page_alloc: use smallest fallback page first in movable allocation

2016-10-13 Thread js1304
From: Joonsoo Kim When we try to find freepage in fallback buddy list, we always serach the largest one. This would help for fragmentation if we process unmovable/reclaimable allocation request because it could cause permanent fragmentation on movable pageblock and spread out such allocations

[PATCH] mm/slab: fix kmemcg cache creation delayed issue

2016-10-06 Thread js1304
From: Joonsoo Kim There is a bug report that SLAB makes extreme load average due to over 2000 kworker thread. https://bugzilla.kernel.org/show_bug.cgi?id=172981 This issue is caused by kmemcg feature that try to create new set of kmem_caches for each memcg. Recently,

[PATCH] mm/slab: fix kmemcg cache creation delayed issue

2016-10-06 Thread js1304
From: Joonsoo Kim There is a bug report that SLAB makes extreme load average due to over 2000 kworker thread. https://bugzilla.kernel.org/show_bug.cgi?id=172981 This issue is caused by kmemcg feature that try to create new set of kmem_caches for each memcg. Recently, kmem_cache creation is

[PATCH v5 6/6] mm/cma: remove per zone CMA stat

2016-08-28 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA so we don't need to maintain CMA stat in other zones. Remove it. Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- fs/proc/meminfo.c

[PATCH v5 2/6] mm/cma: introduce new zone, ZONE_CMA

2016-08-28 Thread js1304
From: Joonsoo Kim Attached cover-letter: This series try to solve problems of current CMA implementation. CMA is introduced to provide physically contiguous pages at runtime without exclusive reserved memory area. But, current implementation works like as previous

[PATCH v5 5/6] mm/cma: remove MIGRATE_CMA

2016-08-28 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and there is no other type of pages. Therefore, we don't need to use MIGRATE_CMA to distinguish and handle differently for CMA pages and ordinary pages. Remove MIGRATE_CMA. Unfortunately,

[PATCH v5 6/6] mm/cma: remove per zone CMA stat

2016-08-28 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA so we don't need to maintain CMA stat in other zones. Remove it. Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- fs/proc/meminfo.c | 2 +- include/linux/cma.h| 6 ++

[PATCH v5 2/6] mm/cma: introduce new zone, ZONE_CMA

2016-08-28 Thread js1304
From: Joonsoo Kim Attached cover-letter: This series try to solve problems of current CMA implementation. CMA is introduced to provide physically contiguous pages at runtime without exclusive reserved memory area. But, current implementation works like as previous reserved memory approach,

[PATCH v5 5/6] mm/cma: remove MIGRATE_CMA

2016-08-28 Thread js1304
From: Joonsoo Kim Now, all reserved pages for CMA region are belong to the ZONE_CMA and there is no other type of pages. Therefore, we don't need to use MIGRATE_CMA to distinguish and handle differently for CMA pages and ordinary pages. Remove MIGRATE_CMA. Unfortunately, this patch make free

[PATCH v5 0/6] Introduce ZONE_CMA

2016-08-28 Thread js1304
g/r/20160425053653.GA25662@js1304-P5Q-DELUXE [6] https://lkml.kernel.org/r/1919a85d-6e1e-374f-b8c3-1236c36b0...@suse.cz Joonsoo Kim (6): mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request mm/cma: introduce new zone, ZONE_CMA mm/cma: populate ZONE_CMA mm/cma: remove ALLOC_CMA

<    1   2   3   4   5   6   >