search for: objidx_to_page_and_ofs

Displaying 11 results from an estimated 11 matches for "objidx_to_page_and_ofs".

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 "returning" both page and offset... any chance to split it in two steps, perhaps? besi...
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 "returning" both page and offset... any chance to split it in two steps, perhaps? besi...
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) >> >> this looks big; 5 params, function "returning" both page and offset... &g...
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) >> >> this looks big; 5 params, function "returning" both page and offset... &g...
2016 Mar 11
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...ss) @@ -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; + int nr_page; - if (!page) { - VM_BUG_ON(obj_idx); - return NULL; - } +...
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; 5 params, function "returning" both page and offset... > any chance to sp...
2016 Mar 11
0
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...or) && first_page) { - free_zspage(first_page); - first_page = NULL; - } - return first_page; } @@ -1419,7 +1432,6 @@ static unsigned long obj_malloc(struct size_class *class, unsigned long m_offset; void *vaddr; - handle |= OBJ_ALLOCATED_TAG; obj = get_freeobj(first_page); objidx_to_page_and_ofs(class, first_page, obj, &m_page, &m_offset); @@ -1429,10 +1441,10 @@ static unsigned long obj_malloc(struct size_class *class, set_freeobj(first_page, link->next >> OBJ_ALLOCATED_TAG); if (!class->huge) /* record handle in the header of allocated chunk */ - link-&gt...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...rst_page = NULL; > - } > - > return first_page; > } > > @@ -1419,7 +1432,6 @@ static unsigned long obj_malloc(struct size_class *class, > unsigned long m_offset; > void *vaddr; > > - handle |= OBJ_ALLOCATED_TAG; > obj = get_freeobj(first_page); > objidx_to_page_and_ofs(class, first_page, obj, > &m_page, &m_offset); > @@ -1429,10 +1441,10 @@ static unsigned long obj_malloc(struct size_class *class, > set_freeobj(first_page, link->next >> OBJ_ALLOCATED_TAG); > if (!class->huge) > /* record handle in the header of a...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...rst_page = NULL; > - } > - > return first_page; > } > > @@ -1419,7 +1432,6 @@ static unsigned long obj_malloc(struct size_class *class, > unsigned long m_offset; > void *vaddr; > > - handle |= OBJ_ALLOCATED_TAG; > obj = get_freeobj(first_page); > objidx_to_page_and_ofs(class, first_page, obj, > &m_page, &m_offset); > @@ -1429,10 +1441,10 @@ static unsigned long obj_malloc(struct size_class *class, > set_freeobj(first_page, link->next >> OBJ_ALLOCATED_TAG); > if (!class->huge) > /* record handle in the header of a...
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.