Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1630397pxp; Thu, 17 Mar 2022 13:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7BSBCgkQHPLamL8b4SmmV2okACz2j4HU2UA2o6XVE8qK6gIw2w2OcDmh8gV383gW+oTCz X-Received: by 2002:a17:902:e883:b0:153:f7b8:fa9 with SMTP id w3-20020a170902e88300b00153f7b80fa9mr3716871plg.96.1647547653047; Thu, 17 Mar 2022 13:07:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1647547653; cv=pass; d=google.com; s=arc-20160816; b=xNm9hG/LrAR6CXksQBpVFICLGjcYnS0hcOH1Ec1F4T4Q/fC4tqr5YpVuAj7aCjMJHg MfA7VaAUcLbsQhg9IOoYFwHT49PCS9HBH8J4fEjZr/H5Ugsi8Wvg/s4/0apLQXIgukTk rVsonOP9Ek8MW/TJaiSBYM88wnIpBTK20wi67WP7n+gk+35vHMHVw3shtEH1NEmS4AiY MUTU/bCos59uRPfYc0xFWjyd6EmrtsMJuA5Ro0ezI8XepV7GoZfPsl/og4/5AGLHpZjY zQH1eB7lPAD59qgX7NnGpez85XGRIdPT1M/0ziIccugAuXy4asxxiE9BaGOdGazkBIip kzzA== 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=qJ+hi8PnWt7H4T3eAtvaFYImrn5DJYuEBt0371XR3+Q=; b=ZNc6YmPWshePynRYG0kz1yDg2d+C/uQ1wUGNul3PKZFvec+TtOMlU5/XoShlQtjJdd NDNOY2s10jC5k7UHzSMXzEOsyGgDUf2F4WDZ04lUNdAaWOhz0FsIhOXEhQ7uMBk6L9nZ vN0YaAtP4QCW+w2WCxN7USc5H98QewJ23sxltGswqyoudWGeXB+VZisycTo14crIJZtT g2kzf9JlpXXPiuvwgKP5rvg00KjDAOK0uLSCfIXzl4guR6qaQiEjmZkvorpYAHWpzRG0 EhyPvQivdO4+cjaTJ4TDzABdZI107GXeezZ/rcwcynKQF5aB6rMU8oM2X6Kht+jmP6TX zmPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=3Po8aGM3; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p13-20020a056a000b4d00b004f73239dfcfsi6285504pfo.220.2022.03.17.13.07.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:07:33 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=3Po8aGM3; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9158B258FF9; Thu, 17 Mar 2022 12:55:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237046AbiCQRrr (ORCPT + 99 others); Thu, 17 Mar 2022 13:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiCQRrp (ORCPT ); Thu, 17 Mar 2022 13:47:45 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2067.outbound.protection.outlook.com [40.107.237.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383791E7A73; Thu, 17 Mar 2022 10:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oWabHx19GhJfcwodSE2jpIuRymEKqR0a4o7qFhusYYKJPguMN5DQMvmaWbRQkrNPx6JpKKDEIgD7wiPQy3iLWlGJgqH5Z5JHVg+hZb5Rs5jjmI+6pDP893HhxrQKsH1p0cRXKhCjtNouERG3kV7K9HGUj8kpMF0Wxxp4rSr9qUjNT9kEMifN0xxbhpM8l5jQvOGbLJKQUD6777vkxxSHfARhMYKEKMYz9kCnhNnP3qMOfc3g+F3tJO1ML8lPC3WG4KP5wiq5KpeQqA2OZ4xwL5aU5GsY1lFTNI2t48knnXPtr7d+9rR3GfjyGhUES6afQoOWIEAm9QaoFW7lGxp47g== 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=qJ+hi8PnWt7H4T3eAtvaFYImrn5DJYuEBt0371XR3+Q=; b=QKTnNZ2S5uIZCJcMKkdsr9sIZMbelYKbG0CdzzuwBYlL1Q1ytfc3mvsS7/rjUb66nMuvgTZCbPG/Eoql4mUFE9ckM9IOeZhieAz83ydDvJnL4p3Uk09rNs8rpRNr/BtutyhxXIo7brd79niyktKeCTtaOVd2QrKQVvqHdhZsbSRIuIXMFZkPR2sDuhRKBNSGb63TvHcuK1TWs9Th6ofl22BNB53TiJveQNisgIut37zQKj0qzZccXZe5czMDsrvkCX5JhbG0w2p2nXhMPJtROoI+9L72P4dCmg4gjqyBMN8yKxAz0FGVNhPwSSgynpa/9OC08CucvGO9aU2RXbsXQw== 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=qJ+hi8PnWt7H4T3eAtvaFYImrn5DJYuEBt0371XR3+Q=; b=3Po8aGM36PIjDUHJlq0uQaJBnhhNnwLmVV28A3/qBqb2eOGf/2j2YdIZSqUjwrnUNgvu4h5rwXZiFhh1cOSwVhrG2WNiMpecOoJQcA5ANRKrvPpUMjfQPN+c48HVTMDDKcwRhTC5exs1HLkv/SGfSh5WK3xrK8+SKF4V2VnmlOg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1947.namprd12.prod.outlook.com (2603:10b6:3:111::23) by DM6PR12MB3434.namprd12.prod.outlook.com (2603:10b6:5:3b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22; Thu, 17 Mar 2022 17:46:26 +0000 Received: from DM5PR12MB1947.namprd12.prod.outlook.com ([fe80::90bd:5b12:918d:5703]) by DM5PR12MB1947.namprd12.prod.outlook.com ([fe80::90bd:5b12:918d:5703%6]) with mapi id 15.20.5081.017; Thu, 17 Mar 2022 17:46:25 +0000 Message-ID: Date: Thu, 17 Mar 2022 13:46:22 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 2/3] drm/msm/gpu: Park scheduler threads for system suspend Content-Language: en-US To: =?UTF-8?Q?Christian_K=c3=b6nig?= , Rob Clark Cc: dri-devel , freedreno , linux-arm-msm , Rob Clark , Sean Paul , Abhinav Kumar , David Airlie , Akhil P Oommen , Jonathan Marek , AngeloGioacchino Del Regno , Bjorn Andersson , Vladimir Lypak , open list References: <20220310234611.424743-1-robdclark@gmail.com> <20220310234611.424743-3-robdclark@gmail.com> <3945551d-47d2-1974-f637-1dbc61e14702@amd.com> <865abcff-9f52-dca4-df38-b11189c739ff@amd.com> From: Andrey Grodzovsky In-Reply-To: <865abcff-9f52-dca4-df38-b11189c739ff@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: YT1PR01CA0045.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2e::14) To DM5PR12MB1947.namprd12.prod.outlook.com (2603:10b6:3:111::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f06da03-9011-4b04-2501-08da083e0ebf X-MS-TrafficTypeDiagnostic: DM6PR12MB3434:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MgmCExaY17DzlxwlxkZSAhrOR/rJnBNn3n5E+4K6gNzmBWOLAghdlWW8rbDR7+MBFu3REH7KvPM0t7aCG82BFvxdkyRcSJbGQB1AAtyj+gv4ssWVfZZkAu8zMx8SZfT8HEFQiwCIoPtf16Bu3YuDnur+UZrhgLvIrtwVivX1n4oLwyCKKP/kFOLnCPOT+xyxa5nAHrfpxibDsAVJOoMOi3pp0zHt28rBOr12+Jp/89+vwT+ypjr5r4JSPFGl2ovsKptGzow29v4Sdp+a4ZBEjJHUF6bQDMEham/xt4qWdJnvYgDD9q5X1s+GKUF/8ZUzq06tHQpt1nh7xnPx/NfGIZt+ND06Ep+UuvUrzbdM0Kbi1ejMLFLXEE3R3NpH9MqPgGWmR6FfJjCoBcFr6AwNRWKEplo1Bo5bL9aGlFjbZe1u+omVFagsx+P/2ApBndB1YjZYD/Z0zeBgWw4O5qnzFXuaNKhSL8MbcCc7CMqvRolvCq91E39EtpCzOsns2Y4RXIvoaFauPTn2DzHz3wmViTNqSUudTcmKpbbtpiNPx0eOUVuhIIDUJsF7cOAe6DeAi69vHrzJF7vk7gCSh2UVKOc6XPvs7LlXMaJ9BBaURcPtewFuAjEfE6Ffd4W1J0wjxjm7DqYntUq9iqTw/KaEnt+i00I7Ob2rgYmwl0KnaIeT5JKu+J3zZG4Q0EBnxzHFN1J848VKp7sV1s2xiTm7QDiRLqH7PhyPf8WQ53AcxYE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB1947.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(31686004)(44832011)(36756003)(7416002)(66946007)(4326008)(66556008)(8676002)(5660300002)(110136005)(54906003)(83380400001)(66476007)(316002)(8936002)(66574015)(2616005)(6666004)(6512007)(86362001)(186003)(15650500001)(508600001)(6486002)(53546011)(2906002)(6506007)(31696002)(38100700002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Mm1IZzFXM0h4SFdlemN2akp6Zmp3T1M2QlRDZFNEaThSMWd3eGlNOGkydkFK?= =?utf-8?B?T28rdHN4dzdzRUFXdEJVcHM4N04yNm9lNmZMZ0ltVmo0K2JTb3pjYXlqUmpu?= =?utf-8?B?emZhVnRMcTJPd200RXczQzNFQTlBcnpmOHVHZG1zbWpUR1ZFc0EySVdmODdV?= =?utf-8?B?Y3E2eVJIT2Y0VVZHeTNudUpaWnpoQjF4eE1iVU8xSFQ1U3MyUmtnNmRkTmJk?= =?utf-8?B?Vk9Nc2xWYUhxczVaRFBxSC9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=?utf-8?Q?/bHQY1?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f06da03-9011-4b04-2501-08da083e0ebf X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1947.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2022 17:46:25.7561 (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: m2Ery/8xSlYCGVVBUw1D+GaF0HRUe3D1boNe1aeaoTiPM10Uhva5gDPx1KjZUj/OFPbjbk3Tn0AOgoRHtu/i/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3434 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-03-17 12:04, Christian König wrote: > Am 17.03.22 um 16:10 schrieb Rob Clark: >> [SNIP] >> userspace frozen != kthread frozen .. that is what this patch is >> trying to address, so we aren't racing between shutting down the hw >> and the scheduler shoveling more jobs at us. > > Well exactly that's the problem. The scheduler is supposed to > shoveling more jobs at us until it is empty. > > Thinking more about it we will then keep some dma_fence instance > unsignaled and that is and extremely bad idea since it can lead to > deadlocks during suspend. > > So this patch here is an absolute clear NAK from my side. If amdgpu is > doing something similar that is a severe bug and needs to be addressed > somehow. From looking at latest amd-stagin-drm-next we only use directly kthread_park during in debugfs IB hooks. For S3  suspend (amdgpu_pmops_suspend) we will only  flush all the HW fences (amdgpu_fence_wait_empty) so we don't freeze the scheduler thread and don't flush scheduler entities. Andrey > > Regards, > Christian. > >> >> BR, >> -R >> >