[PATCH 1/6] mm/slab: fix gfp flags of percpu allocation at boot phase

2015-01-04 Thread Joonsoo Kim
il to boot. percpu allocator regards GFP_KERNEL as the sign of the system fully initialized so aggressively try to make spare room. With GFP_NOWAIT, it doesn't do that so succeed to boot. Signed-off-by: Joonsoo Kim --- mm/slab.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) di

[PATCH 3/6] mm/slab: clean-up __ac_get_obj() to prepare future changes

2015-01-04 Thread Joonsoo Kim
, that is, if we have pfmemalloc object and we are not legimate user for this memory, exchanging it to non-pfmemalloc object, is unchanged. Signed-off-by: Joonsoo Kim --- mm/slab.c | 91 +++-- 1 file changed, 52 insertions(+), 39 deletions

[PATCH 0/6] mm/slab: optimize allocation fastpath

2015-01-04 Thread Joonsoo Kim
me know. Thanks. Joonsoo Kim (6): mm/slab: fix gfp flags of percpu allocation at boot phase mm/slab: remove kmemleak_erase() call mm/slab: clean-up __ac_get_obj() to prepare future changes mm/slab: rearrange irq management mm/slab: cleanup cache_alloc() mm/slab: allocation fastpath

Re: [PATCH] CMA: Fix CMA's page number is substructed twice in __zone_watermark_ok

2015-01-04 Thread Joonsoo Kim
Hello, On Tue, Dec 30, 2014 at 06:17:25PM +0800, Hui Zhu wrote: > The original of this patch [1] is used to fix the issue in Joonsoo's CMA patch > "CMA: always treat free cma pages as non-free on watermark checking" [2]. > > Joonsoo reminded me that this issue affect current kernel too. So made

Re: [PATCH 1/3] mm/compaction: enhance trace output to know more about compaction internals

2015-01-04 Thread Joonsoo Kim
On Wed, Dec 03, 2014 at 04:52:05PM +0900, Joonsoo Kim wrote: > It'd be useful to know where the both scanner is start. And, it also be > useful to know current range where compaction work. It will help to find > odd behaviour or problem on compaction. > > Signed-off-by:

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

2015-01-05 Thread Joonsoo Kim
On Mon, Jan 05, 2015 at 09:28:14AM -0600, Christoph Lameter wrote: > On Mon, 5 Jan 2015, Joonsoo Kim wrote: > > > index 449fc6b..54656f0 100644 > > --- a/mm/slab.c > > +++ b/mm/slab.c > > @@ -168,6 +168,41 @@ typedef unsigned short freelist_idx_t; > > > &g

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

