[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Can contigmalloc(9) fail even when M_NOWAIT is *not* specified?
From:       "O'Connor, Daniel" <darius () dons ! net ! au>
Date:       2018-07-10 1:52:34
Message-ID: 51DA0343-0B43-4BC6-B736-DA52493C26F8 () dons ! net ! au
[Download RAW message or body]



> On 9 Jul 2018, at 17:02, Andriy Gapon <avg@freebsd.org> wrote:
> 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.

This seems pretty surprising to me.. Perhaps the man page could have a warning about \
it - right now it fairly strongly implies that !M_NOWAIT will wait forever.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum


_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic