[PATCH 3/3] slub: add 'likely' macro to inc_slabs_node()

2013-01-14 Thread Joonsoo Kim
After boot phase, 'n' always exist. So add 'likely' macro for helping compiler. Signed-off-by: Joonsoo Kim diff --git a/mm/slub.c b/mm/slub.c index 830348b..6f82070 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1005,7 +1005,7 @@ static inline void inc_slabs_node(struct kmem

[PATCH 2/3] slub: correct bootstrap() for kmem_cache, kmem_cache_node

2013-01-14 Thread Joonsoo Kim
we also miss this slab. These didn't make any error previously, because we normally don't free objects which comes from kmem_cache's first slab and kmem_cache_node's. Problem will be solved if we consider a cpu slab in bootstrap(). This patch implement it. Signed-off-by: Joons

[PATCH] tools, vm: add .gitignore to ignore built binaries

2013-01-14 Thread Joonsoo Kim
There is no .gitignore in tools/vm, so 'git status' always show built binaries. To ignore this, add .gitignore. Signed-off-by: Joonsoo Kim diff --git a/tools/vm/.gitignore b/tools/vm/.gitignore new file mode 100644 index 000..44f095f --- /dev/null +++ b/tools/vm/.gitignore @@

Re: [RFC PATCH 0/8] remove vm_struct list management

2012-12-12 Thread JoonSoo Kim
Hello, Atsushi. 2012/12/12 Atsushi Kumagai : > Hello, > > On Tue, 11 Dec 2012 17:17:05 -0500 (EST) > Dave Anderson wrote: > >> >> >> - Original Message - >> > On Mon, Dec 10, 2012 at 11:40:47PM +0900, JoonSoo Kim wrote: >> > >> &g

Re: [PATCH v2 0/3] introduce static_vm for ARM-specific static mapped area

2012-12-12 Thread JoonSoo Kim
2012/12/7 JoonSoo Kim : > 2012/11/28 Joonsoo Kim : >> In current implementation, we used ARM-specific flag, that is, >> VM_ARM_STATIC_MAPPING, for distinguishing ARM specific static mapped area. >> The purpose of static mapped area is to re-use static mapped area when >&

[PATCH] mm: introduce numa_zero_pfn

2012-12-12 Thread Joonsoo Kim
e can reduce this overhead. This patch implement basic infrastructure for numa_zero_pfn. It is default disabled, because it doesn't provide page coloring and some architecture use page coloring for zero page. Signed-off-by: Joonsoo Kim diff --git a/mm/Kconfig b/mm/Kconfig index a3f8ddd..de0a

Re: [PATCH] mm: introduce numa_zero_pfn

2012-12-17 Thread JoonSoo Kim
2012/12/13 Andi Kleen : >> I would expect a processor to fetch the zero page cachelines from the l3 >> cache from other sockets avoiding memory transactions altogether. The zero >> page is likely in use somewhere so no typically no memory accesses should >> occur in a system. > > It depends on how

[PATCH 2/3] staging, zcache: use zs_mem_[read/write]

2013-01-16 Thread Joonsoo Kim
Now, we have newly introduced APIs which reduce copy overhead of zsmalloc for objects on page boundary. So use it in zcache. Signed-off-by: Joonsoo Kim diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 52b43b7..d1dee76 100644 --- a/drivers/staging

[RFC PATCH 1/3] staging, zsmalloc: introduce zs_mem_[read/write]

2013-01-16 Thread Joonsoo Kim
. Using this information, we can do memcpy without overhead. For USE_PGTABLE_MAPPING case, we can avoid flush cache and tlb overhead via these API. Signed-off-by: Joonsoo Kim --- These are [RFC] patches, because I don't test and I don't have test environment, yet. Just compile test done

[PATCH 3/3] staging, zram: use zs_mem_[read/write]

2013-01-16 Thread Joonsoo Kim
Now, we have newly introduced APIs which reduce copy overhead of zsmalloc for objects on page boundary. So use it in zram. Signed-off-by: Joonsoo Kim diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index fb4a7c9..554a742 100644 --- a/drivers/staging/zram

Re: [PATCH 1/3] slub: correct to calculate num of acquired objects in get_partial_node()

2013-01-16 Thread Joonsoo Kim
On Tue, Jan 15, 2013 at 03:46:17PM +, Christoph Lameter wrote: > On Tue, 15 Jan 2013, Joonsoo Kim wrote: > > > There is a subtle bug when calculating a number of acquired objects. > > After acquire_slab() is executed at first, page->inuse is same as > > page-&

Re: [PATCH 2/3] slub: correct bootstrap() for kmem_cache, kmem_cache_node

2013-01-16 Thread Joonsoo Kim
On Tue, Jan 15, 2013 at 03:36:10PM +, Christoph Lameter wrote: > On Tue, 15 Jan 2013, Joonsoo Kim wrote: > > > These didn't make any error previously, because we normally don't free > > objects which comes from kmem_cache's first slab and kmem_cache_node&#

Re: [PATCH V2] mm/slab: add a leak decoder callback

2013-01-17 Thread Joonsoo Kim
Hello, Liu Bo. On Wed, Jan 16, 2013 at 11:03:13AM +0800, Liu Bo wrote: > This adds a leak decoder callback so that slab destruction > can use to generate debugging output for the allocated objects. > > Callers like btrfs are using their own leak tracking which will > manage allocated objects in a

Re: [RFC][PATCH v2] slub: Keep page and object in sync in slab_alloc_node()

2013-01-17 Thread Joonsoo Kim
CPU cpu_slab and assigning the object and page. > After that, it's fine to allow preemption. How about this? It's based on v3.8-rc3. I'm not test this patch, yet. Just for sharing my idea to fix a problem. -8<--- >From aaf529e347b7deb8c

[PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0

2012-07-06 Thread Joonsoo Kim
__alloc_pages_direct_compact has many arguments so invoking it is very costly. And in almost invoking case, order is 0, so return immediately. Let's not invoke it when order 0 Signed-off-by: Joonsoo Kim diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6092f33..f4039aa 100644 ---

Re: [PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0

2012-07-06 Thread JoonSoo Kim
2012/7/7 Minchan Kim : > Hi Joonsoo, > > On Sat, Jul 07, 2012 at 12:28:41AM +0900, Joonsoo Kim wrote: >> __alloc_pages_direct_compact has many arguments so invoking it is very >> costly. > > It's already slow path so it's pointless for such optimization. I kn

Re: [PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0

2012-07-07 Thread JoonSoo Kim
>> >> >> And in almost invoking case, order is 0, so return immediately. >> > >> > You can't make sure it. >> >> Okay. >> >> >> >> >> Let's not invoke it when order 0 >> > >> > Let's not ruin git blame. >> >> Hmm... >> When I do git blame, I can't find anything related to this. > > I mean if we mer

Re: [PATCH] mm: don't invoke __alloc_pages_direct_compact when order 0

2012-07-07 Thread JoonSoo Kim
2012/7/7 David Rientjes : > On Sat, 7 Jul 2012, Joonsoo Kim wrote: > >> __alloc_pages_direct_compact has many arguments so invoking it is very >> costly. >> And in almost invoking case, order is 0, so return immediately. >> > > If "zero cost"

Re: WARNING: __GFP_FS allocations with IRQs disabled (kmemcheck_alloc_shadow)

2012-07-08 Thread JoonSoo Kim
2012/7/8 Fengguang Wu : > Hi Vegard, > > This warning code is triggered for the attached config: > > __lockdep_trace_alloc(): > /* > * Oi! Can't be having __GFP_FS allocations with IRQs disabled. > */ > if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))) >

Re: [PATCH 3/3] slub: release a lock if freeing object with a lock is failed in __slab_free()

2012-07-08 Thread JoonSoo Kim
2012/7/7 Christoph Lameter : > On Fri, 6 Jul 2012, JoonSoo Kim wrote: > >> >> At CPU2, we don't need lock anymore, because this slab already in partial >> >> list. >> > >> > For that scenario we could also simply do a trylock there and redo >

Re: [PATCH 2/5] mm: add per-zone lru list stat

2016-07-21 Thread Joonsoo Kim
On Wed, Jul 20, 2016 at 04:21:48PM +0100, Mel Gorman wrote: > From: Minchan Kim > > While I did stress test with hackbench, I got OOM message frequently which > didn't ever happen in zone-lru. > > gfp_mask=0x26004c0(GFP_KERNEL|__GFP_REPEAT|__GFP_NOTRACK), order=0 > .. > .. > [] __alloc_pages_no

Re: [PATCH 5/5] mm: consider per-zone inactive ratio to deactivate

2016-07-21 Thread Joonsoo Kim
On Wed, Jul 20, 2016 at 04:21:51PM +0100, Mel Gorman wrote: > From: Minchan Kim > > Minchan Kim reported that with per-zone lru state it was possible to > identify that a normal zone with 8^M anonymous pages could trigger > OOM with non-atomic order-0 allocations as all pages in the zone > were i

Re: [PATCH 0/5] Candidate fixes for premature OOM kills with node-lru v1

2016-07-21 Thread Joonsoo Kim
On Wed, Jul 20, 2016 at 04:21:46PM +0100, Mel Gorman wrote: > Both Joonsoo Kim and Minchan Kim have reported premature OOM kills on > a 32-bit platform. The common element is a zone-constrained high-order > allocation failing. Two factors appear to be at fault -- pgdat being >

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

2016-09-21 Thread Joonsoo Kim
On Fri, Sep 16, 2016 at 08:44:17AM +0530, Aneesh Kumar K.V wrote: > js1...@gmail.com writes: > > > 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, thi

Re: [PATCH v5 0/6] Introduce ZONE_CMA

2016-09-21 Thread Joonsoo Kim
On Wed, Sep 21, 2016 at 08:17:27PM +0530, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > > > Joonsoo Kim writes: > > > >> On Tue, Aug 30, 2016 at 04:09:37PM +0530, Aneesh Kumar K.V wrote: > >>> Joonsoo Kim writes: > >

Re: [PATCH v5 3/6] mm/cma: populate ZONE_CMA

2016-09-21 Thread Joonsoo Kim
On Wed, Sep 21, 2016 at 11:20:11AM +0200, Vlastimil Babka wrote: > On 08/29/2016 07:07 AM, js1...@gmail.com wrote: > >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

Re: [PATCH v5 3/6] mm/cma: populate ZONE_CMA

2016-09-21 Thread Joonsoo Kim
On Thu, Sep 22, 2016 at 02:45:46PM +0900, Joonsoo Kim wrote: > On Wed, Sep 21, 2016 at 11:20:11AM +0200, Vlastimil Babka wrote: > > On 08/29/2016 07:07 AM, js1...@gmail.com wrote: > > >From: Joonsoo Kim > > > > > >Until now, reserved pages for CMA are mana

Re: [PATCH 5/7] slab, workqueue: remove keventd_up() usage

2016-09-22 Thread Joonsoo Kim
meter > Cc: Pekka Enberg > Cc: David Rientjes > Cc: Joonsoo Kim > Cc: Andrew Morton > Cc: linux...@kvack.org > --- > Hello, > > This change depends on an earlier workqueue patch and is followed by a > patch to remove keventd_up(). It'd be great if it can

Re: Boot failure on emev2/kzm9d (was: Re: [PATCH v2 11/11] mm/slab: lockless decision to grow cache)

2016-06-19 Thread Joonsoo Kim
CCing Paul to ask some question. On Wed, Jun 15, 2016 at 10:39:47AM +0200, Geert Uytterhoeven wrote: > Hi Joonsoo, > > On Wed, Jun 15, 2016 at 4:23 AM, Joonsoo Kim wrote: > > On Tue, Jun 14, 2016 at 12:45:14PM +0200, Geert Uytterhoeven wrote: > >> On Tue, Jun 14, 2016

Re: [PATCH v2 6/7] mm/page_owner: use stackdepot to store stacktrace

2016-06-19 Thread Joonsoo Kim
On Fri, Jun 17, 2016 at 11:55:59AM +0200, Michal Hocko wrote: > On Fri 17-06-16 16:25:26, Joonsoo Kim wrote: > > On Mon, Jun 06, 2016 at 03:56:04PM +0200, Michal Hocko wrote: > [...] > > > I still have troubles to understand your numbers > > > > > > >

Re: [PATCH v3 0/6] Introduce ZONE_CMA

2016-06-20 Thread Joonsoo Kim
On Fri, Jun 17, 2016 at 03:38:49PM +0800, Chen Feng wrote: > Hi Kim & feng, > > Thanks for the share. In our platform also has the same use case. > > We only let the alloc with GFP_HIGHUSER_MOVABLE in memory.c to use cma memory. > > If we add zone_cma, It seems can resolve the cma migrate issue.

Re: [PATCH v3 0/6] Introduce ZONE_CMA

2016-06-20 Thread Joonsoo Kim
On Tue, Jun 21, 2016 at 10:08:24AM +0800, Chen Feng wrote: > > > On 2016/6/20 14:48, Joonsoo Kim wrote: > > On Fri, Jun 17, 2016 at 03:38:49PM +0800, Chen Feng wrote: > >> Hi Kim & feng, > >> > >> Thanks for the share. In our platform also has the

Re: Boot failure on emev2/kzm9d (was: Re: [PATCH v2 11/11] mm/slab: lockless decision to grow cache)

2016-06-20 Thread Joonsoo Kim
On Mon, Jun 20, 2016 at 06:12:54AM -0700, Paul E. McKenney wrote: > On Mon, Jun 20, 2016 at 03:39:43PM +0900, Joonsoo Kim wrote: > > CCing Paul to ask some question. > > > > On Wed, Jun 15, 2016 at 10:39:47AM +0200, Geert Uytterhoeven wrote: > > > Hi Joonsoo, > &

Re: + mm-compaction-split-freepages-without-holding-the-zone-lock-fix.patch added to -mm tree

2016-06-21 Thread Joonsoo Kim
On Tue, Jun 21, 2016 at 04:14:28PM -0700, a...@linux-foundation.org wrote: > > The patch titled > Subject: mm/compaction: split freepages without holding the zone lock fix > has been added to the -mm tree. Its filename is > mm-compaction-split-freepages-without-holding-the-zone-lock-fix

Re: Boot failure on emev2/kzm9d (was: Re: [PATCH v2 11/11] mm/slab: lockless decision to grow cache)

2016-06-21 Thread Joonsoo Kim
On Tue, Jun 21, 2016 at 05:54:06AM -0700, Paul E. McKenney wrote: > On Tue, Jun 21, 2016 at 03:43:02PM +0900, Joonsoo Kim wrote: > > On Mon, Jun 20, 2016 at 06:12:54AM -0700, Paul E. McKenney wrote: > > > On Mon, Jun 20, 2016 at 03:39:43PM +0900, Joonsoo Kim wrote: > > &g

Re: + mm-compaction-split-freepages-without-holding-the-zone-lock-fix.patch added to -mm tree

2016-06-21 Thread Joonsoo Kim
On Tue, Jun 21, 2016 at 05:53:22PM -0700, David Rientjes wrote: > On Wed, 22 Jun 2016, Joonsoo Kim wrote: > > > On Tue, Jun 21, 2016 at 04:14:28PM -0700, a...@linux-foundation.org wrote: > > > > > > The patch titled > > > Subject: mm/compaction: s

Re: [PATCH 0/5] Candidate fixes for premature OOM kills with node-lru v2

2016-07-27 Thread Joonsoo Kim
On Tue, Jul 26, 2016 at 01:50:50PM +0100, Mel Gorman wrote: > On Tue, Jul 26, 2016 at 05:11:30PM +0900, Joonsoo Kim wrote: > > > These patches did not OOM for me on a 2G 32-bit KVM instance while running > > > a stress test for an hour. Preliminary tests on a 64-bit system u

Re: [RFC] can we use vmalloc to alloc thread stack if compaction failed

2016-07-28 Thread Joonsoo Kim
On Thu, Jul 28, 2016 at 08:07:51AM -0700, Andy Lutomirski wrote: > On Thu, Jul 28, 2016 at 3:51 AM, Xishi Qiu wrote: > > On 2016/7/28 17:43, Michal Hocko wrote: > > > >> On Thu 28-07-16 16:45:06, Xishi Qiu wrote: > >>> On 2016/7/28 15:58, Michal Hocko wrote: > >>> > On Thu 28-07-16 15:41:53,

Re: [RFC] can we use vmalloc to alloc thread stack if compaction failed

2016-07-31 Thread Joonsoo Kim
On Fri, Jul 29, 2016 at 12:47:38PM -0700, Andy Lutomirski wrote: > -- Forwarded message -- > From: "Joonsoo Kim" > Date: Jul 28, 2016 7:57 PM > Subject: Re: [RFC] can we use vmalloc to alloc thread stack if compaction > failed > To: "Andy Lutomir

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

2016-08-31 Thread Joonsoo Kim
On Tue, Aug 30, 2016 at 06:10:46PM +0530, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > > > > > > >> static inline void check_highest_zone(enum zone_type k) > >> { > >> - if (k > policy_zone && k != ZONE_MOVABLE) > >> + if (k > policy_zone && k != ZONE_MOVABLE && !is_zone_cma_id

Re: [PATCH v5 0/6] Introduce ZONE_CMA

2016-08-31 Thread Joonsoo Kim
On Tue, Aug 30, 2016 at 04:09:37PM +0530, Aneesh Kumar K.V wrote: > Joonsoo Kim writes: > > > 2016-08-29 18:27 GMT+09:00 Aneesh Kumar K.V > > : > >> js1...@gmail.com writes: > >> > >>> From: Joonsoo Kim > >>> > >>> Hello,

Re: [PATCH v5 0/6] Introduce ZONE_CMA

2016-08-31 Thread Joonsoo Kim
On Thu, Sep 01, 2016 at 11:17:23AM +0530, Aneesh Kumar K.V wrote: > Joonsoo Kim writes: > > > On Tue, Aug 30, 2016 at 04:09:37PM +0530, Aneesh Kumar K.V wrote: > >> Joonsoo Kim writes: > >> > >> > 2016-08-29 18:27 GMT+09:00 Aneesh Kumar K.V

Re: [PATCH v2] mm/slab: Improve performance of gathering slabinfo stats

2016-08-04 Thread Joonsoo Kim
hna > Cc: Mike Kravetz > Cc: Christoph Lameter > Cc: Pekka Enberg > Cc: David Rientjes > Cc: Joonsoo Kim > Cc: Andrew Morton > --- > Note: this has been tested only on x86_64. > > mm/slab.c | 25 - > mm/slab.h | 15 ++- >

Re: what is the purpose of SLAB and SLUB (was: Re: [PATCH v3] mm/slab: Improve performance of gathering slabinfo) stats

2016-08-23 Thread Joonsoo Kim
On Tue, Aug 23, 2016 at 05:38:08PM +0200, Michal Hocko wrote: > On Tue 23-08-16 11:13:03, Joonsoo Kim wrote: > > On Thu, Aug 18, 2016 at 01:52:19PM +0200, Michal Hocko wrote: > [...] > > > I am not opposing the patch (to be honest it is quite neat) but this > > >

Re: OOM detection regressions since 4.7

2016-08-24 Thread Joonsoo Kim
Looks like my mail client eat my reply so I resend. On Tue, Aug 23, 2016 at 09:33:18AM +0200, Michal Hocko wrote: > On Tue 23-08-16 13:52:45, Joonsoo Kim wrote: > [...] > > Hello, Michal. > > > > I agree with partial revert but revert should be a different form. >

Re: OOM detection regressions since 4.7

2016-08-24 Thread Joonsoo Kim
2016-08-24 16:04 GMT+09:00 Michal Hocko : > On Wed 24-08-16 14:01:57, Joonsoo Kim wrote: >> Looks like my mail client eat my reply so I resend. >> >> On Tue, Aug 23, 2016 at 09:33:18AM +0200, Michal Hocko wrote: >> > On Tue 23-08-16 13:52:45, Joonsoo Kim wrote: &

Re: [lkp-robot] [x86/kconfig] 81d3871900: BUG:unable_to_handle_kernel

2017-10-17 Thread Joonsoo Kim
On Wed, Oct 11, 2017 at 12:01:20PM -0500, Josh Poimboeuf wrote: > I failed to add the slab maintainers to CC on the last attempt. Trying > again. > > On Tue, Oct 10, 2017 at 09:31:06PM -0500, Josh Poimboeuf wrote: > > On Tue, Oct 10, 2017 at 08:15:13PM +0800, kernel test robot wrote: > > > > > >

Re: [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages

2017-10-25 Thread Joonsoo Kim
On Tue, Oct 24, 2017 at 10:12:58AM +0200, Vlastimil Babka wrote: > On 10/24/2017 06:44 AM, Joonsoo Kim wrote: > >>> I'm not sure what is the confusing semantic you mentioned. I think > >>> that set_migratetype_isolate() has confusing semantic and should be > &

Re: n900 in next-20170901

2017-10-25 Thread Joonsoo Kim
On Wed, Oct 25, 2017 at 10:31:38AM -0700, Tony Lindgren wrote: > * Joonsoo Kim [171022 21:51]: > > On Fri, Oct 20, 2017 at 10:31:47AM -0700, Tony Lindgren wrote: > > > * Joonsoo Kim [171019 18:53]: > > > > Oops... I made a mistak. Could

Re: n900 in next-20170901

2017-11-13 Thread Joonsoo Kim
On Fri, Nov 10, 2017 at 07:36:20AM -0800, Tony Lindgren wrote: > * Joonsoo Kim [171110 06:34]: > > On Thu, Nov 09, 2017 at 07:26:10PM -0800, Tony Lindgren wrote: > > > +#define OMAP34XX_SRAM_PHYS 0x4020 > > > +#define OMAP34XX_SRAM_VIRT 0xd001 > &

Re: n900 in next-20170901

2017-11-13 Thread Joonsoo Kim
On Mon, Nov 13, 2017 at 01:15:30PM -0800, Tony Lindgren wrote: > * Tony Lindgren [171110 07:36]: > > * Joonsoo Kim [171110 06:34]: > > > On Thu, Nov 09, 2017 at 07:26:10PM -0800, Tony Lindgren wrote: > > > > +#define OMAP34XX_SRAM_PHYS 0x4020 >

Re: n900 in next-20170901

2017-11-14 Thread Joonsoo Kim
On Tue, Nov 14, 2017 at 09:37:19AM -0800, Tony Lindgren wrote: > * Joonsoo Kim [171114 06:34]: > > On Fri, Nov 10, 2017 at 07:36:20AM -0800, Tony Lindgren wrote: > > > * Joonsoo Kim [171110 06:34]: > > > > On Thu, Nov 09, 2017 at 07:26:10PM -0800, Tony Lind

Re: n900 in next-20170901

2017-11-14 Thread Joonsoo Kim
On Tue, Nov 14, 2017 at 06:04:00PM -0800, Tony Lindgren wrote: > * Joonsoo Kim [171115 00:48]: > > On Tue, Nov 14, 2017 at 09:37:19AM -0800, Tony Lindgren wrote: > > > * Joonsoo Kim [171114 06:34]: > > > > On Fri, Nov 10, 2017 at 07:36:20AM -0800, Tony Lindgren

Re: [lkp-robot] [x86/kconfig] 81d3871900: BUG:unable_to_handle_kernel

2017-10-18 Thread Joonsoo Kim
On Tue, Oct 17, 2017 at 09:50:04AM +0200, Thomas Gleixner wrote: > On Tue, 17 Oct 2017, Joonsoo Kim wrote: > > On Wed, Oct 11, 2017 at 12:01:20PM -0500, Josh Poimboeuf wrote: > > > > Looking at the panic, the code in slob_free() was: > > > > > > &g

Re: n900 in next-20170901

2017-10-18 Thread Joonsoo Kim
On Mon, Sep 25, 2017 at 07:54:37AM -0700, Tony Lindgren wrote: > * Joonsoo Kim [170925 01:06]: > > On Thu, Sep 21, 2017 at 10:28:11AM -0700, Tony Lindgren wrote: > > > * Joonsoo Kim [170914 23:55]: > > > > On Wed, Sep 13, 2017 at 09:31:27AM -0700, Tony Lindgren w

Re: [lkp-robot] [x86/kconfig] 81d3871900: BUG:unable_to_handle_kernel

2017-10-18 Thread Joonsoo Kim
On Wed, Oct 18, 2017 at 03:15:03PM +0200, Thomas Gleixner wrote: > On Wed, 18 Oct 2017, Linus Torvalds wrote: > > On Tue, Oct 17, 2017 at 3:33 AM, Joonsoo Kim wrote: > > > > > > It looks like a compiler bug. The code of slob_units() try to read two > > > bytes

Re: [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages

2017-10-18 Thread Joonsoo Kim
On Fri, Oct 13, 2017 at 02:00:12PM +0200, Michal Hocko wrote: > From: Michal Hocko > > Michael has noticed that the memory offline tries to migrate kernel code > pages when doing > echo 0 > /sys/devices/system/memory/memory0/online > > The current implementation will fail the operation after se

Re: [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages

2017-10-19 Thread Joonsoo Kim
On Thu, Oct 19, 2017 at 09:15:03AM +0200, Michal Hocko wrote: > On Thu 19-10-17 11:51:11, Joonsoo Kim wrote: > > On Fri, Oct 13, 2017 at 02:00:12PM +0200, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Michael has noticed that the memory offline trie

Re: n900 in next-20170901

2017-10-19 Thread Joonsoo Kim
On Thu, Oct 19, 2017 at 11:30:34AM -0700, Tony Lindgren wrote: > * Joonsoo Kim [171018 01:27]: > > On Mon, Sep 25, 2017 at 07:54:37AM -0700, Tony Lindgren wrote: > > > * Joonsoo Kim [170925 01:06]: > > > > On Thu, Sep 21, 2017 at 10:28:11AM -0700, Tony Lindgren

Re: [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages

2017-10-19 Thread Joonsoo Kim
On Thu, Oct 19, 2017 at 02:21:18PM +0200, Michal Hocko wrote: > On Thu 19-10-17 10:20:41, Michal Hocko wrote: > > On Thu 19-10-17 16:33:56, Joonsoo Kim wrote: > > > On Thu, Oct 19, 2017 at 09:15:03AM +0200, Michal Hocko wrote: > > > > On Thu 19-10-

[PATCH v4 0/8] zram: introduce contextless compression API and use it on zram

2015-10-14 Thread Joonsoo Kim
aration, we can save memory in some cases and get the best performance. This patchset solves Sergey's concern perfectly and provides possibility to use various compression algorithm in zram. Thanks. Joonsoo Kim (6): crypto/compress: introduce contextless compression and remove unused

[PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
doesn't support zlib yet. Following patch will change this interface and enable various compression algorithm. Signed-off-by: Joonsoo Kim --- drivers/block/zram/Kconfig| 8 +++--- drivers/block/zram/Makefile | 4 +-- drivers/block/zram/zcomp.c| 63 ---

[PATCH v4 5/8] zram: make stream find and release functions static

2015-10-14 Thread Joonsoo Kim
: Sergey Senozhatsky Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c| 27 +-- drivers/block/zram/zcomp.h| 8 ++-- drivers/block/zram/zram_drv.c | 6 +++--- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/drivers/block/zram/zcomp.c b

[PATCH v4 1/8] crypto/compress: introduce contextless compression and remove unused pcomp

2015-10-14 Thread Joonsoo Kim
zram in following patches. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 17 +- crypto/Makefile| 3 +- crypto/ccompress.c | 95 + crypto/pcompress.c | 115 --- crypto/zlib.c

[PATCH v4 6/8] zram: pass zstrm down to decompression path

2015-10-14 Thread Joonsoo Kim
compression backend require zstrm for decompression or NULL if it does not. Acked-by: Minchan Kim Signed-off-by: Sergey Senozhatsky Signed-off-by: Joonsoo Kim --- drivers/block/zram/zcomp.c| 3 ++- drivers/block/zram/zcomp.h| 3 ++- drivers/block/zram/zram_drv.c | 20

[PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
this patch is applied, there is no way to know current compression algorithm so it's really bad thing. Please let me know proper solution if someone have better idea. Signed-off-by: Joonsoo Kim --- Documentation/blockdev/zram.txt | 29 +++-- drivers/block/zram/Kc

[PATCH v4 4/8] crypto/deflate: support contextless compression API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/deflate.c | 96 ++-- 1 file changed, 86 insertions(+), 10

[PATCH v4 3/8] crypto/lz4: support contextless compressiona API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/lz4.c | 77 1 file changed, 67 insertions(+), 10

[PATCH v4 2/8] crypto/lzo: support contextless compression API

2015-10-14 Thread Joonsoo Kim
Now, contextless compression API is introduced and it can reduce memory overhead in some cases. All compression algorithm will support it. Signed-off-by: Joonsoo Kim --- crypto/Kconfig | 1 + crypto/lzo.c | 81 -- 2 files changed, 69

Re: [PATCH 0/2] prepare zram for crypto api-powered zcomp

2015-09-06 Thread Joonsoo Kim
On Tue, Sep 01, 2015 at 11:12:39AM +0900, Sergey Senozhatsky wrote: > On (09/01/15 11:06), Minchan Kim wrote: > > Thanks. > > > > I want to include this patchset in Joonsoo's crypto support patch > > if you don't mind. Hello, Sorry for long delay. I will work crypto support with this patchset. S

Re: [PATCH v2 1/9] mm/compaction: skip useless pfn when updating cached pfn

2015-09-06 Thread Joonsoo Kim
On Mon, Aug 24, 2015 at 11:07:12AM +0200, Vlastimil Babka wrote: > On 08/24/2015 04:19 AM, Joonsoo Kim wrote: > >Cached pfn is used to determine the start position of scanner > >at next compaction run. Current cached pfn points the skipped pageblock > >so we uselessly checks

Re: [PATCH 3/3] mm, compaction: disginguish contended status in tracepoint

2015-09-06 Thread Joonsoo Kim
On Thu, Aug 27, 2015 at 05:24:04PM +0200, Vlastimil Babka wrote: > Compaction returns prematurely with COMPACT_PARTIAL when contended or has > fatal > signal pending. This is ok for the callers, but might be misleading in the > traces, as the usual reason to return COMPACT_PARTIAL is that we think

Re: [PATCH 07/12] mm, page_alloc: Distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd

2015-09-07 Thread Joonsoo Kim
2015-08-24 21:09 GMT+09:00 Mel Gorman : > __GFP_WAIT has been used to identify atomic context in callers that hold > spinlocks or are in interrupts. They are expected to be high priority and > have access one of two watermarks lower than "min" which can be referred > to as the "atomic reserve". __G

Re: [PATCH 11/12] mm, page_alloc: Reserve pageblocks for high-order atomic allocations on demand

2015-09-08 Thread Joonsoo Kim
2015-08-24 21:29 GMT+09:00 Mel Gorman : > High-order watermark checking exists for two reasons -- kswapd high-order > awareness and protection for high-order atomic requests. Historically the > kernel depended on MIGRATE_RESERVE to preserve min_free_kbytes as high-order > free pages for as long as

Re: [PATCH 12/12] mm, page_alloc: Only enforce watermarks for order-0 allocations

2015-09-08 Thread Joonsoo Kim
2015-08-24 21:30 GMT+09:00 Mel Gorman : > The primary purpose of watermarks is to ensure that reclaim can always > make forward progress in PF_MEMALLOC context (kswapd and direct reclaim). > These assume that order-0 allocations are all that is necessary for > forward progress. > > High-order water

Re: [PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 09:29:03AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > static const char * const backends[] = { > > "lzo", > > -#ifdef CONFIG_ZRAM_LZ4_COMPRESS > > "lz4",

Re: [PATCH v4 7/8] zram: use crypto contextless compression API to (de)compress

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 09:38:41AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > Creates virtual block devices called /dev/zramX (X = 0, 1, ...). > > @@ -18,9 +17,8 @@ config ZRAM > > config ZRAM_LZ4_COM

Re: [PATCH v2 7/9] mm/compaction: redesign compaction

2015-10-14 Thread Joonsoo Kim
On Wed, Oct 14, 2015 at 01:38:07PM +0200, Vlastimil Babka wrote: > On 08/24/2015 04:19 AM, Joonsoo Kim wrote: > > [...] > > > This patch solves these problems mentioned in above. > > Freepage scanner is largely changed to scan zone from zone_start_pfn > > to zon

Re: [PATCH v4 8/8] zram: enable contextless compression alg in zram

2015-10-14 Thread Joonsoo Kim
On Thu, Oct 15, 2015 at 11:05:49AM +0900, Sergey Senozhatsky wrote: > On (10/14/15 16:38), Joonsoo Kim wrote: > [..] > > @@ -352,6 +352,7 @@ static ssize_t comp_algorithm_show(struct device *dev, > > size_t sz; > > struct zram *zram = dev_to_zram(dev); > >

Re: [PATCH v2 9/9] mm/compaction: new threshold for compaction depleted zone

2015-10-14 Thread Joonsoo Kim
On Wed, Oct 14, 2015 at 02:28:31PM +0200, Vlastimil Babka wrote: > On 08/24/2015 04:19 AM, Joonsoo Kim wrote: > > Now, compaction algorithm become powerful. Migration scanner traverses > > whole zone range. So, old threshold for depleted zone which is designed > > to imitate

Re: [PATCH v2 9/9] mm/compaction: new threshold for compaction depleted zone

2015-10-14 Thread Joonsoo Kim
On Wed, Oct 14, 2015 at 02:28:31PM +0200, Vlastimil Babka wrote: > On 08/24/2015 04:19 AM, Joonsoo Kim wrote: > > Now, compaction algorithm become powerful. Migration scanner traverses > > whole zone range. So, old threshold for depleted zone which is designed > > to imitate

Re: [PATCH v7 0/7] Introduce ZONE_CMA

2017-05-11 Thread Joonsoo Kim
On Thu, May 11, 2017 at 11:13:04AM +0200, Michal Hocko wrote: > On Thu 11-05-17 11:12:43, Joonsoo Kim wrote: > > Sorry for the late response. I was on a vacation. > > > > On Tue, May 02, 2017 at 03:32:29PM +0200, Michal Hocko wrote: > > > On Tue 02-05-17 13:01:32,

Re: [PATCH v7 0/7] Introduce ZONE_CMA

2017-05-14 Thread Joonsoo Kim
On Fri, May 12, 2017 at 08:38:15AM +0200, Michal Hocko wrote: > On Fri 12-05-17 11:00:48, Joonsoo Kim wrote: > > On Thu, May 11, 2017 at 11:13:04AM +0200, Michal Hocko wrote: > > > On Thu 11-05-17 11:12:43, Joonsoo Kim wrote: > > > > Sorry for the late

Re: [lkp-robot] [mm/cma] 2b0f904a5a: fio.read_bw_MBps -16.1% regression

2018-01-08 Thread Joonsoo Kim
On Sat, Jan 06, 2018 at 05:26:31PM +0800, Ye Xiaolong wrote: > Hi, > > On 01/03, Joonsoo Kim wrote: > >Hello! > > > >On Tue, Jan 02, 2018 at 02:35:28PM +0800, kernel test robot wrote: > >> > >> Greeting, > >> > >> FYI, w

Re: [PATCH] Revert "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE"

2018-05-17 Thread Joonsoo Kim
iguration doesn't hit this bug > because highmem pages are freed via the memblock interface only instead > of iterating through each zone. It looks like the x86 highmem code > assumes only a single highmem zone and/or it's disjoint? Good point! Reason of the crash is that the span of MOV

Re: [regression] Boot crash with: f7426b983a6a ("mm: cma: adjust address limit to avoid hitting low/high memory boundary")

2014-12-08 Thread Joonsoo Kim
On Mon, Dec 08, 2014 at 11:56:40AM +0100, Ingo Molnar wrote: > > * Joonsoo Kim wrote: > > > On Thu, Nov 27, 2014 at 02:05:56PM +0100, Ingo Molnar wrote: > > > > > > Any replies to this regression after 10 days, or should I send a > > > revert p

Re: [RFC PATCH 2/3] mm: more aggressive page stealing for UNMOVABLE allocations

2014-12-09 Thread Joonsoo Kim
On Mon, Dec 08, 2014 at 11:27:27AM +0100, Vlastimil Babka wrote: > On 12/08/2014 08:11 AM, Joonsoo Kim wrote: > >On Thu, Dec 04, 2014 at 06:12:57PM +0100, Vlastimil Babka wrote: > >>When allocation falls back to stealing free pages of another migratetype, > >>it can deci

Re: [RFC PATCH 2/3] mm: more aggressive page stealing for UNMOVABLE allocations

2014-12-09 Thread Joonsoo Kim
On Tue, Dec 09, 2014 at 10:12:15AM +0100, Vlastimil Babka wrote: > On 12/09/2014 09:28 AM, Joonsoo Kim wrote: > >On Mon, Dec 08, 2014 at 11:27:27AM +0100, Vlastimil Babka wrote: > >>On 12/08/2014 08:11 AM, Joonsoo Kim wrote: > >>> > >>>I'm not sur

Re: [PATCH 0/4] enhance compaction success rate

2014-12-09 Thread Joonsoo Kim
On Mon, Dec 08, 2014 at 10:16:34AM +0100, Vlastimil Babka wrote: > On 12/08/2014 08:16 AM, Joonsoo Kim wrote: > >This patchset aims at increase of compaction success rate. Changes are > >related to compaction finish condition and freepage isolation condition. > > > >

Re: [PATCH 2/4] mm/page_alloc: expands broken freepage to proper buddy list when steal

2014-12-09 Thread Joonsoo Kim
On Mon, Dec 08, 2014 at 10:29:44AM +0100, Vlastimil Babka wrote: > On 12/08/2014 08:16 AM, Joonsoo Kim wrote: > >There is odd behaviour when we steal freepages from other migratetype > >buddy list. In try_to_steal_freepages(), we move all freepages in > >the pageblock tha

Re: [PATCH 3/4] mm/compaction: enhance compaction finish condition

2014-12-09 Thread Joonsoo Kim
On Mon, Dec 08, 2014 at 10:34:05AM +0100, Vlastimil Babka wrote: > On 12/08/2014 08:16 AM, Joonsoo Kim wrote: > >Compaction has anti fragmentation algorithm. It is that freepage > >should be more than pageblock order to finish the compaction if we don't > >find

Re: [PATCH 4/4] mm/compaction: stop the isolation when we isolate enough freepage

2014-12-09 Thread Joonsoo Kim
On Mon, Dec 08, 2014 at 10:59:17AM +0100, Vlastimil Babka wrote: > On 12/08/2014 08:16 AM, Joonsoo Kim wrote: > >From: Joonsoo Kim > > > >Currently, freepage isolation in one pageblock doesn't consider how many > >freepages we isolate. When I traced flow of com

Re: [regression] Boot crash with: f7426b983a6a ("mm: cma: adjust address limit to avoid hitting low/high memory boundary")

2014-12-09 Thread Joonsoo Kim
On Tue, Dec 09, 2014 at 08:50:32AM +, Russell King wrote: > On Tue, Dec 09, 2014 at 04:55:42PM +0900, Joonsoo Kim wrote: > > Could you manage this fix for above boot regression in x86? > > Patch itself is so dirty, because __pa_nodebug() is implemented only > > in x86. If

Re: [PATCH 4/4] mm/compaction: stop the isolation when we isolate enough freepage

2014-12-10 Thread Joonsoo Kim
On Wed, Dec 10, 2014 at 04:19:13PM +0100, Vlastimil Babka wrote: > On 12/10/2014 08:00 AM, Joonsoo Kim wrote: > >On Mon, Dec 08, 2014 at 10:59:17AM +0100, Vlastimil Babka wrote: > >>On 12/08/2014 08:16 AM, Joonsoo Kim wrote: > >>>From: Joonsoo Kim > >>>

[PATCH 1/2] mm/slub: optimize alloc/free fastpath by removing preemption on/off

2015-01-04 Thread Joonsoo Kim
ter than before. Note that this change slightly worses performance in !CONFIG_PREEMPT, roughly 0.3%. Implementing each case separately would help performance, but, since it's so marginal, I didn't do that. This would help maintanance since we have same code for all cases. Tested-by

[PATCH 2/2] mm: don't use compound_head() in virt_to_head_page()

2015-01-04 Thread Joonsoo Kim
then, virt_to_head_page() uses this optimized function to improve performance. I saw 1.8% win in a fast-path loop over kmem_cache_alloc/free, (14.063 ns -> 13.810 ns) if target object is on tail page. Signed-off-by: Joonsoo Kim --- include/linux/mm.h | 10 +- 1 file changed, 9 insertions(+), 1

[PATCH 6/6] mm/slab: allocation fastpath without disabling irq

2015-01-04 Thread Joonsoo Kim
that alloc/free fastpath performance is improved roughly 22%. (27 ns -> 21 ns). Signed-off-by: Joonsoo Kim --- mm/slab.c | 151 +++-- 1 file changed, 118 insertions(+), 33 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 449fc6b.

[PATCH 4/6] mm/slab: rearrange irq management

2015-01-04 Thread Joonsoo Kim
Currently, irq is disabled at the very beginning phase of allocation functions. In the following patch, some of allocation functions will be changed to work without irq disabling so rearrange irq management code as preparation step. Signed-off-by: Joonsoo Kim --- mm/slab.c | 22

[PATCH 2/6] mm/slab: remove kmemleak_erase() call

2015-01-04 Thread Joonsoo Kim
We already call kmemleak_no_scan() in initialization step of array cache, so kmemleak doesn't scan array cache. Therefore, we don't need to call kmemleak_erase() here. And, this call is the last caller of kmemleak_erase(), so remove kmemleak_erase() definition completely. Signed-off-b

[PATCH 5/6] mm/slab: cleanup ____cache_alloc()

2015-01-04 Thread Joonsoo Kim
This cleanup makes code more readable and help future changes. In the following patch, many code will be added to this function. Signed-off-by: Joonsoo Kim --- mm/slab.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/mm/slab.c b/mm/slab.c

<    2   3   4   5   6   7   8   9   10   11   >