From patchwork Thu May 31 21:17:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Satyeshwar Singh X-Patchwork-Id: 10442003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 75CA36035E for ; Thu, 31 May 2018 21:17:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6558B285A2 for ; Thu, 31 May 2018 21:17:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 590FC2919E; Thu, 31 May 2018 21:17:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0CE4B285A2 for ; Thu, 31 May 2018 21:17:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 549F76E357; Thu, 31 May 2018 21:17:29 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 636316E357 for ; Thu, 31 May 2018 21:17:27 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2018 14:17:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,463,1520924400"; d="scan'208";a="60253528" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 31 May 2018 14:17:26 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 May 2018 14:17:26 -0700 Received: from fmsmsx126.amr.corp.intel.com ([169.254.1.43]) by FMSMSX151.amr.corp.intel.com ([169.254.7.31]) with mapi id 14.03.0319.002; Thu, 31 May 2018 14:17:26 -0700 From: "Singh, Satyeshwar" To: Chris Wilson , "intel-gfx@lists.freedesktop.org" Thread-Topic: [Intel-gfx] [PATCH] drm/i915/guc: Disable preemption if it fails Thread-Index: AQHT+SCd6McYm5wxqEqS418umdi8/KRKVkIA Date: Thu, 31 May 2018 21:17:25 +0000 Message-ID: <95427A2E42F76A40B7520C17720417F092F04EAE@FMSMSX126.amr.corp.intel.com> References: <20180531204717.29567-1-chris@chris-wilson.co.uk> In-Reply-To: <20180531204717.29567-1-chris@chris-wilson.co.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWE1YWIxZjAtOGFjNi00YTQ3LTlmMjktODBiMzk4NGIxY2Q0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTVBxYUlsWlRBRGVhSEZaWTNtNHRaUVJyd1M1Uk9WdkNLVHpuM1FZaUk1Z3hKUWZLRUJqeFBmeVRRODNoWHlUcCJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Disable preemption if it fails X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Hi Chris, Isn't this dependent upon the workload submitted to the GuC? Meaning we have one workload that refused to be preempted (really long shader for example) but it went away on its own. Other workloads that come in later are preemptible. However, if we turn off preemption permanently, then all future workloads will not be preempted either which may not be desirable. -Satyeshwar -----Original Message----- From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Chris Wilson Sent: Thursday, May 31, 2018 1:47 PM To: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915/guc: Disable preemption if it fails If we fail to tell the GuC to perform preemption, we get stuck attempting to continually retry inject_preempt_context() until we eventually timeout and reset the GPU (approximately emitting the same warning 1000 times). Bail after the first failure, emit the WARN and stop trying to do any further preemption on this engine. References: https://intel-gfx-ci.01.org/tree/drm-tip/Trybot_2235/shard-apl4/igt@gem_exec_schedule@preempt-bsd.html Signed-off-by: Chris Wilson Cc: Michal Wajdeczko Cc: Michel Thierry Cc: Michałt Winiarski --- drivers/gpu/drm/i915/intel_guc_submission.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c index 133367a17863..24bdac205c45 100644 --- a/drivers/gpu/drm/i915/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/intel_guc_submission.c @@ -588,6 +588,7 @@ static void inject_preempt_context(struct work_struct *work) data[6] = intel_guc_ggtt_offset(guc, guc->shared_data); if (WARN_ON(intel_guc_send(guc, data, ARRAY_SIZE(data)))) { + engine->flags &= ~I915_ENGINE_HAS_PREEMPTION; /* XXX racy! */ execlists_clear_active(&engine->execlists, EXECLISTS_ACTIVE_PREEMPT); tasklet_schedule(&engine->execlists.tasklet);