Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1336006
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge' |
| Date | 2016-02-17 03:30 +0100 |
| Message-ID | <r302l-87j-3@gated-at.bofh.it> (permalink) |
| References | <r2Zzl-7EN-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello,
On (02/17/16 09:56), YiPing Xu wrote:
> static int create_handle_cache(struct zs_pool *pool)
> @@ -1127,11 +1126,9 @@ static void __zs_unmap_object(struct mapping_area *area,
> goto out;
>
> buf = area->vm_buf;
> - if (!area->huge) {
> - buf = buf + ZS_HANDLE_SIZE;
> - size -= ZS_HANDLE_SIZE;
> - off += ZS_HANDLE_SIZE;
> - }
> + buf = buf + ZS_HANDLE_SIZE;
> + size -= ZS_HANDLE_SIZE;
> + off += ZS_HANDLE_SIZE;
>
> sizes[0] = PAGE_SIZE - off;
> sizes[1] = size - sizes[0];
hm, indeed.
shouldn't it depend on class->huge?
void *zs_map_object()
{
void *ret = __zs_map_object(area, pages, off, class->size);
if (!class->huge)
ret += ZS_HANDLE_SIZE; /* area->vm_buf + ZS_HANDLE_SIZE */
return ret;
}
static void __zs_unmap_object(struct mapping_area *area...)
{
char *buf = area->vm_buf;
/* handle is in page->private for class->huge */
buf = buf + ZS_HANDLE_SIZE;
size -= ZS_HANDLE_SIZE;
off += ZS_HANDLE_SIZE;
memcpy(..);
}
-ss
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] zsmalloc: drop unused member 'mapping_area->huge' YiPing Xu <xuyiping@huawei.com> - 2016-02-17 03:00 +0100
Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge' Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-02-17 03:30 +0100
Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge' xuyiping <xuyiping@hisilicon.com> - 2016-02-17 04:40 +0100
Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge' Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-02-17 05:00 +0100
Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge' Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-02-17 06:20 +0100
Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge' Minchan Kim <minchan@kernel.org> - 2016-02-17 16:40 +0100
csiph-web