Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp976621rdh; Fri, 27 Oct 2023 00:36:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuGkiEhSjuVG77VKapdSQ4kUqq3jN8USU1TDP2IM8AIpwvjZZWPhUEq2Vg1ae1VIlnfgxs X-Received: by 2002:a81:c60a:0:b0:5a7:fb11:90f8 with SMTP id l10-20020a81c60a000000b005a7fb1190f8mr1728435ywi.16.1698392216232; Fri, 27 Oct 2023 00:36:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698392216; cv=pass; d=google.com; s=arc-20160816; b=xrf2U6o9T2ZESgjTaz2+In6FGtTLGl08PJjH5kdJqZ7pGFaINmNdHyvLhdjTN3z48s rbPxXu7VNley9+hWkKbFnHqVDqmwx3HMKcvd/OwKtyK/bH2RNO8udzNwE2zz/+7TwyI8 IvWJckCjmhL+XUkw+VusAXxRCA+2ENWYa+gc2XuennCdh0p3bmcZxX/VN25VRYzeDjMW QpC+vhLTHMIKITPsYbCLT+mRITWeOl6UAOvTyMKx7es7uqQ4vJl9GI5AhxS2rqyJ6HSb yuA+LzhxFyFg9jSPDAQUz6xTRSx8WhwVnxh5cFB/05GMhDOP773mYrZTJtSPLqbXwSkC MF2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=1SBj+1AKaz4GaE1BEr44plcmOemA6HSJ8t/HX/MYlEw=; fh=qYxd7x3TWaB7TTLw1cbkhEdkufo/ZOgEglf1kKgZBwQ=; b=sqHdzXD6/s8Z8V+QOPP2UZh0rLPYQaSUbE0Zw+i6dZVzhIgg97tl5Ufl9V0ph0aBLH bmipinJrVz0wcBRnZ2/KwsCNhY9m9eUEkplbDT9YET9sREhUnjIBE/BVst2PSfLCH6TX EP1v/LFAC5CCo3QSut6niZUpUEoTCo/eMqaviGixAtJhX3oe4izfROaqL+L1eFwSvaSH RAePwmVNDjFmRv015ukmuQARAqTt2Z6wlbFMPUyENZN1XO3uVNPqKZlm5UiSJ1N2fBCx V7wbkVuhOQtqlkJbxSxe2E3eqFSIl9wcrAfUE1nGyDlRBMB056SVH5KDaqcln7cPwjiR Hkyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=F5KE6Fm6; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id u11-20020a81a50b000000b005a21cb1bf30si1737166ywg.336.2023.10.27.00.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 00:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=F5KE6Fm6; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 77C148086910; Fri, 27 Oct 2023 00:35:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234999AbjJ0HfO (ORCPT + 99 others); Fri, 27 Oct 2023 03:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjJ0HfN (ORCPT ); Fri, 27 Oct 2023 03:35:13 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D40A9B0 for ; Fri, 27 Oct 2023 00:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dAvZhkjmpmtNImx+wnBbKduc2GgrltJ7YrmU1lNYUUV3GLv+tJo4KYYLCIKOqpNnDlAeplCxURCroybwOR2E+6z9Ahic2Gcb9/1DYe/1R4gzt8YrtMfZsLXYcP1/dJp5XU/1bMzWUvvPPnGfMA2ZEe5VJXdyOSUtf3EAUmfsNAJ7jEuXfHkQnEWsmTqSacEWJy8jr6iPQhcD01LaL0NSVcnCJr5dDaXEnOtdG2UqwpA8T+RDqb6UdKTDbhheTnCTovJuQgDpszrRkDtSLzphR3yzTSOmC8fEKsNkIBKHCt/uJliuC9fS0Hgi+FweiPPZRehRxTkAgNnhUii3/ksGTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1SBj+1AKaz4GaE1BEr44plcmOemA6HSJ8t/HX/MYlEw=; b=BmIk5mkLhsjrECnwTH3yvVm2wFIDfObxoaxolOywcepLbfwbUkp8UaJQzDH6Q/kDkjg06ATt4aaYZ/qeNwA0OK6Av3B+ScNVTRcxqX6YIJ2wYdO+6PBnKmg+KhrQfOFDogKOoTm+nZ66d+uf+GxglChpsGRQUbn5aXyo88wYkhDoy5kuF/SKRnhV0g9PuSNLkCab7GMirHThdjJNx49FYmOw9NDGKa2pPLTQHF3nrt7y2YePFk+EPxchTnq+aG8LkpdEO7JWYu8FaulTdiGJjB7vPUglq7AJ9x6ZvX15+mRIPafVi+T9b5njg2m9FgtmXkt2BziExpoHM7tttRKVfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1SBj+1AKaz4GaE1BEr44plcmOemA6HSJ8t/HX/MYlEw=; b=F5KE6Fm6ePzNK6p2IYXT1HbqutpHn7utwJt0ZxuMBkENuh1eYKOSuWemlQ08YOQ28CIhCkIqpxzxAVArt/VFglU3sYlBYm0TK1rtT3AwwRa6RqCPmM0qbCQlHZeOKVGyFu9Bksy1HM6b2hisysPQZNmBiTEt1nQv/WBfiB2A8Jo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by LV8PR12MB9261.namprd12.prod.outlook.com (2603:10b6:408:1ed::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.45; Fri, 27 Oct 2023 07:35:05 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::af19:f731:8846:68ba]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::af19:f731:8846:68ba%6]) with mapi id 15.20.6907.032; Fri, 27 Oct 2023 07:35:05 +0000 Message-ID: Date: Fri, 27 Oct 2023 09:35:01 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH drm-misc-next v3] drm/sched: implement dynamic job-flow control Content-Language: en-US To: Boris Brezillon Cc: Danilo Krummrich , airlied@gmail.com, daniel@ffwll.ch, matthew.brost@intel.com, faith@gfxstrand.net, luben.tuikov@amd.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20231026161431.5934-1-dakr@redhat.com> <0bc79ae3-04fe-4e85-9fd0-e8b281148390@amd.com> <20231027093238.2ff8172e@collabora.com> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: <20231027093238.2ff8172e@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR2P281CA0018.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::28) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|LV8PR12MB9261:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a9faf5d-d29e-4b41-56d4-08dbd6bf3d2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KeMUI7Cpi/VF1rpWapNzk5kRTl7G+kjdcuqv6P8bXghwiSx9KIO/4KqDhu2ZLA8zjzJbEM40bDEwrKxus/+prxd/d99dJzAkpxrUzERjZ4hcgmjsaDOR9goBVLxqWnLqI/phvLsuFbj9aRaEXogmHoRQJNwqz92DC+1tSwUN9P2io4eOxDQQUVNY8pcU9Pu2vIqukqb6PxGQMojazLNtZU8+JYfq/asA+1araDAypfdtglLvqOgCyJEws3BwwL4DvqPk9f3iofA46qltKQyrbdIa7cChTcosj7BuGNwxZH52tQkbqOTDPuSokDUhrbdjJHaS2s2Nq3SnXSZYFM1I854uFj0pQVsBNy9a7OQ9SZ3cxC/D4FzROGUfkTr4mSWd+a/7PekZhlS9CvVyOGF2L4SNgkXxnI0TSdlk8h0GxbgO03Dq0pXNNdO1VUHG7oRzO+V1WiCxIiXqrmZ6DhCJ/wg0IGi0MtH6qzWJDN0FUz5NWMHyVoTgUMjaCk6snGtCEf+5xdYNfyZwkNRJRcfghURI9ez+yboQ6UuQq7uEUeDlv7cCNoaLWGOBeGDmSrbBFKO3LY3MTJf/Hy3kJsqzzcUIsQDyGyyKTzvkmM6l7rEs1wzKCS6dSK7RfEQC9FBOSawxckenAg/wpLCN+tVpmA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(39860400002)(396003)(376002)(346002)(136003)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(31686004)(36756003)(316002)(86362001)(6506007)(31696002)(38100700002)(66574015)(2906002)(2616005)(6916009)(26005)(478600001)(66556008)(6666004)(83380400001)(6486002)(8936002)(66476007)(6512007)(66946007)(5660300002)(8676002)(41300700001)(4326008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZkEwaVFpZWRYaFE4OHY4M1VpdjhNd2VNQ1JEdmE4a08vR0M4cFJxa3liTGdn?= =?utf-8?B?WE9kelh1cHZsdnpaM1lSaEYyMHplUXhjbEgzdERnMENXZzZtMXFLaVRFMmhE?= =?utf-8?B?aFphK0tWQ2FOcFVQM1l4UDB6SEl1NnBYbTc1Nm1jWGRrZndkTHRwU204RVQ2?= =?utf-8?B?cHZ6cy9obDYvR01ocHppZkhLRkxzODQyWWhLQjdSNUhhWDJleEVTQUJrWGIr?= =?utf-8?B?V3hrM0JQSy9yaXpTNm5GMXlSRTVwNUZ4VFdVK0lNaEQ0VFZxTytISW9ZREwr?= =?utf-8?B?TExacTlxUERoT256R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0WkxC?= =?utf-8?Q?6oroCqqe9DzJ39FR0yxoqxVl7?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a9faf5d-d29e-4b41-56d4-08dbd6bf3d2a X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2023 07:35:05.8072 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WPMrYfznBarPBScv2h2cSoTCeh9W/nznQL1Mdwv2oH5giw9YwVbf97rYGGK/yWlU X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9261 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 27 Oct 2023 00:35:23 -0700 (PDT) Am 27.10.23 um 09:32 schrieb Boris Brezillon: > On Fri, 27 Oct 2023 09:22:12 +0200 > Christian König wrote: > >>> + >>> + /** >>> + * @update_job_credits: Called once the scheduler is considering this >>> + * job for execution. >>> + * >>> + * Drivers may use this to update the job's submission credits, which is >>> + * useful to e.g. deduct the number of native fences which have been >>> + * signaled meanwhile. >>> + * >>> + * The callback must either return the new number of submission credits >>> + * for the given job, or zero if no update is required. >>> + * >>> + * This callback is optional. >>> + */ >>> + u32 (*update_job_credits)(struct drm_sched_job *sched_job); >> Why do we need an extra callback for this? >> >> Just document that prepare_job() is allowed to reduce the number of >> credits the job might need. > ->prepare_job() is called only once if the returned fence is NULL, but > we need this credit-update to happen every time a job is considered for > execution by the scheduler. But the job is only considered for execution once. How do you see that this is called multiple times? Regards, Christian. > If you're saying this control-flow should > be implemented with a dma_fence that's signaled when enough space is > available, I fear Danilo's work won't be that useful to the PowerVR > driver, unfortunately.