ocated objects in the zspage with pinning tag so
user cannot free using object. With those functions, this patch
redesign compaction.
Those functions will be used for implementing zspage runtime
migrations, too.
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c
, too right
before calling ->migratepage so such race doesn't exist any more.
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 291 +++---
1 file changed, 280 insertions(+), 11 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc
ode 0, zone DMA214 66 87 29 10 3 0 0
0 0 0
Node 0, zoneDMA32 1612 3139 3154 2469 1745990384 94
7 0 0
As you can see, compaction made so many high-order pages. Yay!
Signed-off-by: Minchan Kim
---
driver
be replaced in run-time calculation.
So, this patch change page->lru list for chaining with singly
linked list via page->freelist squeeze and introduces
get_first_obj_ofs to get first object offset in a page.
With that, it could maintain page chaining without using
page->lru.
Signed
For supporting migration from VM, we need to have address_space
on every page so zsmalloc shouldn't use page->mapping. So,
this patch moves zs_meta from mapping to freelist.
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 23 ---
1 file changed, 12 insertions(+), 11 d
zspage migration.
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 46 +++---
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index f86f8aaeb902..49ae6531b7ad 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -945,7
Zsmalloc stores first free object's position into first_page->freelist
in each zspage. If we change it with object index from first_page
instead of location, we could squeeze it into page->mapping because
the number of bit we need to store offset is at most 11bit.
Signed-off-by:
d-off-by: Minchan Kim
---
mm/zsmalloc.c | 78 ++-
1 file changed, 45 insertions(+), 33 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index bfc6a048afac..f86f8aaeb902 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -977,7 +
could squeeze inuse object count to page->mapping.
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 103 --
1 file changed, 71 insertions(+), 32 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index ca663c82c1fc..954e8758a78d 100644
4. If migration fails, putback function of subsystem should
clear PG_isolated via ClearPageIsolated.
Cc: Vlastimil Babka
Cc: Mel Gorman
Cc: Hugh Dickins
Cc: dri-de...@lists.freedesktop.org
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Gioh Kim
Signed-off-by: Minch
Every zspage in a size_class has same number of max objects so
we could move it to a size_class.
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 29 ++---
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index b4fb11831acb
nctions and make balloon compaction simple.
Cc: virtualization@lists.linux-foundation.org
Cc: Rafael Aquini
Cc: Konstantin Khlebnikov
Signed-off-by: Gioh Kim
Signed-off-by: Minchan Kim
---
drivers/virtio/virtio_balloon.c| 4 ++
include/linux/balloon_compaction.h | 47 ---
f-by: Gioh Kim
Signed-off-by: Minchan Kim
---
fs/anon_inodes.c| 6 ++
include/linux/anon_inodes.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index 80ef38c73e5a..1d51f96acdd9 100644
--- a/fs/anon_inodes.c
+++ b/fs/anon_inodes.c
@@ -162
This patch cleans up function parameter ordering to order
higher data structure first.
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 50 ++
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index
tions so higher functions
can rely on the assertion in the primitive function.
4. Don't use assertion if following instruction can trigger Oops
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 42 +++---
1 file changed, 15 insertions(+), 27 deletions(-)
di
This patch cleans up function parameter "struct page".
Many functions of zsmalloc expects that page paramter is "first_page"
so use "first_page" rather than "page" for code readability.
Signed-off-
Let's remove unused pool param in obj_free
Signed-off-by: Minchan Kim
---
mm/zsmalloc.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 156edf909046..b4fb11831acb 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1435,8 +1
Mel Gorman
Cc: Hugh Dickins
Cc: Naoya Horiguchi
Signed-off-by: Minchan Kim
---
mm/migrate.c | 49 ++---
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 3ad0fea5c438..bf31ea9ffaf8 100644
--- a/mm/migrate.
ed list for page chain
zsmalloc: migrate tail pages in zspage
zram: use __GFP_MOVABLE for memory allocation
Gioh Kim (1):
fs/anon_inodes: new interface to create new inode
Minchan Kim (18):
mm: use put_page to free page instead of putback_lru_page
mm/compaction: support non-lru movable pag
On Sun, Jan 10, 2016 at 11:40:17PM +0200, Michael S. Tsirkin wrote:
> On Mon, Jan 04, 2016 at 09:27:47AM +0900, Minchan Kim wrote:
> > > I think this will cause deadlocks.
> > >
> > > pages_lock now nests within page lock, balloon_page_putback
> > > nests
On Fri, Jan 08, 2016 at 02:56:14PM -0500, Rafael Aquini wrote:
> On Fri, Jan 01, 2016 at 11:36:13AM +0200, Michael S. Tsirkin wrote:
> > On Mon, Dec 28, 2015 at 08:35:13AM +0900, Minchan Kim wrote:
> > > In balloon_page_dequeue, pages_lock should cover the loop
> > > (i
On Fri, Jan 01, 2016 at 11:36:13AM +0200, Michael S. Tsirkin wrote:
> On Mon, Dec 28, 2015 at 08:35:13AM +0900, Minchan Kim wrote:
> > In balloon_page_dequeue, pages_lock should cover the loop
> > (ie, list_for_each_entry_safe). Otherwise, the cursor page could
> > be isola
so struct virtio_balloon fields could be overwritten by race
of fill_balloon(e,g, vb->*pfns could be critical).
This patch fixes it in my test.
Cc:
Signed-off-by: Minchan Kim
---
drivers/virtio/virtio_balloon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virti
ce buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Cc:
Signed-off-by: Minchan Kim
---
mm/balloon_compaction.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index d3116be5a00f..300117f1a08f 100644
--- a/mm/balloon_com
On Fri, Jul 31, 2015 at 07:43:09PM +0900, Minchan Kim wrote:
> Hi Gioh,
>
> On Mon, Jul 13, 2015 at 05:35:17PM +0900, Gioh Kim wrote:
> > From: Gioh Kim
> >
> > Add framework to register callback functions and check page mobility.
> > There are some modes f
Hi Gioh,
On Mon, Jul 13, 2015 at 05:35:17PM +0900, Gioh Kim wrote:
> From: Gioh Kim
>
> Add framework to register callback functions and check page mobility.
> There are some modes for page isolation so that isolate interface
> has arguments of page address and isolation mode while putback
> int
>>page.
> >>>>
> >>>>My ARM-based platform occured severe fragmentation problem after long-term
> >>>>(several days) test. Sometimes even order-3 page allocation failed. It has
> >>>>memory size 512MB ~ 1024MB. 30% ~ 40% memory is con
times even order-3 page allocation failed. It has
> memory size 512MB ~ 1024MB. 30% ~ 40% memory is consumed for graphic
> processing
> and 20~30 memory is reserved for zram.
>
> I found that many pages of GPU driver and zram are non-movable pages. So I
> reported Minchan Kim, the mai
+ if (unlikely(isolated_migratable_page(page)))
> + page->mapping->a_ops->putbackpage(page);
> else
> putback_lru_page(page);
As I said, how about having putback_lru_page for
page->mapping->a_ops->putb
ages().
>
> Signed-off-by: Rafael Aquini
Reviewed-by: Minchan Kim
Thanks for your good work, Rafael.
--
Kind regards,
Minchan Kim
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
e them movable by memory
> compaction procedures.
>
> Signed-off-by: Rafael Aquini
Reviewed-by: Minchan Kim
--
Kind regards,
Minchan Kim
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
gt; @@ -79,7 +79,10 @@ void putback_lru_pages(struct list_head *l)
> list_del(&page->lru);
> dec_zone_page_state(page, NR_ISOLATED_ANON +
> page_is_file_cache(page));
> - putback_lru_page(page);
> + if (unlikely(movable_balloon_page(page)))
> + WARN_ON(!putback_balloon_page(page));
> + else
> + putback_lru_page(page);
> }
Don't hack putback_lru_pages. It's a function for handling LRU pages
and is used by several places.
Plz, don't add complexity to unrelavant parts.
You can define a new function putback_migratepages should be used as pair with
isolate_migratepages_range so that both functions are aware of balloon page.
IMHO, it's better abstraction rather than hook of generic function.
Otherwise, Looks good to me.
Thanks.
--
Kind regards,
Minchan Kim
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Mon, Jul 23, 2012 at 11:33:32AM +0900, Minchan Kim wrote:
> Hi Rafael,
>
> On Fri, Jul 20, 2012 at 04:48:59PM -0300, Rafael Aquini wrote:
> > Howdy Minchan,
> >
> > Once again, thanks for raising such valuable feedback over here.
> >
> > On Wed, Jul 18
Hi Rafael,
On Fri, Jul 20, 2012 at 04:48:59PM -0300, Rafael Aquini wrote:
> Howdy Minchan,
>
> Once again, thanks for raising such valuable feedback over here.
>
> On Wed, Jul 18, 2012 at 02:48:24PM +0900, Minchan Kim wrote:
> > > +/* __isolate_lru_page() counterp
}
> out:
> if (rc != -EAGAIN) {
> /*
> --
> 1.7.10.4
The feeling I look at your code in detail is that it makes compaction/migration
code rather complicated because compaction/migration assumes source/target would
be LRU pages.
How often memory balloo
e callbacks are used at isolate_balloon_page() &
> putback_balloon_page(). What do you think?
>
>
I am not strongly against you.
It trivial nitpick must not prevent your great work. :)
Thanks!
--
Kind regards,
Minchan Kim
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
>* Corner case handling:
>* 1. When a new swap-cache page is read into, it is added to the LRU
> @@ -852,6 +866,20 @@ static int unmap_and_move(new_page_t get_new_page,
> unsigned long private,
> goto out;
>
> rc = __un
ns, we allocates ballooned page
as a movable page in guest-side because they can be migrated easily so
compaction of
guest-side could put together them into either side so that we can get
contiguous memory.
For it, compaction should be aware of ballooned page.
Right?
--
Kind rega
Hi Rafael,
On Fri, Jun 29, 2012 at 02:36:54PM -0300, Rafael Aquini wrote:
> On Fri, Jun 29, 2012 at 02:32:11PM +0900, Minchan Kim wrote:
> > On 06/29/2012 06:49 AM, Rafael Aquini wrote:
> >
> > > This patch introduces the helper functions as well as the necessary
>
essage to [EMAIL PROTECTED]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Kinds regards,
MinChan Kim
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization
101 - 140 of 140 matches
Mail list logo