On 10/7/13 23:30 , Alexander Pyhalov wrote:
> I'm just a bit confused: is munmap supposed to wait for something in any
> case? I thought it just have to return with error if something is wrong...

Yes, munmap is supposed to actually unmap things before it returns.
Specifically you're probably at this line of code:

http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/vm/vm_as.c#1480

Starting here
http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/vm/vm_as.c#1240
is a block comment that describes some of the things that we're waiting
for. I'm not sure which of these applies.

> It seems that application also uses madvise with MADV_WILLNEED on its
> mapped memory. Can it influence the munmap behavior?

Hard to say for certain. The VM subsystem is notoriously tricky. But all
this appears to do is start an asynchronous fault of the pages. Does the
program also do something like lock memory or use aio?

Robert


-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to