From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 13 01:40:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1974B85 for ; Mon, 13 Jan 2014 01:40:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD3181343 for ; Mon, 13 Jan 2014 01:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s0D1e0e4054625 for ; Mon, 13 Jan 2014 01:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s0D1e0fG054624; Mon, 13 Jan 2014 01:40:00 GMT (envelope-from gnats) Resent-Date: Mon, 13 Jan 2014 01:40:00 GMT Resent-Message-Id: <201401130140.s0D1e0fG054624@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alfred Perlstein Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B86D7A49 for ; Mon, 13 Jan 2014 01:33:18 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A43E81316 for ; Mon, 13 Jan 2014 01:33:18 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0D1XIel094431 for ; Mon, 13 Jan 2014 01:33:18 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0D1XI7G094428; Mon, 13 Jan 2014 01:33:18 GMT (envelope-from nobody) Message-Id: <201401130133.s0D1XI7G094428@oldred.freebsd.org> Date: Mon, 13 Jan 2014 01:33:18 GMT From: Alfred Perlstein To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/185727: Devices fail to probe on 128GB or larger memory machines X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jan 2014 01:40:01 -0000 >Number: 185727 >Category: kern >Synopsis: Devices fail to probe on 128GB or larger memory machines >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 13 01:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Alfred Perlstein >Release: -current / 10.x >Organization: FreeBSD >Environment: N/A >Description: FreeBSD machines with large memory, it seems 128GB or higher wind up without enough memory under 4GB for many devices to work. This results in USB not working (keyboard/mouse doesn't attach), and some HBAs fail as well. I think other devices may fail as well, but I've not experienced that yet. >How-To-Repeat: Boot FreeBSD 10.x or FreeBSD-current with more than 128GB of memory and some hardware configs. >Fix: Alan Cox posted the attached patch ( hack2.patch) , however there needs to be some work done still on it according to him: > The only issue with this patch is that it will pessimize the speed of > physical memory allocation on amd64 machines with small amounts of > memory. I need to augment the attached patch, which just changes some > #define's, with some changes to vm_phys.c to avoid creating excess free > page queues on small memory machines. > > Alan Patch attached with submission follows: Index: amd64/include/vmparam.h =================================================================== --- amd64/include/vmparam.h (revision 243366) +++ amd64/include/vmparam.h (working copy) @@ -106,10 +106,13 @@ * accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages * that are below that address. */ -#define VM_NFREELIST 2 -#define VM_FREELIST_DEFAULT 0 -#define VM_FREELIST_ISADMA 1 +#define VM_NFREELIST 3 +#define VM_FREELIST_HIGHMEM 0 +#define VM_FREELIST_DEFAULT 1 +#define VM_FREELIST_ISADMA 2 +#define VM_HIGHMEM_ADDRESS ((vm_paddr_t)1 << 32) + /* * An allocation size of 16MB is supported in order to optimize the * use of the direct map by UMA. Specifically, a cache line contains >Release-Note: >Audit-Trail: >Unformatted: