From patchwork Thu Sep 12 15:57:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2879021 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1C01DBFF05 for ; Thu, 12 Sep 2013 15:59:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E319320357 for ; Thu, 12 Sep 2013 15:59:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D08702034F for ; Thu, 12 Sep 2013 15:59:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA890E7975 for ; Thu, 12 Sep 2013 08:59:50 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 90024E66BF for ; Thu, 12 Sep 2013 08:57:20 -0700 (PDT) Received: by mail-ee0-f45.google.com with SMTP id c50so5424624eek.18 for ; Thu, 12 Sep 2013 08:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=MgvGSmcjanz4fNwcmwo1pemrhede/deT+pHiuzBRn8U=; b=auhY1i9FZiHZYahZ+Qujm9U2jv66ePADOMqFhwW6sGRZ15XOd3oFGOhcgbs/i2SbqW OhJckcfBc+uq2r9n2uwLjHAaKEPtGgJqoqsC4dNgoHfohX1nY3r5OOLvKjSLwvtHVyEy 5LXYAKrj++cORn1RI4DwizA2fBXAAUt3ZIh+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MgvGSmcjanz4fNwcmwo1pemrhede/deT+pHiuzBRn8U=; b=O93ZHxIZzso3aDMygJKBrc/ewA+jHZEZnBUv0cK0+LFuqPM7HM5PHu55SqG7kzQkh9 0feuasSJDuqaor4VUW+n0IfU5IEfNoHgQPKf1jLjJM1mZr4K88cNvllmv2LjBV+35xDb ru9mbIQRVQEjhPFrdyXBvj39XdPUetCP8xji2XAlsk7kklN1Yi/lZIiJsBhmstnJjSiE dN9K1S2QkPoM8b+R0PPoIi6QD0xCaKi49+99PFypTlD4RGNiWLnhUxxTrSzCFedtNF3Q Drww4NbJDIC3QvRWhvNcmk5+mlNJyizXoa9wyelkN2DeU+ohnICkrB2K+JoNe3TQtCCD jWxw== X-Gm-Message-State: ALoCoQmQiodTVsF5dT2pBg6MZgGxDoDHExZ0dK7g75al1HSpH9jrCzu3d52wfot+dEvB/BEUgo/Y X-Received: by 10.14.109.201 with SMTP id s49mr3709004eeg.54.1379001439711; Thu, 12 Sep 2013 08:57:19 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id y47sm6914948eew.12.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 08:57:19 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 1/2] drm/i915: kill set_need_resched Date: Thu, 12 Sep 2013 17:57:28 +0200 Message-Id: <1379001449-17380-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.4.rc3 Cc: Peter Zijlstra , Daniel Vetter , Intel Graphics Development , LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is just a remnant from the old days when our reset handling was horribly racy, suffered from terribly locking issues and often happily live-locked. Those days are now gone so we can drop the hacks and just rip the reschedule-point out. Reported-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Linux Kernel Mailing List Signed-off-by: Daniel Vetter Acked-by: Peter Zijlstra --- drivers/gpu/drm/i915/i915_gem.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d80f33d..3871060 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1389,14 +1389,11 @@ out: if (i915_terminally_wedged(&dev_priv->gpu_error)) return VM_FAULT_SIGBUS; case -EAGAIN: - /* Give the error handler a chance to run and move the - * objects off the GPU active list. Next time we service the - * fault, we should be able to transition the page into the - * GTT without touching the GPU (and so avoid further - * EIO/EGAIN). If the GPU is wedged, then there is no issue - * with coherency, just lost writes. + /* + * EAGAIN means the gpu is hung and we'll wait for the error + * handler to reset everything when re-faulting in + * i915_mutex_lock_interruptible. */ - set_need_resched(); case 0: case -ERESTARTSYS: case -EINTR: