Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Minchan Kim
On Thu, May 26, 2016 at 09:59:26AM +0900, Sergey Senozhatsky wrote: > btw, I've uploaded zram-fio test script to > https://github.com/sergey-senozhatsky/zram-perf-test > > it's very minimalistic and half baked, but can be used > to some degree. open to patches, improvements, etc. Awesome!

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Minchan Kim
On Thu, May 26, 2016 at 09:59:26AM +0900, Sergey Senozhatsky wrote: > btw, I've uploaded zram-fio test script to > https://github.com/sergey-senozhatsky/zram-perf-test > > it's very minimalistic and half baked, but can be used > to some degree. open to patches, improvements, etc. Awesome!

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Sergey Senozhatsky
Hello Minchan, On (05/26/16 09:32), Minchan Kim wrote: [..] > Unfortunately, I don't have now. However, I don't feel we need a data for > that because *unbounded work* within VM interaction context is bad. ;-) fair enough, even though the shrinker doesn't put any constraints here. > > hm,

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Sergey Senozhatsky
Hello Minchan, On (05/26/16 09:32), Minchan Kim wrote: [..] > Unfortunately, I don't have now. However, I don't feel we need a data for > that because *unbounded work* within VM interaction context is bad. ;-) fair enough, even though the shrinker doesn't put any constraints here. > > hm,

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Minchan Kim
Hi Sergey, On Thu, May 26, 2016 at 12:23:45AM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (05/25/16 14:14), Minchan Kim wrote: > [..] > > > > do you also want to kick the deferred page release from the shrinker > > > > callback, for example? > > > > > > Yeb, it can be. I will do it

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Minchan Kim
Hi Sergey, On Thu, May 26, 2016 at 12:23:45AM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (05/25/16 14:14), Minchan Kim wrote: > [..] > > > > do you also want to kick the deferred page release from the shrinker > > > > callback, for example? > > > > > > Yeb, it can be. I will do it

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Sergey Senozhatsky
Hello Minchan, On (05/25/16 14:14), Minchan Kim wrote: [..] > > > do you also want to kick the deferred page release from the shrinker > > > callback, for example? > > > > Yeb, it can be. I will do it at next revision. :) > > Thanks! > > > > I tried it now but I feel strongly we want to fix

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-25 Thread Sergey Senozhatsky
Hello Minchan, On (05/25/16 14:14), Minchan Kim wrote: [..] > > > do you also want to kick the deferred page release from the shrinker > > > callback, for example? > > > > Yeb, it can be. I will do it at next revision. :) > > Thanks! > > > > I tried it now but I feel strongly we want to fix

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Minchan Kim
Hello Sergey, On Tue, May 24, 2016 at 03:28:01PM +0900, Minchan Kim wrote: > > hm... zsmalloc is getting sooo complex now. > > > > `system_wq' -- can we have problems here when the system is getting > > low on memory and workers are getting increasingly busy trying to > > allocate the memory

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Minchan Kim
Hello Sergey, On Tue, May 24, 2016 at 03:28:01PM +0900, Minchan Kim wrote: > > hm... zsmalloc is getting sooo complex now. > > > > `system_wq' -- can we have problems here when the system is getting > > low on memory and workers are getting increasingly busy trying to > > allocate the memory

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Minchan Kim
On Tue, May 24, 2016 at 05:05:11PM +0900, Sergey Senozhatsky wrote: > Hello, > > On (05/24/16 15:28), Minchan Kim wrote: > [..] > > Most important point to me is that it makes code *simple* at the cost of > > addtional wasting memory. Now, every zspage lives in *a* list so we don't > > need to

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Minchan Kim
On Tue, May 24, 2016 at 05:05:11PM +0900, Sergey Senozhatsky wrote: > Hello, > > On (05/24/16 15:28), Minchan Kim wrote: > [..] > > Most important point to me is that it makes code *simple* at the cost of > > addtional wasting memory. Now, every zspage lives in *a* list so we don't > > need to

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Sergey Senozhatsky
Hello, On (05/24/16 15:28), Minchan Kim wrote: [..] > Most important point to me is that it makes code *simple* at the cost of > addtional wasting memory. Now, every zspage lives in *a* list so we don't > need to check zspage groupness to use list_empty of zspage. > I'm not sure how you feel it

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Sergey Senozhatsky
Hello, On (05/24/16 15:28), Minchan Kim wrote: [..] > Most important point to me is that it makes code *simple* at the cost of > addtional wasting memory. Now, every zspage lives in *a* list so we don't > need to check zspage groupness to use list_empty of zspage. > I'm not sure how you feel it

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Minchan Kim
On Tue, May 24, 2016 at 02:28:24PM +0900, Sergey Senozhatsky wrote: > On (05/20/16 23:23), Minchan Kim wrote: > [..] > > +static int get_zspage_isolation(struct zspage *zspage) > > +{ > > + return zspage->isolated; > > +} > > + > > may be is_zspage_isolated()? Now, it would be better. I will

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-24 Thread Minchan Kim
On Tue, May 24, 2016 at 02:28:24PM +0900, Sergey Senozhatsky wrote: > On (05/20/16 23:23), Minchan Kim wrote: > [..] > > +static int get_zspage_isolation(struct zspage *zspage) > > +{ > > + return zspage->isolated; > > +} > > + > > may be is_zspage_isolated()? Now, it would be better. I will

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-23 Thread Sergey Senozhatsky
On (05/20/16 23:23), Minchan Kim wrote: [..] > +static int get_zspage_isolation(struct zspage *zspage) > +{ > + return zspage->isolated; > +} > + may be is_zspage_isolated()? [..] > @@ -502,23 +556,19 @@ static int get_size_class_index(int size) > static inline void zs_stat_inc(struct

Re: [PATCH v6 11/12] zsmalloc: page migration support

2016-05-23 Thread Sergey Senozhatsky
On (05/20/16 23:23), Minchan Kim wrote: [..] > +static int get_zspage_isolation(struct zspage *zspage) > +{ > + return zspage->isolated; > +} > + may be is_zspage_isolated()? [..] > @@ -502,23 +556,19 @@ static int get_size_class_index(int size) > static inline void zs_stat_inc(struct

[PATCH v6 11/12] zsmalloc: page migration support

2016-05-20 Thread Minchan Kim
This patch introduces run-time migration feature for zspage. For migration, VM uses page.lru field so it would be better to not use page.next field which is unified with page.lru for own purpose. For that, firstly, we can get first object offset of the page via runtime calculation instead of

[PATCH v6 11/12] zsmalloc: page migration support

2016-05-20 Thread Minchan Kim
This patch introduces run-time migration feature for zspage. For migration, VM uses page.lru field so it would be better to not use page.next field which is unified with page.lru for own purpose. For that, firstly, we can get first object offset of the page via runtime calculation instead of