From owner-freebsd-current@FreeBSD.ORG Sat Apr 11 17:57:17 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98DE2E1B; Sat, 11 Apr 2015 17:57:17 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 600BB132; Sat, 11 Apr 2015 17:57:16 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id t3BHstpn022562; Sat, 11 Apr 2015 12:57:15 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp1.rice.edu with ESMTP id 1tkfwnkmka-1; Sat, 11 Apr 2015 12:57:15 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 89E994C0266; Sat, 11 Apr 2015 12:57:14 -0500 (CDT) Message-ID: <55296079.2010104@rice.edu> Date: Sat, 11 Apr 2015 12:57:13 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Svatopluk Kraus , freebsd-current@freebsd.org, alc@freebsd.org Subject: Re: [patch] deadlock in vm_reserv_reclaim_contig() References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=11 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1504110143 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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, 11 Apr 2015 17:57:17 -0000 On 04/10/2015 04:11, Svatopluk Kraus wrote: > Hi, > > my RPI-B has been stuck in vm_reserv_reclaim_contig() due to a bug > within that function. I can reproduce that easily on my two-core > pandaboard when I limit all memory in system to 128MiB and run "make > -j16 kernel-toolchain". It happens in few seconds. > > The patch should be self-explanatory. The problem is that there is a > free page found in reservation which does not fulfill alignment > requirement, thus next free page should be looked for. However, due to > the bug, the same free page is found out again and again. > > The patch takes into account that shift by m on n-bit arch has an > undefined behaviour if m >=3D n. > The patch looks correct. I'm just going to tweak the comment, and then I'll commit it.