From owner-freebsd-current@FreeBSD.ORG Sun Apr 12 18:38:40 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EE7FC71; Sun, 12 Apr 2015 18:38:40 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 062656D7; Sun, 12 Apr 2015 18:38:40 +0000 (UTC) Received: by iget9 with SMTP id t9so43231109ige.1; Sun, 12 Apr 2015 11:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cp5okzjZ50RLSreGC4QQVFTwY/LUhapIw98j9hTwRe8=; b=Kk+YD6R3D6w/Q967Alz5Rsgt1gPVfy3sg92IhT8jJWAPPtqaBHxAFeIM7UjKt3ccZH Q5yydUXOaWxXqakbZpwjn4GbBX/XembD/0oalxL2oBRtLCFXecOKVBKRUV1bz42gsuF0 2uc7TgrTOl7udCV5dPExnBLvKEzlP1ZELCoPrzXAsABaG7nP//O2enkcm6UtvYdWL6E0 AYwZj/kHV02XKk0VZGX9oYc9idFjYJBEqiN9vN9ZAMI6fETi0q2t+oUnhi3/pKUcBWh5 XtOnpfakO/90d390F6oA0LksiY/yYkkHbSYxi7XhYM4Mqqm9B85IfQtOzc6JgtLdo2eq 0L6w== MIME-Version: 1.0 X-Received: by 10.42.27.14 with SMTP id h14mr14651921icc.19.1428863919345; Sun, 12 Apr 2015 11:38:39 -0700 (PDT) Received: by 10.64.28.43 with HTTP; Sun, 12 Apr 2015 11:38:39 -0700 (PDT) In-Reply-To: <55296079.2010104@rice.edu> References: <55296079.2010104@rice.edu> Date: Sun, 12 Apr 2015 20:38:39 +0200 Message-ID: Subject: Re: [patch] deadlock in vm_reserv_reclaim_contig() From: Svatopluk Kraus To: Alan Cox Content-Type: text/plain; charset=UTF-8 Cc: alc@freebsd.org, freebsd-current@freebsd.org 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: Sun, 12 Apr 2015 18:38:40 -0000 On Sat, Apr 11, 2015 at 7:57 PM, Alan Cox wrote: > 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 >= n. >> > > The patch looks correct. I'm just going to tweak the comment, and then > I'll commit it. > Thank you. Svatopluk Kraus