search for: location_to_obj

Displaying 20 results from an estimated 20 matches for "location_to_obj".

2016 Mar 30
0
[PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping
...st_page, unsigned int *class_idx, enum fullness_group *fullness) @@ -837,30 +854,33 @@ static struct page *get_next_page(struct page *page) return next; } -/* - * Encode <page, obj_idx> as a single handle value. - * We use the least bit of handle for tagging. - */ -static void *location_to_obj(struct page *page, unsigned long obj_idx) +static void objidx_to_page_and_offset(struct size_class *class, + struct page *first_page, + unsigned long obj_idx, + struct page **obj_page, + unsigned long *offset_in_page) { - unsigned long obj; + int i; + unsigned long offset; + struct pag...
2016 Mar 11
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...st_page, unsigned int *class_idx, enum fullness_group *fullness) @@ -832,30 +849,33 @@ static struct page *get_next_page(struct page *page) return next; } -/* - * Encode <page, obj_idx> as a single handle value. - * We use the least bit of handle for tagging. - */ -static void *location_to_obj(struct page *page, unsigned long obj_idx) +static void objidx_to_page_and_ofs(struct size_class *class, + struct page *first_page, + unsigned long obj_idx, + struct page **obj_page, + unsigned long *ofs_in_page) { - unsigned long obj; + int i; + unsigned long ofs; + struct page *cursor...
2016 Mar 15
2
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
On (03/11/16 16:30), Minchan Kim wrote: > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > +static void objidx_to_page_and_ofs(struct size_class *class, > + struct page *first_page, > + unsigned long obj_idx, > + struct page **obj_page, > + unsigned long *ofs_in_page) this looks big; 5 params, function "returnin...
2016 Mar 15
2
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
On (03/11/16 16:30), Minchan Kim wrote: > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > +static void objidx_to_page_and_ofs(struct size_class *class, > + struct page *first_page, > + unsigned long obj_idx, > + struct page **obj_page, > + unsigned long *ofs_in_page) this looks big; 5 params, function "returnin...
2016 Mar 17
1
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
On 2016/3/15 14:51, Minchan Kim wrote: > On Tue, Mar 15, 2016 at 03:40:53PM +0900, Sergey Senozhatsky wrote: >> On (03/11/16 16:30), Minchan Kim wrote: >>> -static void *location_to_obj(struct page *page, unsigned long obj_idx) >>> +static void objidx_to_page_and_ofs(struct size_class *class, >>> + struct page *first_page, >>> + unsigned long obj_idx, >>> + struct page **obj_page, >>> + unsigned long *ofs_in_page) >> &...
2016 Mar 17
1
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
On 2016/3/15 14:51, Minchan Kim wrote: > On Tue, Mar 15, 2016 at 03:40:53PM +0900, Sergey Senozhatsky wrote: >> On (03/11/16 16:30), Minchan Kim wrote: >>> -static void *location_to_obj(struct page *page, unsigned long obj_idx) >>> +static void objidx_to_page_and_ofs(struct size_class *class, >>> + struct page *first_page, >>> + unsigned long obj_idx, >>> + struct page **obj_page, >>> + unsigned long *ofs_in_page) >> &...
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...p(first_page); > + newfg = get_fullness_group(class, first_page); > if (newfg == currfg) > goto out; > > @@ -1003,9 +1003,6 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) > init_zspage(class, first_page); > > first_page->freelist = location_to_obj(first_page, 0); > - /* Maximum number of objects we can store in this zspage */ > - first_page->objects = class->pages_per_zspage * PAGE_SIZE / class->size; > - > error = 0; /* Success */ > > cleanup: > @@ -1235,11 +1232,11 @@ static bool can_merge(struct size_cla...
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...p(first_page); > + newfg = get_fullness_group(class, first_page); > if (newfg == currfg) > goto out; > > @@ -1003,9 +1003,6 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) > init_zspage(class, first_page); > > first_page->freelist = location_to_obj(first_page, 0); > - /* Maximum number of objects we can store in this zspage */ > - first_page->objects = class->pages_per_zspage * PAGE_SIZE / class->size; > - > error = 0; /* Success */ > > cleanup: > @@ -1235,11 +1232,11 @@ static bool can_merge(struct size_cla...
2016 Mar 15
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
On Tue, Mar 15, 2016 at 03:40:53PM +0900, Sergey Senozhatsky wrote: > On (03/11/16 16:30), Minchan Kim wrote: > > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > > +static void objidx_to_page_and_ofs(struct size_class *class, > > + struct page *first_page, > > + unsigned long obj_idx, > > + struct page **obj_page, > > + unsigned long *ofs_in_page) > > this looks big...
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 11
0
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...amp;currfg); - newfg = get_fullness_group(first_page); + newfg = get_fullness_group(class, first_page); if (newfg == currfg) goto out; @@ -1003,9 +1003,6 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) init_zspage(class, first_page); first_page->freelist = location_to_obj(first_page, 0); - /* Maximum number of objects we can store in this zspage */ - first_page->objects = class->pages_per_zspage * PAGE_SIZE / class->size; - error = 0; /* Success */ cleanup: @@ -1235,11 +1232,11 @@ static bool can_merge(struct size_class *prev, int size, int pages_per_z...
2016 Mar 30
0
[PATCH v3 05/16] zsmalloc: keep max_object in size_class
...amp;currfg); - newfg = get_fullness_group(first_page); + newfg = get_fullness_group(class, first_page); if (newfg == currfg) goto out; @@ -1008,9 +1008,6 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) init_zspage(class, first_page); first_page->freelist = location_to_obj(first_page, 0); - /* Maximum number of objects we can store in this zspage */ - first_page->objects = class->pages_per_zspage * PAGE_SIZE / class->size; - error = 0; /* Success */ cleanup: @@ -1238,11 +1235,11 @@ static bool can_merge(struct size_class *prev, int size, int pages_per_z...
2016 Mar 14
0
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...get_fullness_group(class, first_page); > > if (newfg == currfg) > > goto out; > > > >@@ -1003,9 +1003,6 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) > > init_zspage(class, first_page); > > > > first_page->freelist = location_to_obj(first_page, 0); > >- /* Maximum number of objects we can store in this zspage */ > >- first_page->objects = class->pages_per_zspage * PAGE_SIZE / class->size; > >- > > error = 0; /* Success */ > > > > cleanup: > >@@ -1235,11 +1232,11 @@ static b...
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 11
0
[PATCH v1 06/19] zsmalloc: clean up many BUG_ON
...x_fullness_group(struct size_class *class, int class_idx; enum fullness_group currfg, newfg; - BUG_ON(!is_first_page(first_page)); - get_zspage_mapping(first_page, &class_idx, &currfg); newfg = get_fullness_group(first_page); if (newfg == currfg) @@ -806,7 +805,7 @@ static void *location_to_obj(struct page *page, unsigned long obj_idx) unsigned long obj; if (!page) { - BUG_ON(obj_idx); + VM_BUG_ON(obj_idx); return NULL; } @@ -839,7 +838,7 @@ static unsigned long obj_to_head(struct size_class *class, struct page *page, void *obj) { if (class->huge) { - VM_BUG_ON(!...
2016 Mar 11
0
[PATCH v1 07/19] zsmalloc: reordering function parameter
...t page *first_page) { unsigned long off = 0; struct page *page = first_page; @@ -998,7 +1000,7 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) prev_page = page; } - init_zspage(first_page, class); + init_zspage(class, first_page); first_page->freelist = location_to_obj(first_page, 0); /* Maximum number of objects we can store in this zspage */ @@ -1345,8 +1347,8 @@ void zs_unmap_object(struct zs_pool *pool, unsigned long handle) } EXPORT_SYMBOL_GPL(zs_unmap_object); -static unsigned long obj_malloc(struct page *first_page, - struct size_class *class, unsig...
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.