2015-01-05 Thread Joonsoo Kim
Hello, On Mon, Jan 05, 2015 at 06:21:39PM +0100, Andreas Mohr wrote: > Hi, > > Joonsoo Kim wrote: > > + * Calculate the next globally unique transaction for disambiguiation > > "disambiguation" Okay. > > > + ac->tid = next_tid(ac->

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

2015-01-05 Thread Joonsoo Kim
ree -> 65 cycles > > 1 times kmalloc(64)/kfree -> 66 cycles > > 1 times kmalloc(128)/kfree -> 66 cycles > > 1 times kmalloc(256)/kfree -> 71 cycles > > 1 times kmalloc(512)/kfree -> 72 cycles > > 1 times kmalloc(1024)/kfree -> 71

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

2015-01-06 Thread Joonsoo Kim
On Mon, Jan 05, 2015 at 07:03:12PM -0800, Davidlohr Bueso wrote: > On Mon, 2015-01-05 at 10:36 +0900, Joonsoo Kim wrote: > > - preempt_disable(); > > - c = this_cpu_ptr(s->cpu_slab); > > + do { > > + tid = this_cpu_read(s->cpu_slab->tid)

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

2015-01-06 Thread Joonsoo Kim
On Mon, Jan 05, 2015 at 08:01:45PM -0800, Gregory Fong wrote: > +linux-mm and linux-kernel (not sure how those got removed from cc, > sorry about that) > > On Mon, Jan 5, 2015 at 7:58 PM, Gregory Fong wrote: > > Hi Joonsoo, > > > > On Wed, May 28, 2014 at 12:

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

2015-01-06 Thread Joonsoo Kim
On Mon, Jan 05, 2015 at 09:25:02PM -0500, Steven Rostedt wrote: > On Tue, 6 Jan 2015 10:32:47 +0900 > Joonsoo Kim wrote: > > > > > > +++ b/mm/slub.c > > > > @@ -2398,13 +2398,15 @@ redo: > > > > * reading from one cpu area. That does no

Re: [RFC PATCH 1/3] mm: when stealing freepages, also take pages created by splitting buddy page

2014-12-07 Thread Joonsoo Kim
On Thu, Dec 04, 2014 at 06:12:56PM +0100, Vlastimil Babka wrote: > When __rmqueue_fallback() is called to allocate a page of order X, it will > find a page of order Y >= X of a fallback migratetype, which is different from > the desired migratetype. With the help of try_to_steal_freepages(), it may

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

2014-12-07 Thread Joonsoo Kim
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 decide to steal extra pages, or even the whole pageblock in order to > reduce fragmentation, which could happen if further allocation fallbacks > pic

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

2014-12-07 Thread Joonsoo Kim
s rate on phase 1 and compaction success rate. Allocation success rate on phase 1 (%) 57.00 : 63.67 Compaction success rate (Compaction success * 100 / Compaction stalls, %) 28.94 : 35.13 Signed-off-by: Joonsoo Kim --- include/linux/mmzone.h |3 +++ mm/compaction.

[PATCH 1/4] mm/compaction: fix wrong order check in compact_finished()

2014-12-07 Thread Joonsoo Kim
ess rate, but, it shows more compaction success rate and reduced elapsed time. Compaction success rate (Compaction success * 100 / Compaction stalls, %) 18.47 : 28.94 Elapsed time (sec) 1429 : 1411 Cc: Signed-off-by: Joonsoo Kim --- mm/compaction.c |2 +- 1 file changed, 1 insertion(+), 1

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

2014-12-07 Thread Joonsoo Kim
teria. Signed-off-by: Joonsoo Kim --- include/trace/events/kmem.h |7 +++-- mm/page_alloc.c | 72 +-- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index aece134..4a

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

2014-12-07 Thread Joonsoo Kim
From: Joonsoo Kim Currently, freepage isolation in one pageblock doesn't consider how many freepages we isolate. When I traced flow of compaction, compaction sometimes isolates more than 256 freepages to migrate just 32 pages. In this patch, freepage isolation is stopped at the point th

[PATCH 0/4] enhance compaction success rate

2014-12-07 Thread Joonsoo Kim
asePatch-1 Patch-3 Patch-4 55.00 57.00 62.67 64.00 And, compaction success rate (%) on same test are, BasePatch-1 Patch-3 Patch-4 18.47 28.94 35.13 41.50 This patchset is based on my tracepoint update on compaction. https://lkml.org/lkml/2014/12/3/71 Joonsoo Kim (4):

Re: [RFC PATCH 3/3] mm: always steal split buddies in fallback allocations

2014-12-07 Thread Joonsoo Kim
On Thu, Dec 04, 2014 at 06:12:58PM +0100, Vlastimil Babka wrote: > When allocation falls back to another migratetype, it will steal a page with > highest available order, and (depending on this order and desired > migratetype), > it might also steal the rest of free pages from the same pageblock.

Re: [PATCH 3/3] cma: add functions to get region pages counters

2014-12-29 Thread Joonsoo Kim
On Fri, Dec 26, 2014 at 05:39:04PM +0300, Stefan I. Strogin wrote: > From: Dmitry Safonov > > Here are two functions that provide interface to compute/get used size > and size of biggest free chunk in cma region. > Added that information in cmainfo. > > Signed-off-by: Dmitry Safonov > --- > in

Re: [PATCH 2/3] mm: cma: introduce /proc/cmainfo

2014-12-29 Thread Joonsoo Kim
On Fri, Dec 26, 2014 at 05:39:03PM +0300, Stefan I. Strogin wrote: > /proc/cmainfo contains a list of currently allocated CMA buffers for every > CMA area when CONFIG_CMA_DEBUG is enabled. Hello, I think that providing these information looks useful, but, we need better implementation. As Laura s

Re: [PATCH 1/3] CMA: Fix the bug that CMA's page number is substructed twice

2014-12-29 Thread Joonsoo Kim
On Thu, Dec 25, 2014 at 05:43:26PM +0800, Hui Zhu wrote: > In Joonsoo's CMA patch "CMA: always treat free cma pages as non-free on > watermark checking" [1], it changes __zone_watermark_ok to substruct CMA > pages number from free_pages if system use CMA: > if (IS_ENABLED(CONFIG_CMA) && z->ma

Re: [PATCH 3/3] CMA: Add cma_alloc_counter to make cma_alloc work better if it meet busy range

2014-12-29 Thread Joonsoo Kim
On Thu, Dec 25, 2014 at 05:43:28PM +0800, Hui Zhu wrote: > In [1], Joonsoo said that cma_alloc_counter is useless because pageblock > is isolated. > But if alloc_contig_range meet a busy range, it will undo_isolate_page_range > before goto try next range. At this time, __rmqueue_cma can begin alloc

Re: [PATCH] CMA: treat free cma pages as non-free if not ALLOC_CMA on watermark checking

2015-01-22 Thread Joonsoo Kim
On Thu, Jan 22, 2015 at 10:12:43AM -0600, Christoph Lameter wrote: > On Thu, 22 Jan 2015, Joonsoo Kim wrote: > > > > Just out of curiosity, "new zone"? Something like movable zone? > > > > Yes, I named it as ZONE_CMA. Maybe I can send prototype of &

Re: [PATCH 0/3] mm: cma: /proc/cmainfo

2015-01-22 Thread Joonsoo Kim
On Wed, Jan 21, 2015 at 04:52:36PM +0300, Stefan Strogin wrote: > Sorry for such a long delay. Now I'll try to answer all the questions > and make a second version. > > The original reason of why we need a new debugging tool for CMA is > written by Minchan (http://www.spinics.net/lists/linux-mm/ms

Re: [PATCH 2/3] mm: cma: introduce /proc/cmainfo

2015-01-22 Thread Joonsoo Kim
On Thu, Jan 22, 2015 at 06:35:53PM +0300, Stefan Strogin wrote: > Hello Joonsoo, > > On 30/12/14 07:38, Joonsoo Kim wrote: > > On Fri, Dec 26, 2014 at 05:39:03PM +0300, Stefan I. Strogin wrote: > >> /proc/cmainfo contains a list of currently allocated CMA buffers for

Re: [PATCH 2/3] mm: cma: allocation trigger

2015-01-22 Thread Joonsoo Kim
On Thu, Jan 22, 2015 at 09:48:25PM -0500, Sasha Levin wrote: > On 01/22/2015 03:26 AM, Joonsoo Kim wrote: > > On Tue, Jan 20, 2015 at 12:38:32PM -0500, Sasha Levin wrote: > >> Provides a userspace interface to trigger a CMA allocation. > >> > >> Usag

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

2015-01-14 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. Change from v

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

2015-01-14 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. Acked-by: Christoph Lameter Signed-off-by: Joonsoo Kim --- include/linux/mm.h | 10 +- 1 file ch

[PATCH v3 4/5] mm/compaction: more trace to understand when/why compaction start/finish

2015-01-14 Thread Joonsoo Kim
, classzone_idx from tracepoint output Signed-off-by: Joonsoo Kim --- include/linux/compaction.h|3 ++ include/trace/events/compaction.h | 74 + mm/compaction.c | 38 +-- 3 files changed, 111 insertions(+), 4

[PATCH v3 2/5] mm/compaction: enhance tracepoint output for compaction begin/end

2015-01-14 Thread Joonsoo Kim
ka Signed-off-by: Joonsoo Kim --- include/linux/compaction.h|2 ++ include/trace/events/compaction.h | 49 ++--- mm/compaction.c | 14 +-- 3 files changed, 49 insertions(+), 16 deletions(-) diff --git a/include/linux/comp

[PATCH v3 1/5] mm/compaction: change tracepoint format from decimal to hexadecimal

2015-01-14 Thread Joonsoo Kim
would improve readability. For example, it makes us easily notice whether current scanner try to compact previously attempted pageblock or not. Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- include/trace/events/compaction.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 5/5] mm/compaction: add tracepoint to observe behaviour of compaction defer

2015-01-14 Thread Joonsoo Kim
ction deferring logic. This patch add new tracepoint to understand work of deferring logic. This will also help to check compaction success and fail. Changes from v2: Remove reason part from tracepoint output Signed-off-by: Joonsoo Kim --- include/linux/compaction.h|

[PATCH v3 3/5] mm/compaction: print current range where compaction work

2015-01-14 Thread Joonsoo Kim
imil Babka Signed-off-by: Joonsoo Kim --- include/trace/events/compaction.h | 30 +++--- mm/compaction.c |9 ++--- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/include/trace/events/compaction.h b/include/trace/events/compacti

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

2015-01-07 Thread Joonsoo Kim
On Tue, Jan 06, 2015 at 09:02:17AM -0800, Davidlohr Bueso wrote: > On Tue, 2015-01-06 at 17:09 +0900, Joonsoo Kim wrote: > > On Mon, Jan 05, 2015 at 07:03:12PM -0800, Davidlohr Bueso wrote: > > > On Mon, 2015-01-05 at 10:36 +0900, Joonsoo Kim wrote: > > >

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

2015-01-07 Thread Joonsoo Kim
On Tue, Jan 06, 2015 at 11:34:39AM +0100, Andreas Mohr wrote: > On Tue, Jan 06, 2015 at 10:31:22AM +0900, Joonsoo Kim wrote: > > Hello, > > > > On Mon, Jan 05, 2015 at 06:21:39PM +0100, Andreas Mohr wrote: > > > Hi, > > > > > > Joonsoo Kim w

Re: [PATCH 1/3] mm/compaction: enhance trace output to know more about compaction internals

2015-01-08 Thread Joonsoo Kim
On Tue, Jan 06, 2015 at 10:05:39AM +0100, Vlastimil Babka wrote: > On 12/03/2014 08:52 AM, Joonsoo Kim wrote: > > It'd be useful to know where the both scanner is start. And, it also be > > useful to know current range where compaction work. It will help to find > > o

Re: [PATCH 2/3] mm/compaction: add more trace to understand compaction start/finish condition

2015-01-08 Thread Joonsoo Kim
On Tue, Jan 06, 2015 at 12:04:28PM +0100, Vlastimil Babka wrote: > On 12/03/2014 08:52 AM, Joonsoo Kim wrote: > > It is not well analyzed that when compaction start and when compaction > > finish. With this tracepoint for compaction start/finish condition, I can > &g

Re: [PATCH 3/3] mm/compaction: add tracepoint to observe behaviour of compaction defer

2015-01-08 Thread Joonsoo Kim
On Tue, Jan 06, 2015 at 12:27:43PM +0100, Vlastimil Babka wrote: > On 12/03/2014 08:52 AM, Joonsoo Kim wrote: > > compaction deferring logic is heavy hammer that block the way to > > the compaction. It doesn't consider overall system state, so it > > could prevent

Re: [PATCH 1/3] mm/compaction: enhance trace output to know more about compaction internals

2015-01-08 Thread Joonsoo Kim
On Thu, Jan 08, 2015 at 09:46:27AM +0100, Vlastimil Babka wrote: > On 01/08/2015 09:18 AM, Joonsoo Kim wrote: > > On Tue, Jan 06, 2015 at 10:05:39AM +0100, Vlastimil Babka wrote: > >> On 12/03/2014 08:52 AM, Joonsoo Kim wrote: > >> > It'd be useful to know where

Re: [PATCH 1/3] mm/compaction: enhance trace output to know more about compaction internals

2015-01-12 Thread Joonsoo Kim
On Fri, Jan 09, 2015 at 10:57:10AM +, Mel Gorman wrote: > On Thu, Jan 08, 2015 at 09:46:27AM +0100, Vlastimil Babka wrote: > > On 01/08/2015 09:18 AM, Joonsoo Kim wrote: > > > On Tue, Jan 06, 2015 at 10:05:39AM +0100, Vlastimil Babka wrote: > > >> On 12/03/20

[PATCH v2 4/5] mm/compaction: more trace to understand when/why compaction start/finish

2015-01-12 Thread Joonsoo Kim
It is not well analyzed that when/why compaction start/finish or not. With these new tracepoints, we can know much more about start/finish reason of compaction. I can find following bug with these tracepoint. http://www.spinics.net/lists/linux-mm/msg81582.html Signed-off-by: Joonsoo Kim

[PATCH v2 3/5] mm/compaction: print current range where compaction work

2015-01-12 Thread Joonsoo Kim
It'd be useful to know current range where compaction work for detailed analysis. With it, we can know pageblock where we actually scan and isolate, and, how much pages we try in that pageblock and can guess why it doesn't become freepage with pageblock order roughly. Signed-off-by: J

[PATCH v2 5/5] mm/compaction: add tracepoint to observe behaviour of compaction defer

2015-01-12 Thread Joonsoo Kim
ction deferring logic. This patch add new tracepoint to understand work of deferring logic. This will also help to check compaction success and fail. Signed-off-by: Joonsoo Kim --- include/linux/compaction.h| 65 +++-- include/trace/events/compaction.h |

[PATCH v2 2/5] mm/compaction: enhance tracepoint output for compaction begin/end

2015-01-12 Thread Joonsoo Kim
lp to find odd behavior or problem on compaction internal logic. And, mode is added to both begin/end tracepoint output, since according to mode, compaction behavior is quite different. And, lastly, status format is changed to string rather than status number for readability. Signed-off-by: J

[PATCH v2 1/5] mm/compaction: change tracepoint format from decimal to hexadecimal

2015-01-12 Thread Joonsoo Kim
would improve readability. For example, it makes us easily notice whether current scanner try to compact previously attempted pageblock or not. Signed-off-by: Joonsoo Kim --- include/trace/events/compaction.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events

Re: [PATCH v2 4/5] mm/compaction: more trace to understand when/why compaction start/finish

2015-01-12 Thread Joonsoo Kim
On Mon, Jan 12, 2015 at 04:53:53PM +0100, Vlastimil Babka wrote: > On 01/12/2015 09:21 AM, Joonsoo Kim wrote: > > It is not well analyzed that when/why compaction start/finish or not. With > > these new tracepoints, we can know much more about start/finish reason of > > c

Re: [PATCH v2 5/5] mm/compaction: add tracepoint to observe behaviour of compaction defer

2015-01-12 Thread Joonsoo Kim
On Mon, Jan 12, 2015 at 05:35:47PM +0100, Vlastimil Babka wrote: > On 01/12/2015 09:21 AM, Joonsoo Kim wrote: > > compaction deferring logic is heavy hammer that block the way to > > the compaction. It doesn't consider overall system state, so it > > could prevent

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

2015-01-18 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. Change from v2: Add some code comments Acked-by: Christoph Lameter Signed-off-by: Joonsoo Kim --- inclu

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

2015-01-18 Thread Joonsoo Kim
v1: add comment about barrier() usage Change from v2: - use raw_cpu_ptr() rather than this_cpu_ptr() to avoid warning from preemption debug check since this is intended behaviour - fix typo alogorithm -> algorithm Acked-by: Christoph Lameter Acked-by: Jesper Dangaard Brouer Tested-by: Jesp

[PATCH v4 1/5] mm/compaction: change tracepoint format from decimal to hexadecimal

2015-01-18 Thread Joonsoo Kim
would improve readability. For example, it makes us easily notice whether current scanner try to compact previously attempted pageblock or not. Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- include/trace/events/compaction.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v4 5/5] mm/compaction: add tracepoint to observe behaviour of compaction defer

