From owner-freebsd-current@freebsd.org Wed Feb 3 16:54:49 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 56086A9AFAA for ; Wed, 3 Feb 2016 16:54:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4571B7F for ; Wed, 3 Feb 2016 16:54:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 86302564A4 for ; Wed, 3 Feb 2016 10:54:48 -0600 (CST) From: Eric van Gyzen Subject: Kernel memory leak with x11/nvidia-driver X-Enigmail-Draft-Status: N1110 To: FreeBSD Current Message-ID: <56B230CB.3050600@FreeBSD.org> Date: Wed, 3 Feb 2016 10:54:35 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Wed, 03 Feb 2016 16:54:49 -0000 I just set up a new desktop running head with x11/nvidia-driver. I've discovered a memory leak where pages disappear from the queues, never to return. Specifically, the total of v_active_count v_inactive_count v_wire_count v_cache_count v_free_count drops, eventually becoming /much/ less than v_page_count. After leaving xscreensaver running overnight, cycling the saver every 10 minutes, the system was unusable, because it only had a few MB of memory. (It has 8 GB physical.) I see this on head from a few days ago. I do /not/ see it on stable/10 from a few days ago. Just starting and stopping Xorg eats pages. Starting and stopping X apps also eats pages, some more than others. Some screensavers ate a lot more memory than others. This is why I suspect the nvidia driver is the trigger. I rebuilt the x11/nvidia-driver port, but that didn't help. I would love to bisect to find the offending commit, but that would take a /lot/ of time, partly because I don't have a lower bound other than the stable/10 branch point (since this is a new installation). Does anyone know of any specific commits that could be suspicious? There have been several big changes in VM (e.g. more NUMA support, cache page elimination). Do any of those changes seem more likely? I'll take even a hunch at this point. :) Are there other areas I should look at? Is anyone running an older revision of head with the nvidia driver and doesn't see this problem? That would narrow the range for bisection. I should mention that I'm running with D3162* in my tree for NIC support, but there is no relationship between the leak and network activity, and I don't see the leak on stable/10+D3162. Thanks in advance, Eric * https://reviews.freebsd.org/D3162