From owner-freebsd-current@freebsd.org Sat Jun 4 19:11:24 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A5F4B6AEF4 for ; Sat, 4 Jun 2016 19:11:24 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from mail.auburn.protected-networks.net (mail.auburn.protected-networks.net [IPv6:2001:470:1f07:4e1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.auburn.protected-networks.net", Issuer "Protected Networks Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A359115D; Sat, 4 Jun 2016 19:11:24 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [192.168.1.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: imb@mail.auburn.protected-networks.net) by mail.auburn.protected-networks.net (Postfix) with ESMTPSA id 085411CC10; Sat, 4 Jun 2016 15:11:21 -0400 (EDT) Subject: Re: repeatable panic on pageout with 945GM To: Konstantin Belousov References: <2490f1c7-8153-ece3-49ed-4b3886564fd7@protected-networks.net> <205d4423-b834-9a21-785f-fa15d44c78ec@protected-networks.net> <1551419a1db.12929035f45012.326107747932338888@nextbsd.org> <939f9d2b-e925-e8e0-0ff3-8d90623728c6@protected-networks.net> <1551c5dbd86.c68532b5123717.566503881838650848@nextbsd.org> <20160604174745.GB38613@kib.kiev.ua> <88ad4228-2583-8a91-1751-d16f7a51de91@protected-networks.net> <20160604190237.GD38613@kib.kiev.ua> Cc: Matthew Macy , "freebsd-current@freebsd.org" , alc@freebsd.org From: Michael Butler Openpgp: id=6F63E6399DCC8E3E94D60F0642FF6BAE0442D492 Message-ID: Date: Sat, 4 Jun 2016 15:11:21 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160604190237.GD38613@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2016 19:11:24 -0000 On 06/04/16 15:02, Konstantin Belousov wrote: > On Sat, Jun 04, 2016 at 02:59:01PM -0400, Michael Butler wrote: >> On 06/04/16 13:47, Konstantin Belousov wrote: >> >> [ .. snip .. ] >> >>> I believe that this is a bug in amd64 pmap. Fictitious pages are not >>> promoted, in particular, the pv_table array does not span over the >>> dynamically registered fictitious ranges. As result, pa_to_pvh() returns >>> garbage and pvh must not be accessed in the case of 'small_mappings' in >>> several pmap functions. It is typically not accessed, except in case >>> when we have to drop and reacquire pv lock, to avoid LOR with pmap. >>> >>> i386 does not have the issue, due to pvh_global_lock. >>> >>> Below is the supposed fix (not tested). >> >> [ .. snip .. ] >> >> Is this something I should test and, should it not introduce any other >> issues, might get committed? > > Would be nice to test. I expect that this patch is going to be committed, > after the review. > I will do so this evening and add a kprintf to the previous band-aid to see if it prevents the problematic condition from occurring. If it counts, my test laptop has a Core-2 Duo so it is entirely possible that multiple threads are running concurrently, imb