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 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 65CA7CDB47E for ; Fri, 13 Oct 2023 19:12:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E912B10E640; Fri, 13 Oct 2023 19:12:38 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 33EED10E63E for ; Fri, 13 Oct 2023 19:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697224357; x=1728760357; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=P5Ce73N1UF7U+LN92egsYWBUMwQhPBDMkm26BW+50M8=; b=joFPoq+5YMbF4moljaCMQUVRBjG7Z32TTeH2Zu0ym4S2BiAmFvdQuPGn uqWwCBVeFd4J9I6ti6mLSZY93HiHT7lgDz0PDEhAihhYz2koeLiNncPP5 VcUsN/s5qaQ+h3pMN4lrIx8wUrH1qifBItZBuYMHIdJRn+6Xp0L7hwH1u kEylMiCFufEW32gzYDum7/lIwEgFHAzjYDnmo7ZiJu4JdBCKAmwKMfD0M nlTVxK2kCKHes1mDY+uotn5xhXth/9wc9xiqWaSbRE8V3064cuWCk6OEE ekmnRtV4Jk+VScAzziHOLOyoCvOzRi9vWhUpjXM7DEjEf9om6ppx18Dk/ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10862"; a="471477548" X-IronPort-AV: E=Sophos;i="6.03,223,1694761200"; d="scan'208";a="471477548" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2023 12:12:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10862"; a="748453638" X-IronPort-AV: E=Sophos;i="6.03,223,1694761200"; d="scan'208";a="748453638" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Oct 2023 12:12:35 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 13 Oct 2023 12:12:35 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Fri, 13 Oct 2023 12:12:35 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Fri, 13 Oct 2023 12:12:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1obQLCcPF7HSxmjL7Vn0SnNRMjtJBby2YW3B5yZWFWR3xrSCWcFp5ib/hmzIKPurU1G55NUV4a94N4Dd09luTpnY7qIDeZ6lvlxvBZCb9O1bqz1kKyDZrQY098YQNe4+3d+Vl8A2maFwrBqBZqVcIg+OvgHXvX+bQczobx6Q884xlJDB7yaWIaahg0ekrXoFNEQTOxV1JlRtu7nuehbSJsQQQ0FS07nDxJZeM7BQrStkDf1luDSTG5qkZmMF5I2EQpI0CCfU4AklJcxnc0xjiwKG+ITIat1+imT32VaPCtdaWtTzHSudL4ADYNzdXiKJ5zHPou8u6CyFzt9S3pzEg== 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=qdSy44Ubvmv9ErxqQuXyqmsGgpLp/dWMOQPNFeSoe8k=; b=atNswiosYsotaz3LE00l4sGjYl0nNeks6xnQEjaLWKpFfeqYnPK8lKSCFXnlfFBtSkSr5Ckr3/yuN9YUbIMN+rqvyI9ogWPg27rQCr6oO23R5fqPKjnjBjrBxlSi0DmXJK2C2q59fEq+b5Or7rpOpLDQGM/JPO4sxb06hM6oNx9hnnhFisFoLakcA0nUOwhuvf0/TA4eTMiBiNbK328qwdjpp3tAUAVshCfiOsHVjuEdNKzdGnge4LDfv/7eX0GQk+8+CR/KlYDsAp5e+ska9xxzZuURcuUvFgEdl4sttyO3xlMW7S/k5ukeMadE/EPXeIoS+O9bLnBENCE2TjWRZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BY5PR11MB3911.namprd11.prod.outlook.com (2603:10b6:a03:18d::29) by PH0PR11MB5610.namprd11.prod.outlook.com (2603:10b6:510:e9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.44; Fri, 13 Oct 2023 19:12:33 +0000 Received: from BY5PR11MB3911.namprd11.prod.outlook.com ([fe80::a782:6fec:8d96:27b5]) by BY5PR11MB3911.namprd11.prod.outlook.com ([fe80::a782:6fec:8d96:27b5%6]) with mapi id 15.20.6863.043; Fri, 13 Oct 2023 19:12:33 +0000 Message-ID: <1125fc7f-3f14-4ee8-bb3d-c39a30256964@intel.com> Date: Fri, 13 Oct 2023 12:12:30 -0700 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: "Cavitt, Jonathan" , "intel-gfx@lists.freedesktop.org" References: <20231012223826.2556700-1-jonathan.cavitt@intel.com> <20231012223826.2556700-5-jonathan.cavitt@intel.com> From: John Harrison In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR02CA0018.namprd02.prod.outlook.com (2603:10b6:303:16d::17) To BY5PR11MB3911.namprd11.prod.outlook.com (2603:10b6:a03:18d::29) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR11MB3911:EE_|PH0PR11MB5610:EE_ X-MS-Office365-Filtering-Correlation-Id: 1d28bd05-0827-4bc2-93a9-08dbcc205a9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HlcfJ9PZEVYB5verRE5OAadKCC+5cMHbRwHjbYsSJ5TuNvqiSmgnVxKo9kZZ7LY4i+slh1TCatoMOWBjHkhIHbcwBaCX5kOUJervDSej5eFHQ7j3FBPigxoX89K3lgTwsi5HqT5Y9tviE0xMacqWNDPHxXkj282BElJKCRyT/pt3X04LgxQzLop46vV+XX0nph0uyx99U4C9kFv9UToQxAjmZr1h67U+NVZFIszzwMWYa2qHbDk26AeyhEjXe0A3jyPd6AwYlNB2L/LznMC3CkCSCFMwD19lPa8gDvvx/G1KEJkygsYbO7DxDmlZDzgrYCD7jv7YRWiEl4apI82Ui5xdkR7qI6x5DhQ9luUWiPELVGmutpXxgOPlxO5Chw8HlyzURNdXCszpFQTwScvnUpRIopemw7lk7ZVseWUkymaLM3k6+rUD5uUK6Xsi3oqllWxqk3GttuEuGRrybm3/BXTnQPJ31vIFpEPAs8FHYUt44WHu9SPzd4ke5Z61EyU2lN1Hu1XHDzHhgD1UyT/IUVJIAxszwc+NdCK5oFhGgK2MogdW712PVwWBSC84h5/XQN6mWk2jEFuwwgLIrTMkDo3MqZk+PjMb1d+IPlUKTMap+3HVVyRQcm7nU5rKRr15NP9eB8kiGqftm7ByZi1yOg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB3911.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(376002)(39860400002)(366004)(136003)(396003)(230922051799003)(451199024)(64100799003)(1800799009)(186009)(6486002)(478600001)(4326008)(8676002)(66899024)(54906003)(15650500001)(66476007)(66556008)(110136005)(316002)(66946007)(8936002)(82960400001)(86362001)(2906002)(38100700002)(36756003)(5660300002)(41300700001)(31696002)(26005)(6512007)(31686004)(2616005)(83380400001)(6506007)(53546011)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bk9OMDZyV1g2NTNsdG1hWWVHL2FJeXg2dkFtVGRKVlFDZzNKNGNRM2R0MEZV?= =?utf-8?B?UGJ6MUpUWHZzejJTdDVMa3NsdGFLZGtCMmZ0cFBhbzVGbUY4V2dBQ1Nza1p6?= =?utf-8?B?eE5yczE1Rzc1dFE5ZUNTc0xPUGNGQ21MTWpJYkVRcklEbFFvR0NMcFNnSldI?= =?utf-8?B?QW8rSGMrSXNHWFk2Z3VKazJtT1k1QlZ5TEJWT1dYR1ErQXU4c2IybitwcnZu?= =?utf-8?B?VlhNVmdCbkd5WEJtbThpQkpvODdEN3NEMUVOdFB6dG1qTG9tM2gvV25BWnFr?= =?utf-8?B?Q0QwR0tVOVpRYmJPT0NYKzN3RHc2aDBmT25JUzFwRy8xMGI4VTlxRUxQMith?= =?utf-8?B?Q0tlaW5vR3N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=?utf-8?B?Q1E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1d28bd05-0827-4bc2-93a9-08dbcc205a9f X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB3911.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2023 19:12:33.5658 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /rdsHBkDdhRsKjZgWzUM2il0JVhaN0mMee0iByZJYruWCb2C9U2YOGoaipXTAFW6PO6vcTCcYpp49oE6fWJdj8AN95AYhe8fUdry/gsAAxI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5610 X-OriginatorOrg: intel.com Subject: Re: [Intel-gfx] [PATCH v13 4/7] drm/i915: No TLB invalidation on suspended GT 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: "Krzysztofik, Janusz" , "Shyti, Andi" , "Roper, Matthew D" , "Gupta, saurabhg" , "chris.p.wilson@linux.intel.com" , "Das, Nirmoy" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 10/13/2023 07:42, Cavitt, Jonathan wrote: > -----Original Message----- > From: Harrison, John C > Sent: Thursday, October 12, 2023 6:08 PM > To: Cavitt, Jonathan ; intel-gfx@lists.freedesktop.org > Cc: Gupta, saurabhg ; chris.p.wilson@linux.intel.com; Iddamsetty, Aravind ; Yang, Fei ; Shyti, Andi ; Das, Nirmoy ; Krzysztofik, Janusz ; Roper, Matthew D ; tvrtko.ursulin@linux.intel.com; jani.nikula@linux.intel.com > Subject: Re: [PATCH v13 4/7] drm/i915: No TLB invalidation on suspended GT >> On 10/12/2023 15:38, Jonathan Cavitt wrote: >>> In case of GT is suspended, don't allow submission of new TLB invalidation >>> request and cancel all pending requests. The TLB entries will be >>> invalidated either during GuC reload or on system resume. >>> >>> Signed-off-by: Fei Yang >>> Signed-off-by: Jonathan Cavitt >>> CC: John Harrison >>> Reviewed-by: Andi Shyti >>> Acked-by: Tvrtko Ursulin >>> Acked-by: Nirmoy Das >>> --- >>> drivers/gpu/drm/i915/gt/uc/intel_guc.h | 1 + >>> .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 22 ++++++++++++------- >>> drivers/gpu/drm/i915/gt/uc/intel_uc.c | 7 ++++++ >>> 3 files changed, 22 insertions(+), 8 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h >>> index 0949628d69f8b..2b6dfe62c8f2a 100644 >>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h >>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h >>> @@ -537,4 +537,5 @@ int intel_guc_invalidate_tlb_engines(struct intel_guc *guc); >>> int intel_guc_invalidate_tlb_guc(struct intel_guc *guc); >>> int intel_guc_tlb_invalidation_done(struct intel_guc *guc, >>> const u32 *payload, u32 len); >>> +void wake_up_all_tlb_invalidate(struct intel_guc *guc); >>> #endif >>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c >>> index 1377398afcdfa..3a0d20064878a 100644 >>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c >>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c >>> @@ -1796,13 +1796,24 @@ static void __guc_reset_context(struct intel_context *ce, intel_engine_mask_t st >>> intel_context_put(parent); >>> } >>> >>> -void intel_guc_submission_reset(struct intel_guc *guc, intel_engine_mask_t stalled) >>> +void wake_up_all_tlb_invalidate(struct intel_guc *guc) >>> { >>> struct intel_guc_tlb_wait *wait; >>> + unsigned long i; >>> + >>> + if (HAS_GUC_TLB_INVALIDATION(guc_to_gt(guc)->i915)) { >> Why the change from 'if(!is_available) return' to 'if(HAS_) {doStuff}'? > > I feel like this question has two parts, so I'll answer them separately: > > 1. Why HAS_GUC_TLB_INVALIDATION and not intel_guc_tlb_invalidation_is_available? > > Wake_up_all_tlb_invalidate is called during the suspend/resume path, specifically in the > middle of suspend. It's required for it to be called here to clean up any invalidations left > in the queue during the suspend/resume phase because they are no longer valid requests. > However, the suspend/resume phase also resets GuC, so intel_guc_is_ready returns false. > In short, using intel_guc_invalidation_is_available was causing us to skip this code section > incorrectly, resulting in spurious GuC TLB invalidation timeout errors during gt reset. I'm not following this argument. If a reset is occurring then there is no need to issue the invalidate. And the previous version was skipping if GuC is in reset but this version does not. Which means it is now sending invalidate requests to GuC when GuC is not able to respond and therefore more likely to cause timeout errors not less likely. > > > 2. Why use a positive check to perform and not a negative check to skip? > > In patch 3, wake_up_all_tlb_invalidate was originally called universally on all platforms > during intel_guc_submission_reset, which is incorrect and not how was reimplemented here. > I discovered this was the case and retroactively corrected it, as seen below. > Because of how intel_guc_submission_reset is structured, a negative check to skip wouldn't > make much sense there, so I used a positive check to perform instead. This is a holdover from > that implementation, and was kept to maintain consistency between patches 3 and 4. It's > probably not as big of a deal as I'm imagining, but I think it would be awkward if the initial > implementation in intel_guc_submission_reset and the reimplementation in > wake_up_all_tlb_invalidate weren't superficially the same, even if they were functionally > equivalent otherwise. I would argue that a bunch of early exit conditions at the start of a function is easy to read and maintain than adding nesting levels to the entire function. John. > > > -Jonathan Cavitt > > >> John. >> >>> + xa_lock_irq(&guc->tlb_lookup); >>> + xa_for_each(&guc->tlb_lookup, i, wait) >>> + wake_up(&wait->wq); >>> + xa_unlock_irq(&guc->tlb_lookup); >>> + } >>> +} >>> + >>> +void intel_guc_submission_reset(struct intel_guc *guc, intel_engine_mask_t stalled) >>> +{ >>> struct intel_context *ce; >>> unsigned long index; >>> unsigned long flags; >>> - unsigned long i; >>> >>> if (unlikely(!guc_submission_initialized(guc))) { >>> /* Reset called during driver load? GuC not yet initialised! */ >>> @@ -1833,12 +1844,7 @@ void intel_guc_submission_reset(struct intel_guc *guc, intel_engine_mask_t stall >>> * The full GT reset will have cleared the TLB caches and flushed the >>> * G2H message queue; we can release all the blocked waiters. >>> */ >>> - if (HAS_GUC_TLB_INVALIDATION(guc_to_gt(guc)->i915)) { >>> - xa_lock_irq(&guc->tlb_lookup); >>> - xa_for_each(&guc->tlb_lookup, i, wait) >>> - wake_up(&wait->wq); >>> - xa_unlock_irq(&guc->tlb_lookup); >>> - } >>> + wake_up_all_tlb_invalidate(guc); >>> } >>> >>> static void guc_cancel_context_requests(struct intel_context *ce) >>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c >>> index 98b103375b7ab..27f6561dd7319 100644 >>> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c >>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c >>> @@ -688,6 +688,8 @@ void intel_uc_suspend(struct intel_uc *uc) >>> /* flush the GSC worker */ >>> intel_gsc_uc_flush_work(&uc->gsc); >>> >>> + wake_up_all_tlb_invalidate(guc); >>> + >>> if (!intel_guc_is_ready(guc)) { >>> guc->interrupts.enabled = false; >>> return; >>> @@ -736,6 +738,11 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication) >>> >>> intel_gsc_uc_resume(&uc->gsc); >>> >>> + if (intel_guc_tlb_invalidation_is_available(guc)) { >>> + intel_guc_invalidate_tlb_engines(guc); >>> + intel_guc_invalidate_tlb_guc(guc); >>> + } >>> + >>> return 0; >>> } >>> >>