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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7F8D2CDB482 for ; Tue, 17 Oct 2023 11:57:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CAA210E2CD; Tue, 17 Oct 2023 11:57:30 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2068.outbound.protection.outlook.com [40.107.244.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFE1E10E2CA for ; Tue, 17 Oct 2023 11:57:28 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H1E8ulbD+nPEytSdQUV7eLBdd9vCEk6e2WTNFsIWZaQNSdvzcxf5sAv2VTWW8gR7UloHzKXQpujhNG8DbzgQYZs+H0Ra9e32OjsM7vMXzz5mJJmcFF7irIe9Kpjnrva4y9o9PKIQv3lpbv3F1iaWxD7qzdiuuEW9alwhpdhxd5b3xdcnqs0qeGNNWrg8XYj/1v/9nahP8G5rOJ7+R4zYEMPFFLoPqd7AZSITIAUFBz3Fk6Rk206Bji+5gqboIQiQPn5V2ChgtsSv/aSqKuSrNDCmJxFxC1s0fbvULuTSvxKtxLJ7QSbvy5Qj5G/v+TlN7K6/FhokRKmvP2ydGF+uPA== 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=GFQGs+ySPaSVOofHMXQ4MbFRCxm6Eot6jHrnrSC5DIU=; b=MYF9gZrRtocXnNunvjDLm9JJiPoFlF3T9tiO9jlTtWBRMi10ivOuDMGKlmfxm8i6aMwXLsS/okStzbK6hCIT0iQQ3FX/u1UwCQ79FNI06OB45GXEcGD8bW0we14jAxT5ByWWfkdxq2jp5obnv+2MXemP+C5BVJJZ0Q2aMx/eZY2FAWKFh+zRtSbTwJFT149uNcZ+DnhgSHVt+nry6Fq5eohWU6bWnD3nYJn5GGDQRYqggWq7I5HaqJMb7LdU84cg6is2z0+MPKuquB0lwMLhxElNPPJbuUmB1mwI6OgychdxjuMZI/c0roS4Kvvt3EloZHlK5EAz5Qhk5xKnXXahaA== 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=GFQGs+ySPaSVOofHMXQ4MbFRCxm6Eot6jHrnrSC5DIU=; b=SBG2tWhgqlj2RrhKsWP6WwZNuV8v1CAZw95zEGfE3HKaOuOP83SkqB/OJAER5ZX4KRH1Y2tG8W3/PFVH6VGq+1/wqbsZiydibtAq58vSQ6Tvno8z0Dujg0tkj8VHxB5wJrIvNhWIEsKF/PdMqJGGZvAnAp+uPdyaJIOjCHreD2I= 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 PH7PR12MB9222.namprd12.prod.outlook.com (2603:10b6:510:2ef::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Tue, 17 Oct 2023 11:57:26 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::a7fa:4411:67a3:131d]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::a7fa:4411:67a3:131d%4]) with mapi id 15.20.6907.021; Tue, 17 Oct 2023 11:57:26 +0000 Message-ID: Date: Tue, 17 Oct 2023 13:57:25 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/4] Improve test coverage of TTM Content-Language: en-US To: "Somalapuram, Amaranath" , Karolina Stolarek References: <9854008f-6755-4c09-9f23-90fa62911222@amd.com> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR2P281CA0011.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::21) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|PH7PR12MB9222:EE_ X-MS-Office365-Filtering-Correlation-Id: 804c6d65-9390-4974-09bc-08dbcf083b06 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dNtlYG1/qhfeQzZFBPk1A91qvLi5g9yVev3F5zYbVzdDMuoNATX99pQFfpFLK/GS0cgj8RFgjlnB0+Sg4TEC+SgXvRZCs8qNwJ3AYcY1D6QH28ROEukZNV6bLR1nk/LM8nVnQ4Nylwtq0hZcqJSXvidMK/ILTuXqSvmrh4BGAWXwA4shOZnOFVSLvc8TAYhpqyv77cIgT7xV9EcIVS4eK+jAaMNzCjgYKsoY8xUG81TWIaSi66u1HH30EEXZ4SDconz6YY73FFK229wsRqjMkk5ASyq/+50IQnYbPlpGvGHzOeYH//pjDdsrtOIrHorcLQ+bVwFF5zGg0BUK84D4p8hJZdngfBJk7ikEjBbWuI0BBYRBaI+pmHGr8PpWWlMZ2CSZJrrqgLW4dLcR/HuiWhcCNKX8vRbs1DJi/yGzP2yUVINDYf0CrIWRyC1oFI1huoHVntHEWaarL/sWrSZyb8HNTQF3MAe3rt/bXPjH4hpw9akYw0zoCurENDuX5aHkLr05IduZd9h2tirMWR1pdFbst9MZkQDu6hDJjgC1XeM0PQc3L/jOEAr0jvGqe3k71t35dGylvOolF08rfVTUFT/k/xoSTySCLe9cSCG0ZO4L0UeJDQpR3q2XalIquvEMsRX01NuAM9jCADwAQt7iBw== 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)(39860400002)(396003)(366004)(346002)(376002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(26005)(86362001)(6512007)(31696002)(2906002)(478600001)(36756003)(83380400001)(53546011)(38100700002)(6506007)(6486002)(4326008)(5660300002)(41300700001)(66946007)(66556008)(110136005)(2616005)(316002)(8676002)(31686004)(8936002)(66476007)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eTRvSWR5dysrU2s3N2ZDS2huekNnb0J3bWpMM0hYejJnSkhZbkZSaUpWT0o1?= =?utf-8?B?RjJIZDJhTGR6cnpGK0JsNVZSZGxSTHNlbUpYTUE5SWVnN2pVbFl0eDhLM0JY?= =?utf-8?B?Q1JUUExENjI1c29NVS92a3B4UG9FUVN1blpHcnVOZFR6VldrSm9FTmt4STA1?= =?utf-8?B?WGJ1NTR6RThGMjF3amF1UWowNlEwZjFsRUFPeTJ0bkhIenBLRUw2Tk5Kald6?= =?utf-8?B?Y0Rsc012QnZPUG40TE5OSXNTOW5yYXg2T0hOMWdZK1RBSXFNU0UrS2U2R0Qv?= =?utf-8?B?eWFjVTZqZjFMaHhJK1NlaWxhVzZvTENUZFQ4WVBpSnlhdWcwTElValRZRFNv?= =?utf-8?B?d3BxNVhpTVo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: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 804c6d65-9390-4974-09bc-08dbcf083b06 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 11:57:26.0783 (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: 2xAkArtNtdkBmFtc4QdZec/6TGl04uhQ1J0hLbshPMndq1Ar/dBnzDsGiD2mCgdf X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9222 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amaranath Somalapuram , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Am 17.10.23 um 13:22 schrieb Somalapuram, Amaranath: > > On 10/17/2023 4:35 PM, Karolina Stolarek wrote: >> Hi Amaranath, >> >> On 16.10.2023 15:08, Somalapuram, Amaranath wrote: >>> >>> On 10/16/2023 2:22 PM, Karolina Stolarek wrote: >>>> Add tests for building blocks of the TTM subsystem, such as >>>> ttm_resource, >>>> ttm_resource_manager, ttm_tt and ttm_buffer_object. This series covers >>>> basic functions such as initialization, allocation and clean-up of >>>> each >>>> struct. Testing of ttm_buffer_object also includes locking and >>>> unlocking >>>> the object for validation, with special scenarios such as an >>>> interrupted >>>> wait or deadlock. >>>> >>>> Some of the test cases check the bulk move mechanism and how it >>>> interacts >>>> with pinned buffers. This is to be seen if we want to add dedicated >>>> testing >>>> for bulk move or not. The resource allocation subtests use >>>> ttm_sys_manager >>>> for now. Resources that don't use system memory will be indirectly >>>> tested >>>> via tests for ttm_bo_validate()/ttm_bo_init_validate(), using a mock >>>> resource manager. >>>> >>>> Use kunit_tool script to manually run all the tests: >>>> >>>> $ ./tools/testing/kunit/kunit.py run >>>> --kunitconfig=drivers/gpu/drm/ttm/tests >>>> >>>> To build a kernel with TTM KUnit tests, first enable CONFIG_KUNIT, and >>>> then CONFIG_DRM_TTM_KUNIT_TEST. >>> Tested [PATCH v4 0/4] Improve test coverage of TTM patches on AMD >>> platform, looks good. >> >> Many thanks for taking a look. >> >> Do I understand correctly that your Tested-by would apply to all the >> patches here? >> > Yes, I have tested all the 4 patches together. No time for an in deep review, but I'm going to pick this up and push it to drm-misc-next. Thanks, Christian. > > Regards, > S.Amarnath >> All the best, >> Karolina >> >>> >>> Regards, >>> S.Amarnath >>>> Many thanks, >>>> Karolina >>>> >>>> v5: >>>>    - Actually use the page_flags parameter in ttm_tt_simple_create() >>>> >>>> v4: >>>>    - First unreserve the object before calling ww_acquire_fini() in >>>>      ttm_bo_reserve_double_resv subtest >>>>    - Silence lockdep in ttm_bo_reserve_deadlock subtest (open to >>>> suggestions >>>>      how to fix it in a different way) >>>>    - Use a genuine GEM object in ttm_buffer_object instead of an >>>> empty one >>>> >>>> v3: >>>>    - Instead of modifying the main TTM Makefile, use >>>>      EXPORT_SYMBOL_FOR_TESTS_ONLY() macro for symbols that are >>>> tested but >>>>      not widely exported. Thanks to this change, TTM tests can be >>>> built >>>>      as modules, even when non-exported functions are used >>>>    - Change the description of a patch that fixes >>>> ttm_pool_pre_populated() >>>> >>>> v2: >>>>    - Remove Makefile for KUnit tests and move the definitions to the >>>>      TTM's one >>>>    - Switch on CONFIG_DRM_TTM_KUNIT_TEST=m so the tests and TTM module >>>>      are built as one. This allows building the tests as a module, >>>> even >>>>      if it uses functions that are not exported >>>>    - Fix ttm_pool_pre_populated(); a wrong flag was passed to >>>>      ttm_tt_kunit_init() function >>>> >>>> Karolina Stolarek (4): >>>>    drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man >>>>    drm/ttm/tests: Add tests for ttm_tt >>>>    drm/ttm/tests: Add tests for ttm_bo functions >>>>    drm/ttm/tests: Fix argument in ttm_tt_kunit_init() >>>> >>>>   drivers/gpu/drm/ttm/tests/Makefile            |   3 + >>>>   drivers/gpu/drm/ttm/tests/ttm_bo_test.c       | 619 >>>> ++++++++++++++++++ >>>>   drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c |  51 +- >>>>   drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h |   4 + >>>>   drivers/gpu/drm/ttm/tests/ttm_pool_test.c     |   3 +- >>>>   drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 335 ++++++++++ >>>>   drivers/gpu/drm/ttm/tests/ttm_tt_test.c       | 295 +++++++++ >>>>   drivers/gpu/drm/ttm/ttm_resource.c            |   3 + >>>>   drivers/gpu/drm/ttm/ttm_tt.c                  |   3 + >>>>   9 files changed, 1313 insertions(+), 3 deletions(-) >>>>   create mode 100644 drivers/gpu/drm/ttm/tests/ttm_bo_test.c >>>>   create mode 100644 drivers/gpu/drm/ttm/tests/ttm_resource_test.c >>>>   create mode 100644 drivers/gpu/drm/ttm/tests/ttm_tt_test.c >>>>