Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2018 10:32:47 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Pratyush Yadav <pratyush@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: Can contigmalloc(9) fail even when M_NOWAIT is *not* specified?
Message-ID:  <77cc8c09-41e1-cbdf-7c79-90af75ee3cd9@FreeBSD.org>
In-Reply-To: <CA%2BX=3T%2BBbcfY1BFGze=scxXFNPkh7Pn-Qx1kKGURi00adHCquw@mail.gmail.com>
References:  <CA%2BX=3T%2BBbcfY1BFGze=scxXFNPkh7Pn-Qx1kKGURi00adHCquw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09/07/2018 09:21, Pratyush Yadav wrote:
> Hi,
> 
> The contigmalloc(9) man page says:
> 
>> The contigmalloc() function does not sleep waiting for memory resources
>> to be freed up, but instead actively reclaims pages before giving up.
>> However, unless M_NOWAIT is specified, it may select a page for reclama-
>> tion that must first be written to backing storage, causing it to sleep.
> 
> So if M_NOWAIT is *not* specified, can contigmalloc() "give up", and
> return NULL?

Yes.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?77cc8c09-41e1-cbdf-7c79-90af75ee3cd9>