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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5134EC433DF for ; Fri, 17 Jul 2020 10:19:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAF0F2063A for ; Fri, 17 Jul 2020 10:19:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAF0F2063A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 600436ED93; Fri, 17 Jul 2020 10:19:23 +0000 (UTC) Received: from fireflyinternet.com (unknown [77.68.26.236]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4492A6ED93; Fri, 17 Jul 2020 10:19:20 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 21847943-1500050 for multiple; Fri, 17 Jul 2020 11:19:16 +0100 MIME-Version: 1.0 In-Reply-To: References: <20200716204448.737869-1-chris@chris-wilson.co.uk> From: Chris Wilson To: Tvrtko Ursulin , intel-gfx@lists.freedesktop.org Date: Fri, 17 Jul 2020 11:19:16 +0100 Message-ID: <159498115632.13677.3761366228685182736@build.alporthouse.com> User-Agent: alot/0.9 Subject: Re: [Intel-gfx] [PATCH i-g-t] i915/gem_exec_balancer: Race breadcrumb signaling against timeslicing X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Quoting Tvrtko Ursulin (2020-07-17 09:34:07) > > On 16/07/2020 21:44, Chris Wilson wrote: > I am not sure if the batch duration is not too short in practice, the > add loop will really rapidly end all, just needs 64 iterations on > average to end all 32 I think. So 64 WC writes from the CPU compared to > CSB processing and breadcrumb signaling latencies might be too short. > Maybe some small random udelays in the loop would be more realistic. > Maybe as a 2nd flavour of the test just in case.. more coverage the better. GPU kernel IGT semaphore wait -> raise interrupt handle interrupt -> kick tasklet begin preempt-to-busy semaphore signal semaphore completes request completes submit new ELSP[] -> stale unwound request Duration of the batch/semaphore itself doesn't really factor into it, it's that we have to let batch complete after we begin the process of scheduling it out for an expired timeslice. It's such a small window and I don't see a good way of hitting it reliably from userspace. With some printk, I was able to confirm that we were timeslicing virtual requests and moving them between engines with active breadcrumbs. But I never once saw any of the bugs with the stale requests, using this test. Somehow we want to length the preempt-to-busy window and coincide the request completion at the same time. So far all I have is yucky (too single purpose, we would be better off writing unit tests for each of the steps involved). -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: References: <20200716204448.737869-1-chris@chris-wilson.co.uk> From: Chris Wilson Date: Fri, 17 Jul 2020 11:19:16 +0100 Message-ID: <159498115632.13677.3761366228685182736@build.alporthouse.com> Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] i915/gem_exec_balancer: Race breadcrumb signaling against timeslicing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Tvrtko Ursulin , intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org List-ID: Quoting Tvrtko Ursulin (2020-07-17 09:34:07) > > On 16/07/2020 21:44, Chris Wilson wrote: > I am not sure if the batch duration is not too short in practice, the > add loop will really rapidly end all, just needs 64 iterations on > average to end all 32 I think. So 64 WC writes from the CPU compared to > CSB processing and breadcrumb signaling latencies might be too short. > Maybe some small random udelays in the loop would be more realistic. > Maybe as a 2nd flavour of the test just in case.. more coverage the better. GPU kernel IGT semaphore wait -> raise interrupt handle interrupt -> kick tasklet begin preempt-to-busy semaphore signal semaphore completes request completes submit new ELSP[] -> stale unwound request Duration of the batch/semaphore itself doesn't really factor into it, it's that we have to let batch complete after we begin the process of scheduling it out for an expired timeslice. It's such a small window and I don't see a good way of hitting it reliably from userspace. With some printk, I was able to confirm that we were timeslicing virtual requests and moving them between engines with active breadcrumbs. But I never once saw any of the bugs with the stale requests, using this test. Somehow we want to length the preempt-to-busy window and coincide the request completion at the same time. So far all I have is yucky (too single purpose, we would be better off writing unit tests for each of the steps involved). -Chris _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev