Re: [Chapter Two] THP shattering: the reverse of collapsing

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

 



> In contrast to split, shatter migrates occupied pages in a partially
> mapped THP to a bunch of base folios. IOW, unlike split done in place,
> shatter is the exact opposite of collapse.
> 
> +static void copy_page_owner(struct folio *src)
> +{
> +	int i;
> +	int nr_pages = folio_nr_pages(src);
> +
> +	if (folio_can_split(src))
> +		return;
> +
> +	if (WARN_ON_ONCE(!src->_dst_pp))
> +		return;
> +
> +	for (i = 0; i < nr_pages; i++) {
> +		struct page *dst = folio_dst_page(src, i);
> +
> +		if (dst)
> +			folio_copy_owner(src, page_folio(dst));

folio_copy_owner(page_folio(dst), src) ?

or can we drop this? then dst will have shatter as allocation
stack. this seems more helpful for debugging.
or it is even better we can reflect both the src pageowner and
shatter stack by enhancing pageowner mechinism?

> +	}
> +}

Thanks
Barry




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

  Powered by Linux