Date: Wed, 21 Oct 2015 14:13:05 -0700 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289719 - head/sys/dev/drm2/i915 Message-ID: <1544184.b1AHehjrnL@ralph.baldwin.cx> In-Reply-To: <201510212049.t9LKnkkj002445@repo.freebsd.org> References: <201510212049.t9LKnkkj002445@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, October 21, 2015 08:49:46 PM John Baldwin wrote: > Author: jhb > Date: Wed Oct 21 20:49:45 2015 > New Revision: 289719 > URL: https://svnweb.freebsd.org/changeset/base/289719 > > Log: > i915_gem_do_execbuffer() holds the pages backing each relocation region for > various reasons while executing user commands. After these commands are > completed, the pages backing the relocation regions are unheld. > > Since relocation regions do not have to be page aligned, the code in > validate_exec_list() allocates 2 extra page pointers in the array of > held pages populated by vm_fault_quick_hold_pages(). However, the cleanup > code that unheld the pages always assumed that only the buffer size / > PAGE_SIZE pages were used. This meant that non-page aligned buffers would > not unheld the last 1 or 2 pages in the list. Fix this by saving the > number of held pages returned by vm_fault_quick_hold_pages() for each > relocation region and using this count during cleanup. > > Reviewed by: dumbbell, kib > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D3965 I have been getting panics on my x220 due to vm_page_unhold() finding a reference count on a page of 0 every 2-3 days for the past month or so. When I examined the dumps I would find other pages backing the relocation regions that had insanely high hold counts (like 30 to 60 thousand). Given that hold_count is a unsigned short I figured it was overflowing. The first attempt to fix this was the changes in r288452. However, even with that in place I was still seeing the same panics. I've only run this for a day, but it "looks" correct. If you have been getting vm_page_unhold panics with i915kms loaded this is worth trying. I'm not sure why my x220 was so prone to this when other people have been able to run X with i915kms without any problems. I do have CPUTYPE set to enable AVX, but I don't know that that would suddenly make lots of buffers non-page aligned that would be page-aligned otherwise. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1544184.b1AHehjrnL>