2015-01-18 Thread Joonsoo Kim
ction deferring logic. This patch add new tracepoint to understand work of deferring logic. This will also help to check compaction success and fail. Changes from v2: Remove reason part from tracepoint output Changes from v3: Build fix for !CONFIG_COMPACTION Signed-off-by: Joonsoo Kim --- include/

[PATCH v4 2/5] mm/compaction: enhance tracepoint output for compaction begin/end

2015-01-18 Thread Joonsoo Kim
ld fix for !CONFIG_COMPACTION, !CONFIG_TRACEPOINTS Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- include/linux/compaction.h|1 + include/trace/events/compaction.h | 49 ++--- mm/compaction.c | 15 ++-- 3 files c

[PATCH v4 4/5] mm/compaction: more trace to understand when/why compaction start/finish

2015-01-18 Thread Joonsoo Kim
, classzone_idx from tracepoint output Signed-off-by: Joonsoo Kim --- include/linux/compaction.h|3 ++ include/trace/events/compaction.h | 74 + mm/compaction.c | 38 +-- 3 files changed, 111 insertions(+), 4

[PATCH v4 3/5] mm/compaction: print current range where compaction work

2015-01-18 Thread Joonsoo Kim
imil Babka Signed-off-by: Joonsoo Kim --- include/trace/events/compaction.h | 30 +++--- mm/compaction.c |9 ++--- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/include/trace/events/compaction.h b/include/trace/events/compacti

