Date: Mon, 27 Mar 2017 13:43:38 -0700 From: Mark Millard <markmi@dsl-only.net> To: Konstantin Belousov <kostikbel@gmail.com> 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: <065E68C9-C9D5-4702-98A0-42E1A4FA8187@dsl-only.net> In-Reply-To: <20170327164905.GN43712@kib.kiev.ua> References: <20161206143532.GR54029@kib.kiev.ua> <e160381c-9935-6edf-04a9-1ff78e95d818@multiplay.co.uk> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
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=20 >> copy-on-write. >> * Immediately copy these pages into the new map by=20= >> simulating >> * page faults. The new pages are pageable. >> */ >> vm_fault_copy_entry(dst_map, src_map, dst_entry, = src_entry, >> fork_charge); >>=20 >> 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 So pagable wired pages? Incorrect comment? Comment that needs more context specified so the interpretation is clearer? =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?065E68C9-C9D5-4702-98A0-42E1A4FA8187>