Re: [mm/swap] aae466b005: vm-scalability.throughput -2.7% regression

2021-01-03 Thread Joonsoo Kim
On Wed, Dec 30, 2020 at 02:24:12PM +0800, kernel test robot wrote: > > Greeting, > > FYI, we noticed a -2.7% regression of vm-scalability.throughput due to commit: > > > commit: aae466b0052e1888edd1d7f473d4310d64936196 ("mm/swap: implement > workingset detection for anonymous LRU") >

Re: [PATCH] mm, slub: Consider rest of partial list if acquire_slab() fails

2020-12-28 Thread Joonsoo Kim
means that get_partial() fails and new_slab_objects() falls back to > new_slab(), allocating new pages. This could lead to an unnecessary > increase in memory fragmentation. > > Fixes: 7ced37197196 ("slub: Acquire_slab() avoid loop") > Signed-off-by: Jann Horn Acked-by: Joonsoo Kim Thanks.

Re: [PATCH v3 sl-b 1/6] mm: Add mem_dump_obj() to print source of memory block

2020-12-10 Thread Joonsoo Kim
On Thu, Dec 10, 2020 at 07:42:27PM -0800, Paul E. McKenney wrote: > On Thu, Dec 10, 2020 at 07:33:59PM -0800, Paul E. McKenney wrote: > > On Fri, Dec 11, 2020 at 11:22:10AM +0900, Joonsoo Kim wrote: > > > On Thu, Dec 10, 2020 at 05:19:58PM -0800, paul...@kernel.org wrote: >

Re: [PATCH v3 sl-b 1/6] mm: Add mem_dump_obj() to print source of memory block

2020-12-10 Thread Joonsoo Kim
On Thu, Dec 10, 2020 at 07:33:59PM -0800, Paul E. McKenney wrote: > On Fri, Dec 11, 2020 at 11:22:10AM +0900, Joonsoo Kim wrote: > > On Thu, Dec 10, 2020 at 05:19:58PM -0800, paul...@kernel.org wrote: > > > From: "Paul E. McKenney" > > > > > &g

Re: [PATCH v3] mm/page_owner: Record timestamp and pid

2020-12-10 Thread Joonsoo Kim
t > complicate things with making this optional. > > Signed-off-by: Liam Mark > Signed-off-by: Georgi Djakov > Acked-by: Vlastimil Babka > Cc: Jonathan Corbet Acked-by: Joonsoo Kim This is useful. Our company already has an in-house patch to store pid since a few years ago. Thanks.

Re: [PATCH v3 sl-b 1/6] mm: Add mem_dump_obj() to print source of memory block

2020-12-10 Thread Joonsoo Kim
slub, build with CONFIG_SLUB_DEBUG=y and > boot with slub_debug=U, or pass SLAB_STORE_USER to kmem_cache_create() > if more focused use is desired. Also for slub, use CONFIG_STACKTRACE > to enable printing of the allocation-time stack trace. > > Cc: Christoph Lameter > Cc: Pekk

Re: [PATCH] mm/slab: Perform init_on_free earlier

2020-12-10 Thread Joonsoo Kim
will store erased objects, similarly > to CONFIG_SLUB=y behavior. > > Signed-off-by: Alexander Popov > Reviewed-by: Alexander Potapenko Acked-by: Joonsoo Kim

Re: [PATCH] mm, slab, slub: clear the slab_cache field when freeing page

2020-12-10 Thread Joonsoo Kim
bout those). While using the 'mapping' name would automagically > keep the code correct if the unions in struct page changed, such changes > should > be done consciously and needed changes evaluated - the comment should help > with > that. > > Signed-off-by: Vlastimil Babka Acked-by: Joonsoo Kim

Re: [PATCH v2 sl-b 1/5] mm: Add mem_dump_obj() to print source of memory block

2020-12-10 Thread Joonsoo Kim
slub, build with CONFIG_SLUB_DEBUG=y and > boot with slub_debug=U, or pass SLAB_STORE_USER to kmem_cache_create() > if more focused use is desired. Also for slub, use CONFIG_STACKTRACE > to enable printing of the allocation-time stack trace. > > Cc: Christoph Lameter > Cc: Pekk

Re: [PATCH sl-b 1/6] mm: Add kmem_last_alloc() to return last allocation for memory block

2020-12-08 Thread Joonsoo Kim
On Mon, Dec 07, 2020 at 09:25:54AM -0800, Paul E. McKenney wrote: > On Mon, Dec 07, 2020 at 06:02:53PM +0900, Joonsoo Kim wrote: > > Hello, Paul. > > > > On Fri, Dec 04, 2020 at 04:40:52PM -0800, paul...@kernel.org wrote: > > > From: "Paul E. McKenney"

Re: [PATCH sl-b 1/6] mm: Add kmem_last_alloc() to return last allocation for memory block

2020-12-07 Thread Joonsoo Kim
Hello, Paul. On Fri, Dec 04, 2020 at 04:40:52PM -0800, paul...@kernel.org wrote: > From: "Paul E. McKenney" > > There are kernel facilities such as per-CPU reference counts that give > error messages in generic handlers or callbacks, whose messages are > unenlightening. In the case of per-CPU

Re: [PATCH 6/6] mm/gup: migrate pinned pages out of movable zone

2020-12-06 Thread Joonsoo Kim
On Fri, Dec 04, 2020 at 12:43:29PM -0500, Pavel Tatashin wrote: > On Thu, Dec 3, 2020 at 11:14 PM Joonsoo Kim wrote: > > > > On Wed, Dec 02, 2020 at 12:23:30AM -0500, Pavel Tatashin wrote: > > > We do not allocate pin pages in ZONE_MOVABLE, but if pages were already > &