Re: [PATCH v3 2/5] mm/compaction: enhance tracepoint output for compaction begin/end

2015-01-18 Thread Joonsoo Kim
On Thu, Jan 15, 2015 at 05:16:27PM -0800, Andrew Morton wrote: > On Thu, 15 Jan 2015 16:41:10 +0900 Joonsoo Kim wrote: > > > We now have tracepoint for begin event of compaction and it prints > > start position of both scanners, but, tracepoint for end event of > >

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

2015-01-18 Thread Joonsoo Kim
On Thu, Jan 15, 2015 at 05:16:46PM -0800, Andrew Morton wrote: > On Thu, 15 Jan 2015 16:40:33 +0900 Joonsoo Kim wrote: > > > compound_head() is implemented with assumption that there would be > > race condition when checking tail flag. This assumption is only true > &g

Re: mmotm 2015-01-16-15-50 uploaded

2015-01-18 Thread Joonsoo Kim
On Fri, Jan 16, 2015 at 10:40:23PM -0800, Guenter Roeck wrote: > On Fri, Jan 16, 2015 at 03:50:38PM -0800, a...@linux-foundation.org wrote: > > The mm-of-the-moment snapshot 2015-01-16-15-50 has been uploaded to > > > >http://www.ozlabs.org/~akpm/mmotm/ > > > > mmotm-readme.txt says > > > >

Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds

