Re: [RFC 2/3] hugetlbfs: coordinate global and subpool reserve accounting

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

 



> @@ -3444,10 +3445,14 @@ int hugetlb_reserve_pages(struct inode *inode,
>  	 * Check enough hugepages are available for the reservation.
>  	 * Hand the pages back to the subpool if there are not
>  	 */

Better if comment is updated correspondingly.
Hillf
> -	ret = hugetlb_acct_memory(h, chg);
> -	if (ret < 0) {
> -		hugepage_subpool_put_pages(spool, chg);
> -		goto out_err;
> +	if (subpool_reserved(spool))
> +		ret = 0;
> +	else {
> +		ret = hugetlb_acct_memory(h, chg);
> +		if (ret < 0) {
> +			hugepage_subpool_put_pages(spool, chg);
> +			goto out_err;
> +		}
>  	}
> 

--
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]