Re: [PATCH 0/6] prohibit pinning pages in ZONE_MOVABLE

2020-12-06 Thread Joonsoo Kim
On Fri, Dec 04, 2020 at 12:50:56PM -0500, Pavel Tatashin wrote: > > > Yes, this indeed could be a problem for some configurations. I will > > > add your comment to the commit log of one of the patches. > > > > It sounds like there is some inherent tension here, breaking THP's > > when doing

Re: [PATCH 6/6] mm/gup: migrate pinned pages out of movable zone

2020-12-03 Thread Joonsoo Kim
On Wed, Dec 02, 2020 at 12:23:30AM -0500, Pavel Tatashin wrote: > We do not allocate pin pages in ZONE_MOVABLE, but if pages were already > allocated before pinning they need to migrated to a different zone. > Currently, we migrate movable CMA pages only. Generalize the function > that migrates

Re: [PATCH 0/6] prohibit pinning pages in ZONE_MOVABLE

2020-12-03 Thread Joonsoo Kim
Hello, On Wed, Dec 02, 2020 at 12:23:24AM -0500, Pavel Tatashin wrote: > When page is pinned it cannot be moved and its physical address stays > the same until pages is unpinned. > > This is useful functionality to allows userland to implementation DMA > access. For example, it is used by vfio

Re: [RFC][PATCH] kexec: Teach indirect pages how to live in high memory

2020-10-08 Thread Joonsoo Kim
On Tue, May 05, 2020 at 01:39:16PM -0500, Eric W. Biederman wrote: > Hari Bathini writes: > > > On 05/05/20 3:29 am, Eric W. Biederman wrote: > >> > >> Recently a patch was proposed to kimage_alloc_page to slightly alter > >> the logic of how pages allocated with incompatible flags were > >>

