From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com ([192.55.52.93]:14116 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755794AbbLAJAI (ORCPT ); Tue, 1 Dec 2015 04:00:08 -0500 From: Jani Nikula To: Chris Wilson , Daniel Vetter Cc: Lionel Landwerlin , Daniel Vetter , intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: Check the timeout passed to i915_wait_request In-Reply-To: <20151126160655.GN23362@nuc-i3427.alporthouse.com> References: <1448544702-5594-1-git-send-email-chris@chris-wilson.co.uk> <20151126144900.GT17050@phenom.ffwll.local> <20151126160655.GN23362@nuc-i3427.alporthouse.com> Date: Tue, 01 Dec 2015 11:04:15 +0200 Message-ID: <87oaea5yls.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org List-ID: On Thu, 26 Nov 2015, Chris Wilson wrote: > On Thu, Nov 26, 2015 at 03:49:00PM +0100, Daniel Vetter wrote: >> On Thu, Nov 26, 2015 at 01:31:42PM +0000, Chris Wilson wrote: >> > We have relied upon the sole caller (wait_ioctl) validating the timeout >> > argument. However, when waiting for multiple requests I forgot to ensure >> > that the timeout was still positive on the later requests. This is more >> > simply done inside __i915_wait_request. >> > >> > Fixes regression introduced in >> > commit b47161858ba13c9c7e03333132230d66e008dd55 >> > Author: Chris Wilson >> > Date: Mon Apr 27 13:41:17 2015 +0100 >> > >> > drm/i915: Implement inter-engine read-read optimisations >> > >> > Signed-off-by: Chris Wilson >> > Cc: Lionel Landwerlin >> > Cc: Tvrtko Ursulin >> > Cc: Daniel Vetter >> > Cc: stable@vger.kernel.org >> >> Commit message should explain what the actual problem is - we add 1 jiffy >> of delay for each wait_request, potentially waiting quite a bit longer >> than what userspace asked for. >> >> And not sure this really justifies for cc: stable, since all the wait >> syscalls reserve the right to wait longer. Of course we should fix it, >> just to keep validating this possible. > > Dropping stable is fine, that was just a knee jerk reaction to finding a > regression. The impact is 1 jiffie for each extra active ring for a > wait_ioctl with a timeout -- I don't think anyone has noticed. Pushed to drm-intel-fixes with some random copy-paste added about the 1 jiffy. Thanks for the patch and review. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center