Re: [PATCH v2 3/7] zsmalloc: support compaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Heesub,

On Thu, Mar 05, 2015 at 02:18:17PM +0900, Heesub Shin wrote:
> Hello Minchan,
> 
> Nice work!

Thanks. :)

> 
> On 03/04/2015 02:01 PM, Minchan Kim wrote:
> > +static void putback_zspage(struct zs_pool *pool, struct size_class *class,
> > +				struct page *first_page)
> > +{
> > +	int class_idx;
> > +	enum fullness_group fullness;
> > +
> > +	BUG_ON(!is_first_page(first_page));
> > +
> > +	get_zspage_mapping(first_page, &class_idx, &fullness);
> > +	insert_zspage(first_page, class, fullness);
> > +	fullness = fix_fullness_group(class, first_page);
> 
> Removal and re-insertion of zspage above can be eliminated, like this:
> 
> 	fullness = get_fullness_group(first_page);
> 	insert_zspage(first_page, class, fullness);
> 	set_zspage_mapping(first_page, class->index, fullness);

True.

Thanks for the review!

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]