Re: [PATCH v2 for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-09-29 Thread Joonsoo Kim
2020년 9월 29일 (화) 오후 5:08, Michal Hocko 님이 작성: > > On Mon 28-09-20 17:50:46, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > memalloc_nocma_{save/restore} APIs can be used to skip page allocation > > on CMA area, but, there is a missing case and the page on CMA ar

Re: [PATCH v2 for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-09-29 Thread Joonsoo Kim
2020년 9월 29일 (화) 오후 1:50, Andrew Morton 님이 작성: > > On Tue, 29 Sep 2020 10:28:05 +0900 Joonsoo Kim wrote: > > > > What about manually emptying the pcplists beforehand? > > > > It also increases the probability. schedule() or interrupt after emptying > >

Re: [PATCH v2 for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-09-28 Thread Joonsoo Kim
2020년 9월 29일 (화) 오전 8:52, Andrew Morton 님이 작성: > > On Mon, 28 Sep 2020 17:50:46 +0900 js1...@gmail.com wrote: > > > From: Joonsoo Kim > > > > memalloc_nocma_{save/restore} APIs can be used to skip page allocation > > on CMA area, but, there is a missing ca

Re: [PATCH for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-09-25 Thread Joonsoo Kim
2020년 9월 25일 (금) 오후 5:55, Vlastimil Babka 님이 작성: > > On 9/25/20 6:59 AM, Joonsoo Kim wrote: > > 2020년 8월 28일 (금) 오전 8:54, Joonsoo Kim 님이 작성: > > > > Hello, Andrew and Vlastimil. > > > > It's better to fix this possible bug introduced in v5.9-rc1 before > &g

Re: [PATCH for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-09-24 Thread Joonsoo Kim
2020년 8월 28일 (금) 오전 8:54, Joonsoo Kim 님이 작성: > > 2020년 8월 27일 (목) 오후 10:35, Mel Gorman 님이 작성: > > > > On Wed, Aug 26, 2020 at 02:12:44PM +0900, Joonsoo Kim wrote: > > > > > And, it requires to break current code > > > > > layering that or

Re: [PATCH for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-08-27 Thread Joonsoo Kim
2020년 8월 27일 (목) 오후 10:35, Mel Gorman 님이 작성: > > On Wed, Aug 26, 2020 at 02:12:44PM +0900, Joonsoo Kim wrote: > > > > And, it requires to break current code > > > > layering that order-0 page is always handled by the pcplist. I'd prefer > > > > to avoid i

Re: [PATCH for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-08-25 Thread Joonsoo Kim
2020년 8월 26일 (수) 오전 9:42, Andrew Morton 님이 작성: > > On Tue, 25 Aug 2020 14:34:32 +0900 Joonsoo Kim wrote: > > > > > > > That's a bunch more code on a very hot path to serve an obscure feature > > > which has a single obscure callsite. > > > > &g

Re: [PATCH for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-08-25 Thread Joonsoo Kim
2020년 8월 25일 (화) 오후 6:43, Vlastimil Babka 님이 작성: > > > On 8/25/20 6:59 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > memalloc_nocma_{save/restore} APIs can be used to skip page allocation > > on CMA area, but, there is a missing case and the page o

Re: [PATCH for v5.9] mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs

2020-08-24 Thread Joonsoo Kim
2020년 8월 25일 (화) 오후 2:10, Andrew Morton 님이 작성: > > On Tue, 25 Aug 2020 13:59:42 +0900 js1...@gmail.com wrote: > > > From: Joonsoo Kim > > > > memalloc_nocma_{save/restore} APIs can be used to skip page allocation > > on CMA area, but, there is a missing ca

Re: [PATCH v2] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs

2020-07-23 Thread Joonsoo Kim
2020년 7월 24일 (금) 오후 12:14, Andrew Morton 님이 작성: > > On Fri, 24 Jul 2020 12:04:02 +0900 Joonsoo Kim wrote: > > > 2020년 7월 24일 (금) 오전 11:36, Andrew Morton 님이 작성: > > > > > > On Fri, 24 Jul 2020 11:23:52 +0900 Joonsoo Kim wrote: > > >

Re: [PATCH v2] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs

2020-07-23 Thread Joonsoo Kim
2020년 7월 24일 (금) 오전 11:36, Andrew Morton 님이 작성: > > On Fri, 24 Jul 2020 11:23:52 +0900 Joonsoo Kim wrote: > > > > > Second, clearing __GFP_MOVABLE in current_gfp_context() has a side > > > > effect > > > > to exclude the memory on the ZONE_MOVABLE f

Re: [PATCH v2] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs

2020-07-23 Thread Joonsoo Kim
2020년 7월 24일 (금) 오전 10:08, Andrew Morton 님이 작성: > > On Thu, 23 Jul 2020 10:49:02 +0900 js1...@gmail.com wrote: > > > From: Joonsoo Kim > > > > Currently, memalloc_nocma_{save/restore} API that prevents CMA area > > in page allocation is implemented by usi

Re: [PATCH] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs

2020-07-22 Thread Joonsoo Kim
2020년 7월 21일 (화) 오후 9:43, Matthew Wilcox 님이 작성: > > On Tue, Jul 21, 2020 at 02:38:56PM +0200, Vlastimil Babka wrote: > > On 7/21/20 2:05 PM, Matthew Wilcox wrote: > > > On Tue, Jul 21, 2020 at 12:28:49PM +0900, js1...@gmail.com wrote: > > >> @@ -4619,8 +4631,10 @@ __alloc_pages_slowpath(gfp_t

Re: [PATCH] mm/page_alloc: fix memalloc_nocma_{save/restore} APIs

2020-07-22 Thread Joonsoo Kim
2020년 7월 21일 (화) 오후 9:39, Vlastimil Babka 님이 작성: > > On 7/21/20 2:05 PM, Matthew Wilcox wrote: > > On Tue, Jul 21, 2020 at 12:28:49PM +0900, js1...@gmail.com wrote: > >> +static inline unsigned int current_alloc_flags(gfp_t gfp_mask, > >> +unsigned int

Re: [PATCH v2 1/4] mm/page_alloc: fix non cma alloc context

2020-07-20 Thread Joonsoo Kim
2020년 7월 21일 (화) 오전 8:23, Andrew Morton 님이 작성: > > On Mon, 20 Jul 2020 13:56:15 +0900 js1...@gmail.com wrote: > > > Currently, preventing cma area in page allocation is implemented by using > > current_gfp_context(). However, there are two problems of this > > implementation. > > > > First, this

Re: [PATCH v6 2/6] mm/vmscan: protect the workingset on anonymous LRU

2020-07-20 Thread Joonsoo Kim
2020년 7월 17일 (금) 오후 10:59, Johannes Weiner 님이 작성: > > On Wed, Jun 17, 2020 at 02:26:19PM +0900, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > In current implementation, newly created or swap-in anonymous page > > is started on active list. Growing acti

Re: [PATCH 2/4] mm/gup: restrict CMA region by using allocation scope API

2020-07-17 Thread Joonsoo Kim
2020년 7월 17일 (금) 오후 5:26, Michal Hocko 님이 작성: > > On Fri 17-07-20 16:46:38, Joonsoo Kim wrote: > > 2020년 7월 15일 (수) 오후 5:24, Michal Hocko 님이 작성: > > > > > > On Wed 15-07-20 14:05:27, Joonsoo Kim wrote: > > > > From: Joonsoo Kim > > > > > &

Re: [PATCH 1/4] mm/page_alloc: fix non cma alloc context

2020-07-17 Thread Joonsoo Kim
2020년 7월 17일 (금) 오후 5:32, David Laight 님이 작성: > > From: js1...@gmail.com > > Sent: 15 July 2020 06:05 > > From: Joonsoo Kim > > > > Currently, preventing cma area in page allocation is implemented by using > > current_gfp_context(). However, there are two

Re: [PATCH 1/4] mm/page_alloc: fix non cma alloc context

2020-07-17 Thread Joonsoo Kim
2020년 7월 17일 (금) 오후 5:15, Vlastimil Babka 님이 작성: > > On 7/17/20 10:10 AM, Vlastimil Babka wrote: > > On 7/17/20 9:29 AM, Joonsoo Kim wrote: > >> 2020년 7월 16일 (목) 오후 4:45, Vlastimil Babka 님이 작성: > >>> > >>> On 7/16/20 9:27 AM, Joonsoo Kim wrote: > &g

Re: [PATCH 2/4] mm/gup: restrict CMA region by using allocation scope API

2020-07-17 Thread Joonsoo Kim
2020년 7월 15일 (수) 오후 5:24, Michal Hocko 님이 작성: > > On Wed 15-07-20 14:05:27, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > We have well defined scope API to exclude CMA region. > > Use it rather than manipulating gfp_mask manually. With this change, > > we ca

Re: [PATCH 1/4] mm/page_alloc: fix non cma alloc context

2020-07-17 Thread Joonsoo Kim
2020년 7월 16일 (목) 오후 4:45, Vlastimil Babka 님이 작성: > > On 7/16/20 9:27 AM, Joonsoo Kim wrote: > > 2020년 7월 15일 (수) 오후 5:24, Vlastimil Babka 님이 작성: > >> > /* > >> > * get_page_from_freelist goes through the zonelist trying to allocate > >

Re: [PATCH 1/4] mm/page_alloc: fix non cma alloc context

2020-07-16 Thread Joonsoo Kim
2020년 7월 15일 (수) 오후 5:24, Vlastimil Babka 님이 작성: > > On 7/15/20 7:05 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > Currently, preventing cma area in page allocation is implemented by using > > current_gfp_context(). However, there are two probl

Re: [PATCH v5 5/9] mm/migrate: make a standard migration target allocation function

2020-07-13 Thread Joonsoo Kim
On Mon, Jul 13, 2020 at 09:53:40AM +0200, Vlastimil Babka wrote: > On 7/13/20 8:41 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > Nit: s/make/introduce/ in the subject, is a more common verb in this context. > Thanks for correcting! Following is fixe

Re: [PATCH v5 4/9] mm/migrate: clear __GFP_RECLAIM to make the migration callback consistent with regular THP allocations

2020-07-13 Thread Joonsoo Kim
On Mon, Jul 13, 2020 at 09:52:20AM +0200, Vlastimil Babka wrote: > On 7/13/20 8:41 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > new_page_nodemask is a migration callback and it tries to use a common > > gfp flags for the target page allocation whether it

Re: [PATCH v4 05/11] mm/migrate: clear __GFP_RECLAIM for THP allocation for migration

2020-07-09 Thread Joonsoo Kim
2020년 7월 7일 (화) 오후 9:17, Vlastimil Babka 님이 작성: > > On 7/7/20 9:44 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > In mm/migrate.c, THP allocation for migration is called with the provided > > gfp_mask | GFP_TRANSHUGE. This gfp_mask contains __GFP_RECLAI

Re: [PATCH v4 06/11] mm/migrate: make a standard migration target allocation function

2020-07-09 Thread Joonsoo Kim
2020년 7월 8일 (수) 오전 4:00, Michal Hocko 님이 작성: > > On Tue 07-07-20 16:49:51, Vlastimil Babka wrote: > > On 7/7/20 9:44 AM, js1...@gmail.com wrote: > > > From: Joonsoo Kim > > > > > > There are some similar functions for migration target allocation. Since &

Re: [PATCH v4 04/11] mm/hugetlb: make hugetlb migration callback CMA aware

2020-07-09 Thread Joonsoo Kim
2020년 7월 9일 (목) 오후 3:43, Michal Hocko 님이 작성: > > On Wed 08-07-20 09:41:06, Michal Hocko wrote: > > On Wed 08-07-20 16:16:02, Joonsoo Kim wrote: > > > On Tue, Jul 07, 2020 at 01:22:31PM +0200, Vlastimil Babka wrote: > > > > On 7/7/20 9:44 AM, js1...@gmail.com w

Re: [PATCH v4 05/11] mm/migrate: clear __GFP_RECLAIM for THP allocation for migration

2020-07-08 Thread Joonsoo Kim
2020년 7월 8일 (수) 오후 4:48, Michal Hocko 님이 작성: > > On Wed 08-07-20 16:19:17, Joonsoo Kim wrote: > > On Tue, Jul 07, 2020 at 01:40:19PM +0200, Michal Hocko wrote: > [...] > > Subject: [PATCH] mm/migrate: clear __GFP_RECLAIM for THP allocation for > > migration > > &

Re: [PATCH v4 11/11] mm/memory_hotplug: remove a wrapper for alloc_migration_target()

2020-07-08 Thread Joonsoo Kim
2020년 7월 8일 (수) 오전 1:34, Vlastimil Babka 님이 작성: > > On 7/7/20 9:44 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > To calculate the correct node to migrate the page for hotplug, we need > > to check node id of the page. Wrapper for alloc_migration_target

Re: [PATCH v4 07/11] mm/gup: use a standard migration target allocation callback

2020-07-08 Thread Joonsoo Kim
On Tue, Jul 07, 2020 at 01:46:14PM +0200, Michal Hocko wrote: > On Tue 07-07-20 16:44:45, Joonsoo Kim wrote: > [...] > > @@ -1551,9 +1552,12 @@ struct page *alloc_migration_target(struct page > > *page, unsigned long private) > > > >

Re: [PATCH v4 05/11] mm/migrate: clear __GFP_RECLAIM for THP allocation for migration

2020-07-08 Thread Joonsoo Kim
On Tue, Jul 07, 2020 at 01:40:19PM +0200, Michal Hocko wrote: > On Tue 07-07-20 16:44:43, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > In mm/migrate.c, THP allocation for migration is called with the provided > > gfp_mask | GFP_TRANSHUGE. This gfp_mask contains __G

Re: [PATCH v4 05/11] mm/migrate: clear __GFP_RECLAIM for THP allocation for migration

2020-07-08 Thread Joonsoo Kim
On Tue, Jul 07, 2020 at 02:17:55PM +0200, Vlastimil Babka wrote: > On 7/7/20 9:44 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > In mm/migrate.c, THP allocation for migration is called with the provided > > gfp_mask | GFP_TRANSHUGE. This gfp_

Re: [PATCH v4 04/11] mm/hugetlb: make hugetlb migration callback CMA aware

2020-07-08 Thread Joonsoo Kim
On Tue, Jul 07, 2020 at 01:22:31PM +0200, Vlastimil Babka wrote: > On 7/7/20 9:44 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > new_non_cma_page() in gup.c which try to allocate migration target page > > requires to allocate the new page

Re: [PATCH v4 04/11] mm/hugetlb: make hugetlb migration callback CMA aware

2020-07-08 Thread Joonsoo Kim
On Tue, Jul 07, 2020 at 01:31:16PM +0200, Michal Hocko wrote: > On Tue 07-07-20 16:44:42, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > new_non_cma_page() in gup.c which try to allocate migration target page > > requires to allocate the new page

Re: linux-next: Tree for Jul 6 (mm/memory_failure.c)

2020-07-06 Thread Joonsoo Kim
-------- >From 5fac269125dfb2d03e38a75319305e0e70b23a4b Mon Sep 17 00:00:00 2001 From: Joonsoo Kim Date: Tue, 7 Jul 2020 09:16:58 +0900 Subject: [PATCH] mm/migrate: fix for mm-migrate-make-a-standard-target-allocation-function.patch in mm tree new_page_nodemask() is renamed to allo

Re: [PATCH v3 8/8] mm/page_alloc: remove a wrapper for alloc_migration_target()

2020-07-06 Thread Joonsoo Kim
2020년 7월 4일 (토) 오전 1:18, Vlastimil Babka 님이 작성: > > On 6/23/20 8:13 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > There is a well-defined standard migration target callback. > > Use it directly. > > > > Signed-off-by: Joonsoo Kim > > A

Re: [PATCH v3 6/8] mm/gup: use a standard migration target allocation callback

2020-07-06 Thread Joonsoo Kim
2020년 7월 4일 (토) 오전 12:56, Vlastimil Babka 님이 작성: > > On 6/23/20 8:13 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > There is a well-defined migration target allocation callback. > > It's mostly similar with new_non_cma_page() except considering CMA pages.

Re: [PATCH v3 3/8] mm/hugetlb: unify migration callbacks

2020-07-02 Thread Joonsoo Kim
2020년 7월 3일 (금) 오전 1:13, Vlastimil Babka 님이 작성: > > On 6/26/20 6:02 AM, Joonsoo Kim wrote: > > 2020년 6월 25일 (목) 오후 8:26, Michal Hocko 님이 작성: > >> > >> On Tue 23-06-20 15:13:43, Joonsoo Kim wrote: > >> > From: Joonsoo Kim > >> > > &

Re: [PATCH v6 6/6] mm/vmscan: restore active/inactive ratio for anonymous LRU

2020-07-02 Thread Joonsoo Kim
2020년 7월 2일 (목) 오후 10:45, Vlastimil Babka 님이 작성: > > On 6/17/20 7:26 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > Now, workingset detection is implemented for anonymous LRU. > > We don't have to worry about the misfound for workingset due to > >

Re: [PATCH v6 5/6] mm/swap: implement workingset detection for anonymous LRU

2020-07-02 Thread Joonsoo Kim
2020년 7월 2일 (목) 오후 10:37, Vlastimil Babka 님이 작성: > > On 6/17/20 7:26 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > This patch implements workingset detection for anonymous LRU. > > All the infrastructure is implemented by the previous patches so

Re: [PATCH v6 3/6] mm/workingset: extend the workingset detection for anon LRU

2020-07-02 Thread Joonsoo Kim
2020년 7월 2일 (목) 오전 6:25, Vlastimil Babka 님이 작성: > > On 6/17/20 7:26 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > Hi, > > I would adjust the subject, as it sounds like the patch does the whole > workingset detection, not just preparation. > How abo

Re: [PATCH v6 2/6] mm/vmscan: protect the workingset on anonymous LRU

2020-07-02 Thread Joonsoo Kim
2020년 7월 2일 (목) 오전 3:02, Vlastimil Babka 님이 작성: > > On 6/17/20 7:26 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > Hi, how about a more descriptive subject, such as Hello, > mm/vmscan: add new anonymous pages to inactive LRU list This patch does two things to

Re: [PATCH v6 1/6] mm/vmscan: make active/inactive ratio as 1:1 for anon lru

2020-07-01 Thread Joonsoo Kim
2020년 7월 1일 (수) 오전 2:27, Vlastimil Babka 님이 작성: > > On 6/17/20 7:26 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > Current implementation of LRU management for anonymous page has some > > problems. Most important one is that it doesn't protect the

Re: [PATCH v3 4/8] mm/hugetlb: make hugetlb migration callback CMA aware

2020-06-30 Thread Joonsoo Kim
2020년 6월 30일 (화) 오후 3:42, Michal Hocko 님이 작성: > > On Tue 30-06-20 15:30:04, Joonsoo Kim wrote: > > 2020년 6월 29일 (월) 오후 4:55, Michal Hocko 님이 작성: > [...] > > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > > > index 57ece74e3aae..c1595b1d36f3 100644 > > > -

Re: [PATCH v3 5/8] mm/migrate: make a standard migration target allocation function

2020-06-30 Thread Joonsoo Kim
2020년 6월 29일 (월) 오후 5:03, Michal Hocko 님이 작성: > > On Mon 29-06-20 15:41:37, Joonsoo Kim wrote: > > 2020년 6월 26일 (금) 오후 4:33, Michal Hocko 님이 작성: > > > > > > On Fri 26-06-20 14:02:49, Joonsoo Kim wrote: > > > > 2020년 6월 25일 (목) 오후 9:05, Michal Hocko 님이 작성:

Re: [PATCH v3 4/8] mm/hugetlb: make hugetlb migration callback CMA aware

2020-06-30 Thread Joonsoo Kim
2020년 6월 29일 (월) 오후 4:55, Michal Hocko 님이 작성: > > On Mon 29-06-20 15:27:25, Joonsoo Kim wrote: > [...] > > Solution that Introduces a new > > argument doesn't cause this problem while avoiding CMA regions. > > My primary argument is that there is no real reason to treat

Re: [PATCH v3 5/8] mm/migrate: make a standard migration target allocation function

2020-06-29 Thread Joonsoo Kim
2020년 6월 26일 (금) 오후 4:33, Michal Hocko 님이 작성: > > On Fri 26-06-20 14:02:49, Joonsoo Kim wrote: > > 2020년 6월 25일 (목) 오후 9:05, Michal Hocko 님이 작성: > > > > > > On Tue 23-06-20 15:13:45, Joonsoo Kim wrote: > [...] > > > > -str

Re: [PATCH v3 4/8] mm/hugetlb: make hugetlb migration callback CMA aware

2020-06-29 Thread Joonsoo Kim
2020년 6월 26일 (금) 오후 4:23, Michal Hocko 님이 작성: > > On Fri 26-06-20 13:49:15, Joonsoo Kim wrote: > > 2020년 6월 25일 (목) 오후 8:54, Michal Hocko 님이 작성: > > > > > > On Tue 23-06-20 15:13:44, Joonsoo Kim wrote: > > > > From: Joonsoo Kim > > > > >

Re: [PATCH v6 0/6] workingset protection/detection on the anonymous LRU list

2020-06-25 Thread Joonsoo Kim
2020년 6월 17일 (수) 오후 2:26, 님이 작성: > > From: Joonsoo Kim > > Hello, > > This patchset implements workingset protection and detection on > the anonymous LRU list. > > * Changes on v6 > - rework to reflect a new LRU balance model > - remove memcg charge timing stuff o

Re: [PATCH v6 4/6] mm/swapcache: support to handle the exceptional entries in swapcache

2020-06-25 Thread Joonsoo Kim
2020년 6월 19일 (금) 오전 10:33, Joonsoo Kim 님이 작성: > > On Wed, Jun 17, 2020 at 05:17:17AM -0700, Matthew Wilcox wrote: > > On Wed, Jun 17, 2020 at 02:26:21PM +0900, js1...@gmail.com wrote: > > > From: Joonsoo Kim > > > > > > Swapcache doesn't handle the exc

Re: [PATCH v3 6/8] mm/gup: use a standard migration target allocation callback

2020-06-25 Thread Joonsoo Kim
2020년 6월 25일 (목) 오후 9:08, Michal Hocko 님이 작성: > > On Tue 23-06-20 15:13:46, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > There is a well-defined migration target allocation callback. > > It's mostly similar with new_non_cma_page() except considering CMA pages.

Re: [PATCH v3 5/8] mm/migrate: make a standard migration target allocation function

2020-06-25 Thread Joonsoo Kim
2020년 6월 25일 (목) 오후 9:05, Michal Hocko 님이 작성: > > On Tue 23-06-20 15:13:45, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > There are some similar functions for migration target allocation. Since > > there is no fundamental difference, it's better to keep just o

Re: [PATCH v3 4/8] mm/hugetlb: make hugetlb migration callback CMA aware

2020-06-25 Thread Joonsoo Kim
2020년 6월 25일 (목) 오후 8:54, Michal Hocko 님이 작성: > > On Tue 23-06-20 15:13:44, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > new_non_cma_page() in gup.c which try to allocate migration target page > > requires to allocate the new page that is not on the CMA area. >

Re: [PATCH v3 3/8] mm/hugetlb: unify migration callbacks

2020-06-25 Thread Joonsoo Kim
2020년 6월 25일 (목) 오후 8:26, Michal Hocko 님이 작성: > > On Tue 23-06-20 15:13:43, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > There is no difference between two migration callback functions, > > alloc_huge_page_node() and alloc_huge_page_nodemask(), except > >

Re: [PATCH v6 4/6] mm/swapcache: support to handle the exceptional entries in swapcache

2020-06-18 Thread Joonsoo Kim
On Wed, Jun 17, 2020 at 05:17:17AM -0700, Matthew Wilcox wrote: > On Wed, Jun 17, 2020 at 02:26:21PM +0900, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > Swapcache doesn't handle the exceptional entries since there is no case > > Don't call them exceptional e

Re: [PATCH for v5.8 2/3] mm/swap: fix for "mm: workingset: age nonresident information alongside anonymous pages"

2020-06-16 Thread Joonsoo Kim
age nonresident information alongside anonymous pages". > > > > Signed-off-by: Joonsoo Kim > > --- > > mm/swap.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/mm/swap.c b/mm/swap.c > > index 667133d..c5d5114 100644 &

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-06-16 Thread Joonsoo Kim
2020년 6월 15일 (월) 오후 10:41, Johannes Weiner 님이 작성: > > On Fri, Jun 12, 2020 at 12:19:58PM +0900, Joonsoo Kim wrote: > > 2020년 6월 5일 (금) 오전 12:06, Johannes Weiner 님이 작성: > > > > > > On Thu, Jun 04, 2020 at 03:35:27PM +0200, Vlastimil Babka wrote: > > > >

Re: [External] Re: [PATCH 3/3] mm/slub: Fix release all resources used by a slab cache

2020-06-15 Thread Joonsoo Kim
2020년 6월 15일 (월) 오후 3:41, Muchun Song 님이 작성: > > On Mon, Jun 15, 2020 at 2:23 PM Joonsoo Kim wrote: > > > > 2020년 6월 14일 (일) 오후 9:39, Muchun Song 님이 작성: > > > > > > The function of __kmem_cache_shutdown() is that release all resources > > > used by th

Re: [PATCH 3/3] mm/slub: Fix release all resources used by a slab cache

2020-06-15 Thread Joonsoo Kim
2020년 6월 14일 (일) 오후 9:39, Muchun Song 님이 작성: > > The function of __kmem_cache_shutdown() is that release all resources > used by the slab cache, while currently it stop release resources when > the preceding node is not empty. > > Signed-off-by: Muchun Song > --- > mm/slub.c | 7 --- > 1

Re: [PATCH 2/3] mm/slub: Use node_nr_slabs() instead of slabs_node()

2020-06-15 Thread Joonsoo Kim
2020년 6월 14일 (일) 오후 9:39, Muchun Song 님이 작성: > > In the some code, we already get the kmem_cache_node, so we can > use node_nr_slabs() directly instead of slabs_node(). Check the > condition of n->nr_partial can also be removed because we can get > the correct result via node_nr_slabs(). > >

Re: [PATCH 1/3] mm/slub: Fix slabs_node return value when CONFIG_SLUB_DEBUG disabled

2020-06-15 Thread Joonsoo Kim
2020년 6월 14일 (일) 오후 9:39, Muchun Song 님이 작성: > > The slabs_node() always return zero when CONFIG_SLUB_DEBUG is disabled. > But some codes determine whether slab is empty by checking the return > value of slabs_node(). As you know, the result is not correct. This > problem can be reproduce by the

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-06-11 Thread Joonsoo Kim
2020년 6월 5일 (금) 오전 12:06, Johannes Weiner 님이 작성: > > On Thu, Jun 04, 2020 at 03:35:27PM +0200, Vlastimil Babka wrote: > > On 6/1/20 10:44 PM, Johannes Weiner wrote: > > > From a8faceabc1454dfd878caee2a8422493d937a394 Mon Sep 17 00:00:00 2001 > > > From: Johannes Weiner > > > Date: Mon, 1 Jun 2020

Re: [patch 113/131] mm: balance LRU lists based on relative thrashing

2020-06-09 Thread Joonsoo Kim
2020년 6월 9일 (화) 오후 11:46, Johannes Weiner 님이 작성: > > On Tue, Jun 09, 2020 at 05:15:33PM +0800, Alex Shi wrote: > > > > > > 在 2020/6/4 上午7:03, Andrew Morton 写道: > > > > > > + /* XXX: Move to lru_cache_add() when it supports new vs putback */ > > > > Hi Hannes, > > > > Sorry for a bit lost, would

Re: [PATCH v2 07/12] mm/hugetlb: do not modify user provided gfp_mask

2020-06-09 Thread Joonsoo Kim
2020년 6월 9일 (화) 오후 10:54, Michal Hocko 님이 작성: > > On Wed 27-05-20 15:44:58, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > It's not good practice to modify user input. Instead of using it to > > build correct gfp_mask for APIs, this patch introduces another

Re: [PATCH v2 08/12] mm/migrate: change the interface of the migration target alloc/free functions

2020-06-09 Thread Joonsoo Kim
2020년 6월 9일 (화) 오후 11:04, Michal Hocko 님이 작성: > > On Wed 27-05-20 15:44:59, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > To prepare unifying duplicated functions in following patches, this patch > > changes the interface of the migration target alloc/free fu

Re: [PATCH v2 06/12] mm/hugetlb: make hugetlb migration target allocation APIs CMA aware

2020-06-09 Thread Joonsoo Kim
2020년 6월 9일 (화) 오후 10:53, Michal Hocko 님이 작성: > > On Wed 27-05-20 15:44:57, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > There is a user who do not want to use CMA memory for migration. Until > > now, it is implemented by caller side but it's not optimal since th

Re: [PATCH v2 05/12] mm/hugetlb: unify hugetlb migration callback function

2020-06-09 Thread Joonsoo Kim
2020년 6월 9일 (화) 오후 10:43, Michal Hocko 님이 작성: > > On Wed 27-05-20 15:44:56, Joonsoo Kim wrote: > [...] > > -/* page migration callback function */ > > struct page *alloc_huge_page_nodemask(struct hstate *h, > > struct alloc_control *ac) &g

Re: [PATCH v2 04/12] mm/hugetlb: use provided ac->gfp_mask for allocation

2020-06-09 Thread Joonsoo Kim
2020년 6월 9일 (화) 오후 10:26, Michal Hocko 님이 작성: > > On Wed 27-05-20 15:44:55, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > gfp_mask handling on alloc_huge_page_(node|nodemask) is > > slightly changed, from ASSIGN to OR. It's safe since caller of these > > f

Re: [PATCH v2 03/12] mm/hugetlb: introduce alloc_control structure to simplify migration target allocation APIs

2020-06-09 Thread Joonsoo Kim
2020년 6월 9일 (화) 오후 10:24, Michal Hocko 님이 작성: > > On Wed 27-05-20 15:44:54, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > Currently, page allocation functions for migration requires some arguments. > > More worse, in the following patch, more argument will be n

Re: [PATCH v5 00/10] workingset protection/detection on the anonymous LRU list

2020-06-02 Thread Joonsoo Kim
2020년 6월 3일 (수) 오후 12:57, Suren Baghdasaryan 님이 작성: > > On Wed, Apr 8, 2020 at 5:50 PM Joonsoo Kim wrote: > > > > 2020년 4월 9일 (목) 오전 1:55, Vlastimil Babka 님이 작성: > > > > > > On 4/3/20 7:40 AM, js1...@gmail.com wrote: > > > > From: Joonsoo Kim >

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-06-02 Thread Joonsoo Kim
2020년 6월 3일 (수) 오전 1:48, Johannes Weiner 님이 작성: > > On Tue, Jun 02, 2020 at 11:34:17AM +0900, Joonsoo Kim wrote: > > 2020년 6월 2일 (화) 오전 12:56, Johannes Weiner 님이 작성: > > > On Mon, Jun 01, 2020 at 03:14:24PM +0900, Joonsoo Kim wrote: > > > > But, I still think

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-06-01 Thread Joonsoo Kim
2020년 6월 2일 (화) 오전 12:56, Johannes Weiner 님이 작성: > > On Mon, Jun 01, 2020 at 03:14:24PM +0900, Joonsoo Kim wrote: > > 2020년 5월 30일 (토) 오전 12:12, Johannes Weiner 님이 작성: > > > > > > On Fri, May 29, 2020 at 03:48:00PM +0900, Joonsoo Kim wrote: > > > > 2020년

Re: [PATCH v2 00/12] clean-up the migration target allocation functions

2020-06-01 Thread Joonsoo Kim
2020년 5월 29일 (금) 오후 3:50, Joonsoo Kim 님이 작성: > > 2020년 5월 29일 (금) 오전 4:25, Vlastimil Babka 님이 작성: > > > > On 5/27/20 8:44 AM, js1...@gmail.com wrote: > > > From: Joonsoo Kim > > > > > > This patchset clean-up the migration target allocation functions.

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-06-01 Thread Joonsoo Kim
2020년 5월 30일 (토) 오전 12:12, Johannes Weiner 님이 작성: > > On Fri, May 29, 2020 at 03:48:00PM +0900, Joonsoo Kim wrote: > > 2020년 5월 29일 (금) 오전 2:02, Johannes Weiner 님이 작성: > > > On Thu, May 28, 2020 at 04:16:50PM +0900, Joonsoo Kim wrote: > > > > 2020년 5월 27일 (수

Re: [PATCH v2 00/12] clean-up the migration target allocation functions

2020-05-29 Thread Joonsoo Kim
2020년 5월 29일 (금) 오전 4:25, Vlastimil Babka 님이 작성: > > On 5/27/20 8:44 AM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > This patchset clean-up the migration target allocation functions. > > > > * Changes on v2 > > - add acked-by tags > > - f

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-05-29 Thread Joonsoo Kim
2020년 5월 29일 (금) 오전 2:02, Johannes Weiner 님이 작성: > > On Thu, May 28, 2020 at 04:16:50PM +0900, Joonsoo Kim wrote: > > 2020년 5월 27일 (수) 오후 10:43, Johannes Weiner 님이 작성: > > > > > > On Wed, May 27, 2020 at 11:06:47AM +0900, Joonsoo Kim wrote: > > > > 2020년

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-05-28 Thread Joonsoo Kim
2020년 5월 27일 (수) 오후 10:43, Johannes Weiner 님이 작성: > > On Wed, May 27, 2020 at 11:06:47AM +0900, Joonsoo Kim wrote: > > 2020년 5월 21일 (목) 오전 8:26, Johannes Weiner 님이 작성: > > > > > > We activate cache refaults with reuse distances in pages smaller than > > > t

Re: [PATCH 01/11] mm/page_isolation: prefer the node of the source page

2020-05-27 Thread Joonsoo Kim
> > > mm/page_isolation.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/mm/page_isolation.c b/mm/page_isolation.c > > > index 2c11a38..7df89bd 100644 > > > --- a/mm/page_isolation.c > > > +++ b/mm/page_isolation.c > > > @@ -300,5 +300,7 @@ int

Re: [PATCH 05/14] mm: workingset: let cache workingset challenge anon

2020-05-26 Thread Joonsoo Kim
2020년 5월 21일 (목) 오전 8:26, Johannes Weiner 님이 작성: > > We activate cache refaults with reuse distances in pages smaller than > the size of the total cache. This allows new pages with competitive > access frequencies to establish themselves, as well as challenge and > potentially displace pages on

Re: [PATCH 06/11] mm/hugetlb: do not modify user provided gfp_mask

2020-05-22 Thread Joonsoo Kim
2020년 5월 22일 (금) 오전 7:19, Mike Kravetz 님이 작성: > > On 5/17/20 6:20 PM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > It's not good practice to modify user input. Instead of using it to > > build correct gfp_mask for APIs, this patch introduces another

Re: [PATCH 04/11] mm/hugetlb: unify hugetlb migration callback function

2020-05-22 Thread Joonsoo Kim
2020년 5월 22일 (금) 오전 5:54, Mike Kravetz 님이 작성: > > On 5/17/20 6:20 PM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > There is no difference between two migration callback functions, > > alloc_huge_page_node() and alloc_huge_page_nodemask(), except > >

Re: [PATCH 03/11] mm/hugetlb: introduce alloc_control structure to simplify migration target allocation APIs

2020-05-21 Thread Joonsoo Kim
2020년 5월 22일 (금) 오전 3:57, Mike Kravetz 님이 작성: > > On 5/17/20 6:20 PM, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > Currently, page allocation functions for migration requires some arguments. > > More worse, in the following patch, more argument will be n

Re: [PATCH 04/11] mm/hugetlb: unify hugetlb migration callback function

2020-05-20 Thread Joonsoo Kim
2020년 5월 21일 (목) 오전 9:46, Roman Gushchin 님이 작성: > > On Mon, May 18, 2020 at 10:20:50AM +0900, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > There is no difference between two migration callback functions, > > alloc_huge_page_node() and alloc_huge_page_nodemas

Re: [PATCH 03/11] mm/hugetlb: introduce alloc_control structure to simplify migration target allocation APIs

2020-05-20 Thread Joonsoo Kim
2020년 5월 21일 (목) 오전 9:43, Roman Gushchin 님이 작성: > > On Mon, May 18, 2020 at 10:20:49AM +0900, js1...@gmail.com wrote: > > From: Joonsoo Kim > > > > Currently, page allocation functions for migration requires some arguments. > > More worse, in the following patch

  1   2   3   4   5   6   7   8   9   10   >