2015-01-26 Thread Joonsoo Kim
On Thu, Jan 22, 2015 at 10:45:51AM +0900, Joonsoo Kim wrote: > On Wed, Jan 21, 2015 at 09:57:59PM +0900, Akinobu Mita wrote: > > 2015-01-21 9:07 GMT+09:00 Andrew Morton : > > > On Tue, 20 Jan 2015 15:01:50 -0800 j...@joshtriplett.org wrote: > > > > > >> O

Re: [PATCH -mm 3/3] slub: make dead caches discard free slabs immediately

2015-01-26 Thread Joonsoo Kim
On Mon, Jan 26, 2015 at 03:55:29PM +0300, Vladimir Davydov wrote: > To speed up further allocations SLUB may store empty slabs in per > cpu/node partial lists instead of freeing them immediately. This > prevents per memcg caches destruction, because kmem caches created for a > memory cgroup are onl

Re: [PATCH v2 2/3] mm: cma: allocation trigger

2015-01-27 Thread Joonsoo Kim
On Mon, Jan 26, 2015 at 09:26:04AM -0500, Sasha Levin wrote: > Provides a userspace interface to trigger a CMA allocation. > > Usage: > > echo [pages] > alloc > > This would provide testing/fuzzing access to the CMA allocation paths. > > Signed-off-by: Sasha Levin > --- > mm/cma_debug.c

Re: [PATCH v2 3/3] mm: cma: release trigger

2015-01-27 Thread Joonsoo Kim
On Mon, Jan 26, 2015 at 09:26:05AM -0500, Sasha Levin wrote: > Provides a userspace interface to trigger a CMA release. > > Usage: > > echo [pages] > free > > This would provide testing/fuzzing access to the CMA release paths. > > Signed-off-by: Sasha Levin > --- > mm/cma_debug.c | 54

Re: [RFC 1/3] Slab infrastructure for array operations

2015-01-27 Thread Joonsoo Kim
On Fri, Jan 23, 2015 at 03:37:28PM -0600, Christoph Lameter wrote: > This patch adds the basic infrastructure for alloc / free operations > on pointer arrays. It includes a fallback function that can perform > the array operations using the single alloc and free that every > slab allocator performs

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

2015-01-27 Thread Joonsoo Kim
On Tue, Jan 27, 2015 at 08:35:17AM +0100, Vlastimil Babka wrote: > On 12/10/2014 07:38 AM, Joonsoo Kim wrote: > > After your patch is merged, I will resubmit these on top of it. > > Hi Joonsoo, > > my page stealing patches are now in -mm so are you planning to resubmit this

