From owner-freebsd-current@freebsd.org Sat Jan 9 19:50:29 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 F1C71A6A5AE for ; Sat, 9 Jan 2016 19:50:28 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 C057E1BC2; Sat, 9 Jan 2016 19:50:28 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id 77so285181691ioc.2; Sat, 09 Jan 2016 11:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=q//E5tkH+pYwzid5UqiE8CgycvDV5DcKDoCiStmvVgM=; b=capIiqT4fJhahKxnO8qNuvG0XKPuxlZrF6hXrL3EwhZqMK8tM3SZ6ukGshGhvzc7Qr D1El/LXNh3oJgJrR36MmT8uKVCr2VjLA4JhfNQUZ4E5L1r+xtYWHoWpqH+LyiV3nYNaU FiHuAbYKCGyvIZCvEr0gfcuP+dHseL6adUWflq6sCrZZ/pPXuTtWoQIIx9Oo5MPBT+qc P1UmNIxSF/1aWbKBJuRthuByPCFITaEqo5RqVaOn7BvzCoZsjkFI11GTeRMF2MpOe241 YN25HQbgPD676z/amxhoWauOypmJMDh/iEkXrfrBwiLkw3fjqi55pa2KVJlgasEPgd+s dr0w== MIME-Version: 1.0 X-Received: by 10.107.17.144 with SMTP id 16mr85234454ior.109.1452369028272; Sat, 09 Jan 2016 11:50:28 -0800 (PST) Received: by 10.79.84.71 with HTTP; Sat, 9 Jan 2016 11:50:28 -0800 (PST) Reply-To: alc@freebsd.org In-Reply-To: References: <201601090453.u094rcKk002334@slippy.cwsent.com> Date: Sat, 9 Jan 2016 13:50:28 -0600 Message-ID: Subject: Re: Panic from vesa_configure() From: Alan Cox To: Adrian Chadd Cc: Cy Schubert , John Baldwin , Jeremie Le Hen , Ryan Stone , FreeBSD Current , =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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, 09 Jan 2016 19:50:29 -0000 On Sat, Jan 9, 2016 at 12:44 AM, Adrian Chadd wrote: > It shouldn't have changed though; you're just requesting memory to use > for x86bios calls. > > +jhb - any ideas? > > Yes, there is insufficient free (or reclaimable) physical memory below 1MB, so contigmalloc() fails. This is almost certainly a side-effect of r292469, specifically, this part: "Make vm_phys_alloc_contig() a little smarter (and more efficient in some cases). Specifically, use vm_phys_segs[] earlier to avoid scanning free page lists that can't possibly contain suitable pages. That part of the change has altered the order in which we allocate from the free lists corresponding to different ranges of physical addresses, so contigmalloc(low=0, high=4GB) might well consume memory from physical addresses [0, 1MB), whereas before it wouldn't consume such physical memory as long as physical memory between 16MB and 4GB was available. > > > > On 8 January 2016 at 20:53, Cy Schubert wrote: > > Cy Schubert writes: > >> In message <201601080107.u0817kDw078603@slippy.cwsent.com>, Cy Schubert > >> writes: > >> > In message > >> c > >> > om> > >> > , Adrian Chadd writes: > >> > > Ok, > >> > > > >> > > So try adding this check: > >> > > > >> > > vmbuf = x86bios_alloc(&offs, sizeof(*buf), M_WAITOK); > >> > > if (vmbuf == NULL) { > >> > > printf("%s: x86bios_alloc failed!\n", __func__); > >> > > goto fail; > >> > > } > >> > > > >> > > ... that call shouldn't be failing, but if it's truely failing on > the > >> > > bcopy(), the only reason is because vmbuf is NULL. > >> > > >> > Thanks. I'll try this. > >> > > >> > vesa.c hasn't changed for a while so I suspect the root cuase may be > >> > somewhere else (we're probably treating the symptom here). Nice thing > about > >> > >> > using the same mobo and cpu combination on all my machines (except > >> > laptops), failures are completely reproducible. Might be a good idea > to put > >> > >> > in a dtrace probe too. > >> > >> Hi Adrian, > >> > >> Your patch fixed the issue. I've included a dtrace probe. I suspect the > >> error may be BIOS specific and the dtrace probe should help in tracking > it > >> down. Does this look good to commit? > > > > A bit of multitasking going on here. I should have included the patch. :~ > > > > > > > > > > Cheers, > > Cy Schubert or > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >