Date: Sat, 14 May 2016 00:34:34 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: Konstantin Belousov <kostikbel@gmail.com> Cc: threads@freebsd.org, arch@freebsd.org Subject: Re: Robust mutexes implementation Message-ID: <20160513223434.GA47987@stack.nl> In-Reply-To: <20160513201916.GF89104@kib.kiev.ua> References: <20160505131029.GE2422@kib.kiev.ua> <20160506233011.GA99994@stack.nl> <20160507165956.GC89104@kib.kiev.ua> <20160508125222.GA48862@stack.nl> <20160509025107.GN89104@kib.kiev.ua> <20160513153716.GA30576@stack.nl> <20160513201916.GF89104@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 13, 2016 at 11:19:16PM +0300, Konstantin Belousov wrote: > On Fri, May 13, 2016 at 05:37:16PM +0200, Jilles Tjoelker wrote: > > On Mon, May 09, 2016 at 05:51:07AM +0300, Konstantin Belousov wrote: > > The mmap() page in POSIX.1-2008tc1 XSH 3 has: > > ] The state of synchronization objects such as mutexes, semaphores, > > ] barriers, and conditional variables placed in shared memory mapped > > ] with MAP_SHARED becomes undefined when the last region in any process > > ] containing the synchronization object is unmapped. > > This is new in issue 7 (SUSv4): > > ] Austin Group Interpretations 1003.1-2001 #078 and #079 are applied, > > ] clarifying page alignment requirements and adding a note about the > > ] state of synchronization objects becoming undefined when a shared > > ] region is unmapped. > Very interesting, thanks. > BTW, is there a chance of Austin Group get notified of, and possibly > adopting, MAP_EXCL flag ? You could send a message to the mailing list. MAP_EXCL is not used in the FreeBSD base but Debian code search shows Chromium and Hurd ftpfs mentioning it in comments. > > > Current updates to the patch > > > https://kib.kiev.ua/kib/pshared/robust.4.patch > Do you have any further notes, or do you want to give the patch more time ? > If not, are you fine with 'Reviewed by' attribution ? I don't trust the if (umtx_shm_vnobj_persistent) in sys/vm/vnode_pager.c: + if (umtx_shm_vnobj_persistent) + umtx_shm_object_terminated(obj); If umtx_shm_vnobj_persistent is turned off via sysctl between the check in sys/vm/vm_object.c and this one, don't we have a leak? 'Reviewed by: jilles' is fine otherwise. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160513223434.GA47987>