Re: [PATCH 1/1] mm/page_ext: remove unnecessary stack_trace field

2015-01-27 Thread Joonsoo Kim
ret += snprint_stack_trace(kbuf + ret, count - ret, > - &page_ext->trace, 0); > + trace.nr_entries = page_ext->nr_entries; > + trace.entries = &page_ext->trace_entries[0]; > + > + ret += snprint_stack_trace(kbuf + r

Re: [PATCH -mm 3/3] slub: make dead caches discard free slabs immediately

2015-01-27 Thread Joonsoo Kim
2015-01-27 17:23 GMT+09:00 Vladimir Davydov : > Hi Joonsoo, > > On Tue, Jan 27, 2015 at 05:00:09PM +0900, Joonsoo Kim wrote: >> On Mon, Jan 26, 2015 at 03:55:29PM +0300, Vladimir Davydov wrote: >> > @@ -3381,6 +3390,15 @@ void __kmem_cache_shrink(struct kmem_cache *s)

Re: [RFC 1/3] Slab infrastructure for array operations

2015-01-27 Thread Joonsoo Kim
2015-01-28 1:57 GMT+09:00 Christoph Lameter : > On Tue, 27 Jan 2015, Joonsoo Kim wrote: > >> IMHO, exposing these options is not a good idea. It's really >> implementation specific. And, this flag won't show consistent performance >> according to specific slab i

Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64

2015-01-27 Thread Joonsoo Kim
gt;> - changed designation from 'mm:' to 'powerpc/mm:', as I think this >> now belongs in ppc-land >> >> v2: >> - corrected SUPPORTS_DEBUG_PAGEALLOC selection to enable >> non-STD_MMU_64 builds to use the generic __kernel_map_pages(). > > I&#

Re: [PATCH v2 2/3] mm: cma: allocation trigger

2015-01-27 Thread Joonsoo Kim
2015-01-28 0:08 GMT+09:00 Sasha Levin : > On 01/27/2015 03:06 AM, Joonsoo Kim wrote: >> On Mon, Jan 26, 2015 at 09:26:04AM -0500, Sasha Levin wrote: >>> Provides a userspace interface to trigger a CMA allocation. >>> >>> Usage: >>> >>> e

Re: [PATCH v2 3/3] mm: cma: release trigger

2015-01-27 Thread Joonsoo Kim
2015-01-28 5:13 GMT+09:00 Sasha Levin : > On 01/27/2015 01:25 PM, Sasha Levin wrote: >> On 01/27/2015 03:10 AM, Joonsoo Kim wrote: >>>> >> +if (mem->n <= count) { >>>>> >> > + cma_release(cma, mem->

Re: [PATCHv2] mm/slub: fix lockups on PREEMPT && !SMP kernels

2015-03-19 Thread Joonsoo Kim
2015-03-19 0:21 GMT+09:00 Mark Rutland : > Hi, > >> > do { >> > tid = this_cpu_read(s->cpu_slab->tid); >> > c = raw_cpu_ptr(s->cpu_slab); >> > - } while (IS_ENABLED(CONFIG_PREEMPT) && unlikely(tid != c->tid)); >> > + } while (IS_ENABLED(CONFIG_PRE

Re: [RFC 13/16] mm/cma: populate ZONE_CMA and use this zone when GFP_HIGHUSERMOVABLE

2015-03-19 Thread Joonsoo Kim
On Wed, Mar 18, 2015 at 03:33:02PM +0530, Aneesh Kumar K.V wrote: > > > > > #ifdef CONFIG_CMA > > +static void __init adjust_present_page_count(struct page *page, long count) > > +{ > > + struct zone *zone = page_zone(page); > > + > > + zone->present_pages += count; > > +} > > + > > May be a

Re: [PATCH] mm: cma: add trace events for CMA allocations and freeings

2015-04-02 Thread Joonsoo Kim
Hello, On Wed, Apr 01, 2015 at 04:31:43PM +0300, Stefan Strogin wrote: > Add trace events for cma_alloc() and cma_release(). > > The cma_alloc tracepoint is used both for successful and failed allocations, > in case of allocation failure pfn=-1UL is stored and printed. > > Signed-off-by: Stefan

Re: [patch] mm: vmscan: invoke slab shrinkers from shrink_zone()

2015-04-15 Thread Joonsoo Kim
Hello, Johannes. Ccing Vlastimil, because this patch causes some regression on stress-highalloc test in mmtests and he is a expert on compaction and would have interest on it. :) On Fri, Nov 28, 2014 at 07:06:37PM +0300, Vladimir Davydov wrote: > Hi Johannes, > > The patch generally looks good t

[PATCH] tracing: fix incorrect enabling of trace events by boot cmdline

2015-04-15 Thread Joonsoo Kim
t;. This patch add it. Signed-off-by: Joonsoo Kim --- kernel/trace/trace_events.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index db54dda..ce5b194 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/t

Re: [patch] mm: vmscan: invoke slab shrinkers from shrink_zone()

2015-04-16 Thread Joonsoo Kim
On Thu, Apr 16, 2015 at 10:34:13AM -0400, Johannes Weiner wrote: > Hi Joonsoo, > > On Thu, Apr 16, 2015 at 12:57:36PM +0900, Joonsoo Kim wrote: > > Hello, Johannes. > > > > Ccing Vlastimil, because this patch causes some regression on > > stress-highalloc test

Re: [patch] mm: vmscan: invoke slab shrinkers from shrink_zone()

2015-04-16 Thread Joonsoo Kim
On Fri, Apr 17, 2015 at 09:17:53AM +1000, Dave Chinner wrote: > On Thu, Apr 16, 2015 at 10:34:13AM -0400, Johannes Weiner wrote: > > On Thu, Apr 16, 2015 at 12:57:36PM +0900, Joonsoo Kim wrote: > > > This causes following success rate regression of phase 1,2 on >

Re: [PATCH] tracing: fix incorrect enabling of trace events by boot cmdline

2015-04-16 Thread Joonsoo Kim
On Thu, Apr 16, 2015 at 09:39:52AM -0400, Steven Rostedt wrote: > On Thu, 16 Apr 2015 13:44:44 +0900 > Joonsoo Kim wrote: > > > There is a problem that trace events are not properly enabled with > > boot cmdline. Problem is that if we pass "trace_event=kmem:mm_page_allo

[PATCH 2/3] mm/page_alloc: stop fallback allocation if we already get some freepage

2015-04-27 Thread Joonsoo Kim
is tainted by other migratetype allocation. * After Number of blocks type (movable) DMA32: 207 Number of mixed blocks (movable) DMA32: 111.2 This result shows that non-mixed block increase by 38% in this case. Signed-off-by: Joonsoo Kim --- mm/page_alloc.c | 10 +++--- 1 file changed, 7

[PATCH 1/3] mm/page_alloc: don't break highest order freepage if steal

2015-04-27 Thread Joonsoo Kim
textdata bss dec hex filename 374131440 624 394779a35 mm/page_alloc.o 372491440 624 393139991 mm/page_alloc.o Signed-off-by: Joonsoo Kim --- mm/page_alloc.c | 40 +--- 1 file changed, 21 insertions(+), 19 dele

[RFC PATCH 3/3] mm: support active anti-fragmentation algorithm

2015-04-27 Thread Joonsoo Kim
Below is result of this idea. * After Number of blocks type (movable) DMA32: 208.2 Number of mixed blocks (movable) DMA32: 55.8 Result shows that non-mixed block increase by 59% in this case. Signed-off-by: Joonsoo Kim --- include/linux/compaction.h | 8 +++ include/linux/gfp.h|

Re: [PATCH 1/3] mm/page_alloc: don't break highest order freepage if steal

2015-04-27 Thread Joonsoo Kim
On Mon, Apr 27, 2015 at 09:08:50AM +0100, Mel Gorman wrote: > On Mon, Apr 27, 2015 at 04:23:39PM +0900, Joonsoo Kim wrote: > > When we steal whole pageblock, we don't need to break highest order > > freepage. Perhaps, there is small order freepage so we can use it. > >

Re: [RFC PATCH 3/3] mm: support active anti-fragmentation algorithm

2015-04-28 Thread Joonsoo Kim
On Mon, Apr 27, 2015 at 09:29:23AM +0100, Mel Gorman wrote: > On Mon, Apr 27, 2015 at 04:23:41PM +0900, Joonsoo Kim wrote: > > We already have antifragmentation policy in page allocator. It works well > > when system memory is sufficient, but, it doesn't works well when sys

[PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Joonsoo Kim
migrate_pages() should return number of pages not migrated or error code. When unmap_and_move return -EAGAIN, outer loop is re-execution without initialising nr_failed. This makes nr_failed over-counted. So this patch correct it by initialising nr_failed in outer loop. Signed-off-by: Joonsoo Kim

[PATCH 2/3] mm: fix possible incorrect return value of migrate_pages() syscall

2012-07-16 Thread Joonsoo Kim
Additionally, Correct comment above do_migrate_pages() Signed-off-by: Joonsoo Kim Cc: Sasha Levin Cc: Christoph Lameter diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1d771e4..f7df271 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -948,7 +948,7 @@ static int migrate_to_node(struct mm_struct *mm

[PATCH 3/3] mm: fix return value in __alloc_contig_migrate_range()

2012-07-16 Thread Joonsoo Kim
migrate_pages() would return positive value in some failure case, so 'ret > 0 ? 0 : ret' may be wrong. This fix it and remove one dead statement. Signed-off-by: Joonsoo Kim Cc: Michal Nazarewicz Cc: Marek Szyprowski Cc: Minchan Kim Cc: Christoph Lameter diff --git a/mm/page

[PATCH 4] mm: fix possible incorrect return value of move_pages() syscall

2012-07-16 Thread Joonsoo Kim
move_pages() syscall may return success in case that do_move_page_to_node_array return positive value which means migration failed. This patch changes return value of do_move_page_to_node_array for not returning positive value. It can fix the problem. Signed-off-by: Joonsoo Kim Cc: Brice Goglin

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread JoonSoo Kim
2012/7/17 Christoph Lameter : > On Tue, 17 Jul 2012, Joonsoo Kim wrote: > >> migrate_pages() should return number of pages not migrated or error code. >> When unmap_and_move return -EAGAIN, outer loop is re-execution without >> initialising nr_failed. This makes nr_fail

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread JoonSoo Kim
2012/7/17 Michal Nazarewicz : > Acked-by: Michal Nazarewicz Thanks. > Actually, it makes me wonder if there is any code that uses this > information. If not, it would be best in my opinion to make it return > zero or negative error code, but that would have to be checked. I think that, too. I

Re: [PATCH 2/3] mm: fix possible incorrect return value of migrate_pages() syscall

2012-07-16 Thread JoonSoo Kim
2012/7/17 Michal Nazarewicz : > Joonsoo Kim writes: >> do_migrate_pages() can return the number of pages not migrated. >> Because migrate_pages() syscall return this value directly, >> migrate_pages() syscall may return the number of pages not migrated. >> In fail case

Re: [PATCH 3/3] mm: fix return value in __alloc_contig_migrate_range()

2012-07-16 Thread JoonSoo Kim
2012/7/17 Michal Nazarewicz : > Joonsoo Kim writes: > >> migrate_pages() would return positive value in some failure case, >> so 'ret > 0 ? 0 : ret' may be wrong. >> This fix it and remove one dead statement. >> >> Signed-off-by: Joonsoo Kim

[PATCH 1/4 v2] mm: correct return value of migrate_pages() and migrate_huge_pages()

2012-07-17 Thread Joonsoo Kim
identical case as migrate_pages() Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Acked-by: Christoph Lameter Acked-by: Michal Nazarewicz diff --git a/mm/migrate.c b/mm/migrate.c index be26d5c..f495c58 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -982,6 +982,7 @@ int migrate_pages(struct

[PATCH 2/4 v2] mm: fix possible incorrect return value of migrate_pages() syscall

2012-07-17 Thread Joonsoo Kim
Additionally, Correct comment above do_migrate_pages() Signed-off-by: Joonsoo Kim Cc: Sasha Levin Cc: Christoph Lameter diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1d771e4..0732729 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -948,7 +948,7 @@ static int migrate_to_node(struct mm_struct *mm

[PATCH 4/4 v2] mm: fix possible incorrect return value of move_pages() syscall

2012-07-17 Thread Joonsoo Kim
move_pages() syscall may return success in case that do_move_page_to_node_array return positive value which means migration failed. This patch changes return value of do_move_page_to_node_array for not returning positive value. It can fix the problem. Signed-off-by: Joonsoo Kim Cc: Brice Goglin

[PATCH 3/4 v2] mm: fix return value in __alloc_contig_migrate_range()

2012-07-17 Thread Joonsoo Kim
migrate_pages() would return positive value in some failure case, so 'ret > 0 ? 0 : ret' may be wrong. This fix it and remove one dead statement. Signed-off-by: Joonsoo Kim Cc: Michal Nazarewicz Cc: Marek Szyprowski Cc: Minchan Kim Cc: Christoph Lameter Acked-by: Christoph L

Re: [PATCH 2/4 v2] mm: fix possible incorrect return value of migrate_pages() syscall

2012-07-17 Thread JoonSoo Kim
2012/7/17 Christoph Lameter : > On Tue, 17 Jul 2012, Joonsoo Kim wrote: > >> @@ -1382,6 +1382,8 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned >> long, maxnode, >> >> err = do_migrate_pages(mm, old, new, >> capable(CAP_SYS_NIC

Re: [PATCH 3/4 v2] mm: fix return value in __alloc_contig_migrate_range()

2012-07-17 Thread JoonSoo Kim
2012/7/17 Michal Nazarewicz : > On Tue, 17 Jul 2012 14:33:34 +0200, Joonsoo Kim wrote: >> >> migrate_pages() would return positive value in some failure case, >> so 'ret > 0 ? 0 : ret' may be wrong. >> This fix it and remove one dead statemen

[PATCH 3/4 v3] mm: fix return value in __alloc_contig_migrate_range()

2012-07-17 Thread Joonsoo Kim
Signed-off-by: Joonsoo Kim Cc: Michal Nazarewicz Cc: Marek Szyprowski Cc: Minchan Kim Cc: Christoph Lameter Acked-by: Christoph Lameter Acked-by: Michal Nazarewicz diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4403009..02d4519 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@

[PATCH] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page()

2012-07-17 Thread Joonsoo Kim
hould call with MIGRATE_SYNC. So change it. Additionally, there is mismatch between type of argument and function declaration for migrate_pages(). So fix this simple case, too. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Mel Gorman diff --git a/mm/memory-failure.c b/mm/memory-failu

Re: [PATCH 1/6] mm, compaction: more robust check for scanners meeting

2015-06-15 Thread Joonsoo Kim
ner. > The special case in isolate_migratepages() introduced by 1d5bfe1ffb5b is > removed. > > Suggested-by: Joonsoo Kim > Signed-off-by: Vlastimil Babka Acked-by: Joonsoo Kim Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

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