Date: Tue, 28 Mar 2017 10:56:47 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Mark Millard <markmi@dsl-only.net> Cc: Steven Hartland <killing@multiplay.co.uk>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, "K. Macy" <kmacy@freebsd.org> Subject: Re: Help needed to identify golang fork / memory corruption issue on FreeBSD Message-ID: <20170328075647.GP43712@kib.kiev.ua> In-Reply-To: <065E68C9-C9D5-4702-98A0-42E1A4FA8187@dsl-only.net> References: <CAHM0Q_Mg662u9D0KJ9knEWWqi9Ydy38qKDnjLt6XaS0ks%2B9-iw@mail.gmail.com> <18b40a69-4460-faf2-c0ce-7491eca92782@multiplay.co.uk> <20170317082333.GP16105@kib.kiev.ua> <180a601b-5481-bb41-f7fc-67976aabe451@multiplay.co.uk> <20170317124437.GR16105@kib.kiev.ua> <5ba92447-945e-6fea-ad4f-f58ac2a0012e@multiplay.co.uk> <20170327161833.GL43712@kib.kiev.ua> <3ec35a46-ae70-35cd-29f8-82e7cebb0eb6@multiplay.co.uk> <20170327164905.GN43712@kib.kiev.ua> <065E68C9-C9D5-4702-98A0-42E1A4FA8187@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 27, 2017 at 01:43:38PM -0700, Mark Millard wrote: > On 2017-Mar-27, at 9:49 AM, Konstantin Belousov <kostikbel@gmail.com> wrote: > > > On Mon, Mar 27, 2017 at 05:33:49PM +0100, Steven Hartland wrote: > >> On 27/03/2017 17:18, Konstantin Belousov wrote: > . . . > >> I noticed in vm_map_copy_entry the following: > >> /* > >> * We don't want to make writeable wired pages > >> copy-on-write. > >> * Immediately copy these pages into the new map by > >> simulating > >> * page faults. The new pages are pageable. > >> */ > >> vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry, > >> fork_charge); > >> > >> I wondered if I could use vm_fault_copy_entry to force the copy on fork? > > No, the vm_fault_copy_entry() only works with wired entries, e.g. it cannot > > page in not yet touched page, and the result is also wired. > . . . > > I'm confused by the comment vs. the above note: > > Comment: The new pages are pageable. > This note: the result is also wired Yes, my note about destination state is not true. Still, the code cannot page in source pages, and the intent of the note above was that shadow chain for the destination entry will be invalid even if required page-ins were done. > > So pagable wired pages? Incorrect comment? Comment > that needs more context specified so the interpretation > is clearer? > > > === > Mark Millard > markmi at dsl-only.net >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170328075647.GP43712>