From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCCFBCDB47E for ; Thu, 12 Oct 2023 16:12:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234077AbjJLQMb (ORCPT ); Thu, 12 Oct 2023 12:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234167AbjJLQMa (ORCPT ); Thu, 12 Oct 2023 12:12:30 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43506C0 for ; Thu, 12 Oct 2023 09:12:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74897C433C8; Thu, 12 Oct 2023 16:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697127148; bh=TvenXf/4OvfuGW4p4UmiPQ+pfRv3tr8u8yVKIkLs4n0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TK8THUdEmqOUyC7GdXLhucmb1mh4AFXsxxOYLbibnw0a/lPQlG3nbpy/a2V7lYHpR GoO8a/gpsHwwZ7I0lGMVtAACwtZqciQOBN7CM5aJrhxUx4fHc+OMIZwFA7V7jrQeTx MhT2WITdVMYCZ5h3Q4E9QjLObg3QckRjPrVqWaKQ= Date: Thu, 12 Oct 2023 18:12:26 +0200 From: Greg KH To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [PATCH] drm/i915: Retry gtt fault when out of fence register Message-ID: <2023101202-conjure-shortwave-6ebc@gregkh> References: <20231012132801.16292-1-ville.syrjala@linux.intel.com> <2023101257-chamber-excavator-2063@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Oct 12, 2023 at 04:53:38PM +0300, Ville Syrjälä wrote: > On Thu, Oct 12, 2023 at 03:40:08PM +0200, Greg KH wrote: > > On Thu, Oct 12, 2023 at 04:28:01PM +0300, Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > > > If we can't find a free fence register to handle a fault in the GMADR > > > range just return VM_FAULT_NOPAGE without populating the PTE so that > > > userspace will retry the access and trigger another fault. Eventually > > > we should find a free fence and the fault will get properly handled. > > > > > > A further improvement idea might be to reserve a fence (or one per CPU?) > > > for the express purpose of handling faults without having to retry. But > > > that would require some additional work. > > > > > > Looks like this may have gotten broken originally by > > > commit 39965b376601 ("drm/i915: don't trash the gtt when running out of fences") > > > as that changed the errno to -EDEADLK which wasn't handle by the gtt > > > fault code either. But later in commit 2feeb52859fc ("drm/i915/gt: Fix > > > -EDEADLK handling regression") I changed it again to -ENOBUFS as -EDEADLK > > > was now getting used for the ww mutex dance. So this fix only makes > > > sense after that last commit. > > > > > > Cc: stable@vger.kernel.org > > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9479 > > > Fixes: 2feeb52859fc ("drm/i915/gt: Fix -EDEADLK handling regression") > > > Signed-off-by: Ville Syrjälä > > > --- > > > drivers/gpu/drm/i915/gem/i915_gem_mman.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > This is not the correct way to submit patches for inclusion in the > > stable kernel tree. Please read: > > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > for how to do this properly. > > > > > > Say what now? Sorry, my bot thought this was a patch sent only to stable, I've kicked it a bit and it shouldn't do that again...