search for: zs_empty

Displaying 20 results from an estimated 22 matches for "zs_empty".

2016 Apr 18
2
[PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage
...gt; @@ -1835,23 +1827,31 @@ static void __zs_compact(struct zs_pool *pool, struct size_class *class) > if (!migrate_zspage(pool, class, &cc)) > break; > > - putback_zspage(pool, class, dst_page); > + VM_BUG_ON_PAGE(putback_zspage(pool, class, > + dst_page) == ZS_EMPTY, dst_page); can this VM_BUG_ON_PAGE() condition ever be true? > } > /* Stop if we couldn't find slot */ > if (dst_page == NULL) > break; > - putback_zspage(pool, class, dst_page); > - if (putback_zspage(pool, class, src_page) == ZS_EMPTY) > + VM_BUG_ON_PAG...
2016 Apr 18
2
[PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage
...gt; @@ -1835,23 +1827,31 @@ static void __zs_compact(struct zs_pool *pool, struct size_class *class) > if (!migrate_zspage(pool, class, &cc)) > break; > > - putback_zspage(pool, class, dst_page); > + VM_BUG_ON_PAGE(putback_zspage(pool, class, > + dst_page) == ZS_EMPTY, dst_page); can this VM_BUG_ON_PAGE() condition ever be true? > } > /* Stop if we couldn't find slot */ > if (dst_page == NULL) > break; > - putback_zspage(pool, class, dst_page); > - if (putback_zspage(pool, class, src_page) == ZS_EMPTY) > + VM_BUG_ON_PAG...
2016 Mar 30
0
[PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage
Currently, putback_zspage does free zspage under class->lock if fullness become ZS_EMPTY but it makes trouble to implement locking scheme for new zspage migration. So, this patch is to separate free_zspage from putback_zspage and free zspage out of class->lock which is preparation for zspage migration. Signed-off-by: Minchan Kim <minchan at kernel.org> --- mm/zsmalloc.c | 46...
2016 Apr 19
0
[PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage
...atic void __zs_compact(struct zs_pool *pool, struct size_class *class) > > if (!migrate_zspage(pool, class, &cc)) > > break; > > > > - putback_zspage(pool, class, dst_page); > > + VM_BUG_ON_PAGE(putback_zspage(pool, class, > > + dst_page) == ZS_EMPTY, dst_page); > > can this VM_BUG_ON_PAGE() condition ever be true? I guess it is remained thing after I rebased to catch any mistake. But I'm heavily chainging this part. Please review next version instead of this after a few days. :) > > > } > > /* Stop if we coul...
2016 Mar 30
33
[PATCH v3 00/16] Support non-lru page migration
Recently, I got many reports about perfermance degradation in embedded system(Android mobile phone, webOS TV and so on) and failed to fork easily. The problem was fragmentation caused by zram and GPU driver pages. Their pages cannot be migrated so compaction cannot work well, either so reclaimer ends up shrinking all of working set pages. It made system very slow and even to fail to fork easily.
2016 Mar 30
33
[PATCH v3 00/16] Support non-lru page migration
Recently, I got many reports about perfermance degradation in embedded system(Android mobile phone, webOS TV and so on) and failed to fork easily. The problem was fragmentation caused by zram and GPU driver pages. Their pages cannot be migrated so compaction cannot work well, either so reclaimer ends up shrinking all of working set pages. It made system very slow and even to fail to fork easily.
2016 Mar 11
31
[PATCH v1 00/19] Support non-lru page migration
Recently, I got many reports about perfermance degradation in embedded system(Android mobile phone, webOS TV and so on) and failed to fork easily. The problem was fragmentation caused by zram and GPU driver pages. Their pages cannot be migrated so compaction cannot work well, either so reclaimer ends up shrinking all of working set pages. It made system very slow and even to fail to fork easily.
2016 Mar 11
31
[PATCH v1 00/19] Support non-lru page migration
Recently, I got many reports about perfermance degradation in embedded system(Android mobile phone, webOS TV and so on) and failed to fork easily. The problem was fragmentation caused by zram and GPU driver pages. Their pages cannot be migrated so compaction cannot work well, either so reclaimer ends up shrinking all of working set pages. It made system very slow and even to fail to fork easily.
2016 Mar 30
0
[PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping
...* (reason above) */ -#define ZS_SIZE_CLASS_DELTA (PAGE_SIZE >> 8) +#define ZS_SIZE_CLASS_DELTA (PAGE_SIZE >> CLASS_BITS) /* * We do not maintain any list for completely empty or full pages @@ -155,7 +161,7 @@ enum fullness_group { ZS_ALMOST_EMPTY, _ZS_NR_FULLNESS_GROUPS, - ZS_EMPTY, + ZS_EMPTY = _ZS_NR_FULLNESS_GROUPS, ZS_FULL }; @@ -263,14 +269,11 @@ struct zs_pool { #endif }; -/* - * A zspage's class index and fullness group - * are encoded in its (first)page->mapping - */ -#define CLASS_IDX_BITS 28 -#define FULLNESS_BITS 4 -#define CLASS_IDX_MASK ((1 <&l...
2016 Mar 21
22
[PATCH v2 00/18] Support non-lru page migration
Recently, I got many reports about perfermance degradation in embedded system(Android mobile phone, webOS TV and so on) and failed to fork easily. The problem was fragmentation caused by zram and GPU driver pages. Their pages cannot be migrated so compaction cannot work well, either so reclaimer ends up shrinking all of working set pages. It made system very slow and even to fail to fork easily.
2016 Mar 21
22
[PATCH v2 00/18] Support non-lru page migration
Recently, I got many reports about perfermance degradation in embedded system(Android mobile phone, webOS TV and so on) and failed to fork easily. The problem was fragmentation caused by zram and GPU driver pages. Their pages cannot be migrated so compaction cannot work well, either so reclaimer ends up shrinking all of working set pages. It made system very slow and even to fail to fork easily.
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...bjs_per_zspage; > enum fullness_group fg; > > VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > > inuse = first_page->inuse; > - max_objects = first_page->objects; > + objs_per_zspage = class->objs_per_zspage; > > if (inuse == 0) > fg = ZS_EMPTY; > - else if (inuse == max_objects) > + else if (inuse == objs_per_zspage) > fg = ZS_FULL; > - else if (inuse <= 3 * max_objects / fullness_threshold_frac) > + else if (inuse <= 3 * objs_per_zspage / fullness_threshold_frac) > fg = ZS_ALMOST_EMPTY; > else >...
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...bjs_per_zspage; > enum fullness_group fg; > > VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > > inuse = first_page->inuse; > - max_objects = first_page->objects; > + objs_per_zspage = class->objs_per_zspage; > > if (inuse == 0) > fg = ZS_EMPTY; > - else if (inuse == max_objects) > + else if (inuse == objs_per_zspage) > fg = ZS_FULL; > - else if (inuse <= 3 * max_objects / fullness_threshold_frac) > + else if (inuse <= 3 * objs_per_zspage / fullness_threshold_frac) > fg = ZS_ALMOST_EMPTY; > else >...
2016 Mar 11
0
[PATCH v1 08/19] zsmalloc: remove unused pool param in obj_free
...rst_page, *f_page; @@ -1482,7 +1481,7 @@ void zs_free(struct zs_pool *pool, unsigned long handle) class = pool->size_class[class_idx]; spin_lock(&class->lock); - obj_free(pool, class, obj); + obj_free(class, obj); fullness = fix_fullness_group(class, first_page); if (fullness == ZS_EMPTY) { zs_stat_dec(class, OBJ_ALLOCATED, get_maxobj_per_zspage( @@ -1645,7 +1644,7 @@ static int migrate_zspage(struct zs_pool *pool, struct size_class *class, free_obj |= BIT(HANDLE_PIN_BIT); record_obj(handle, free_obj); unpin_tag(handle); - obj_free(pool, class, used_obj); + obj_free(c...
2016 Mar 11
0
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...page) { - int inuse, max_objects; + int inuse, objs_per_zspage; enum fullness_group fg; VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); inuse = first_page->inuse; - max_objects = first_page->objects; + objs_per_zspage = class->objs_per_zspage; if (inuse == 0) fg = ZS_EMPTY; - else if (inuse == max_objects) + else if (inuse == objs_per_zspage) fg = ZS_FULL; - else if (inuse <= 3 * max_objects / fullness_threshold_frac) + else if (inuse <= 3 * objs_per_zspage / fullness_threshold_frac) fg = ZS_ALMOST_EMPTY; else fg = ZS_ALMOST_FULL; @@ -723,7 +723,7 @@...
2016 Mar 30
0
[PATCH v3 05/16] zsmalloc: keep max_object in size_class
...page) { - int inuse, max_objects; + int inuse, objs_per_zspage; enum fullness_group fg; VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); inuse = first_page->inuse; - max_objects = first_page->objects; + objs_per_zspage = class->objs_per_zspage; if (inuse == 0) fg = ZS_EMPTY; - else if (inuse == max_objects) + else if (inuse == objs_per_zspage) fg = ZS_FULL; - else if (inuse <= 3 * max_objects / fullness_threshold_frac) + else if (inuse <= 3 * objs_per_zspage / fullness_threshold_frac) fg = ZS_ALMOST_EMPTY; else fg = ZS_ALMOST_FULL; @@ -728,7 +728,7 @@...
2016 Mar 14
0
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...roup fg; > > > > VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > > > > inuse = first_page->inuse; > >- max_objects = first_page->objects; > >+ objs_per_zspage = class->objs_per_zspage; > > > > if (inuse == 0) > > fg = ZS_EMPTY; > >- else if (inuse == max_objects) > >+ else if (inuse == objs_per_zspage) > > fg = ZS_FULL; > >- else if (inuse <= 3 * max_objects / fullness_threshold_frac) > >+ else if (inuse <= 3 * objs_per_zspage / fullness_threshold_frac) > > fg = ZS_ALMOST_E...
2016 Mar 11
0
[PATCH v1 05/19] zsmalloc: use first_page rather than page
...*first_page) { int inuse, max_objects; enum fullness_group fg; - BUG_ON(!is_first_page(page)); + BUG_ON(!is_first_page(first_page)); - inuse = page->inuse; - max_objects = page->objects; + inuse = first_page->inuse; + max_objects = first_page->objects; if (inuse == 0) fg = ZS_EMPTY; @@ -647,12 +649,12 @@ static enum fullness_group get_fullness_group(struct page *page) * have. This functions inserts the given zspage into the freelist * identified by <class, fullness_group>. */ -static void insert_zspage(struct page *page, struct size_class *class, +static void inse...
2016 Mar 11
0
[PATCH v1 07/19] zsmalloc: reordering function parameter
...ness_group putback_zspage(struct zs_pool *pool, enum fullness_group fullness; fullness = get_fullness_group(first_page); - insert_zspage(first_page, class, fullness); + insert_zspage(class, fullness, first_page); set_zspage_mapping(first_page, class->index, fullness); if (fullness == ZS_EMPTY) { @@ -1709,7 +1711,7 @@ static struct page *isolate_source_page(struct size_class *class) if (!page) continue; - remove_zspage(page, class, i); + remove_zspage(class, i, page); break; } @@ -1943,7 +1945,7 @@ struct zs_pool *zs_create_pool(const char *name, gfp_t flags) pool-&...
2016 Mar 21
0
[PATCH v2 17/18] zsmalloc: migrate tail pages in zspage
...int zs_page_migrate(struct address_space *mapping, struct page *newpage, kunmap_atomic(addr); replace_sub_page(class, first_page, newpage, page); - first_page = newpage; + first_page = get_first_page(newpage); get_page(newpage); VM_BUG_ON_PAGE(get_fullness_group(class, first_page) == ZS_EMPTY, first_page); - ClearZsPageIsolate(first_page); - putback_zspage(class, first_page); + if (!check_isolated_page(first_page)) { + INIT_LIST_HEAD(&first_page->lru); + ClearZsPageIsolate(first_page); + putback_zspage(class, first_page); + } + /* Migration complete. Free old page */ res...