lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-id: <660418108.41771426835194470.JavaMail.weblogic@epmlwas06d>
Date:	Fri, 20 Mar 2015 07:06:37 +0000 (GMT)
From:	Yinghao Xie <yinghao.xie@...sung.com>
To:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan@...nel.org>,
	Nitin Gupta <ngupta@...are.org>, mm <linux-mm@...ck.org>,
	lkml <linux-kernel@...r.kernel.org>,
	"sergey.senozhatsky@...il.com" <sergey.senozhatsky@...il.com>
Subject: Re: Re: mm/zsmalloc.c: count in handle's size when calculating
 pages_per_zspage

> Hello,
> 
> sorry, I've a question.
> 
> On (03/19/15 11:39), Yinghao Xie wrote:
> > @@ -1426,11 +1430,6 @@ unsigned long zs_malloc(struct zs_pool *pool,
> size_t size)
> >  	/* extra space in chunk to keep the handle */
> >  	size += ZS_HANDLE_SIZE;
> >  	class = pool->size_class[get_size_class_index(size)];
> > -	/* In huge class size, we store the handle into first_page->private */
> > -	if (class->huge) {
> > -		size -= ZS_HANDLE_SIZE;
> > -		class = pool->size_class[get_size_class_index(size)];
> > -	}
> 
> if huge class uses page->private to store a handle, shouldn't we pass "size -=
> ZS_HANDLE_SIZE" to get_size_class_index() ?
> 
> 	-ss
> 
yes, you're right.it's my misunderstanding, thanks.

> >  	spin_lock(&class->lock);
> >  	first_page = find_get_zspage(class); @@ -1856,9 +1855,7 @@ struct
> > zs_pool *zs_create_pool(char *name, gfp_t flags)
> >  		struct size_class *class;
> >
> >  		size = ZS_MIN_ALLOC_SIZE + i * ZS_SIZE_CLASS_DELTA;
> > -		if (size > ZS_MAX_ALLOC_SIZE)
> > -			size = ZS_MAX_ALLOC_SIZE;
> > -		pages_per_zspage = get_pages_per_zspage(size);
> > +		pages_per_zspage = get_pages_per_zspage(size +
> ZS_HANDLE_SIZE);
> >
> >  		/*
> >  		 * size_class is used for normal zsmalloc operation such

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