From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Graunke Subject: Re: [PATCH] intel: Track whether a buffer is idle to avoid trips to the kernel. Date: Mon, 20 Jan 2014 10:57:33 -0800 Message-ID: <52DD719D.1030204@whitecape.org> References: <1389775119-26051-1-git-send-email-eric@anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from hapkido.dreamhost.com (hapkido.dreamhost.com [66.33.216.122]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C5AEFA90E for ; Mon, 20 Jan 2014 10:54:10 -0800 (PST) Received: from homiemail-a38.g.dreamhost.com (caiajhbdcbhh.dreamhost.com [208.97.132.177]) by hapkido.dreamhost.com (Postfix) with ESMTP id 382DF386CE for ; Mon, 20 Jan 2014 10:54:10 -0800 (PST) In-Reply-To: <1389775119-26051-1-git-send-email-eric@anholt.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Eric Anholt , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 01/15/2014 12:38 AM, Eric Anholt wrote: > I've seen a number of apps spending unreasonable amounts of time in > drm_intel_bo_busy during the buffer mapping process. > > We can't track idleness in general, in the case of buffers shared > across processes. But this should significantly reduce our overhead > for checking for busy on things like VBOs. > > Improves (unoptimized) glamor x11perf -f8text by 0.243334% +/- > 0.161498% (n=1549), which has formerly been spending about .5% of its > time hitting the kernel for drm_intel_gem_bo_busy(). > --- > > I've still got a patch outstanding on the list for valgrind-cleaning > the modesetting paths. Since we're probably rolling a release soon, > that might be nice to get in. > > intel/intel_bufmgr_gem.c | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) Nice, makes sense...if they submit a batch referencing the buffer, it might be busy, so we need to check...if not, and it isn't shared, it's definitely idle, so skip the check. I like it. Reviewed-by: Kenneth Graunke