Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7835627rwd; Tue, 20 Jun 2023 06:56:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ506am6vCr0rbhyaMofNHurIfS4Dgfb5Y+/PkqJOVvbn3bORhoSltdUpcrS1Uacdr7DTSMO X-Received: by 2002:a17:90a:2b88:b0:25b:eba8:15d6 with SMTP id u8-20020a17090a2b8800b0025beba815d6mr6618419pjd.39.1687269411275; Tue, 20 Jun 2023 06:56:51 -0700 (PDT) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a17090a190600b0025ec4206a7csi8050395pjg.169.2023.06.20.06.56.39; Tue, 20 Jun 2023 06:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FEefkzmj; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232903AbjFTNZj (ORCPT + 99 others); Tue, 20 Jun 2023 09:25:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233337AbjFTNZY (ORCPT ); Tue, 20 Jun 2023 09:25:24 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00CE019B2 for ; Tue, 20 Jun 2023 06:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687267486; x=1718803486; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=/9wmxs4B4SCBbFhh4zfbsdkTcc01g1Z457mZr4mhRms=; b=FEefkzmj2lHYfvxVTd5OVoEsfjxPbCJ1MD7g/IXV7HBZcKbfYXQp+T87 l4kNsCaJ/hK0rLzUsj4v8WQ6MoCRbj0dWq7WaYQYghGQeoEJUt1lXe0cx 3YnA6VwIhKmAgEPWWnVMQhtTBuX7EnrWnK9jGc94eIr0zJao7zp2Du7LL 3kOnKaPbLtS03dO8CG59yXRwaHZDdwWxa+9iP+mIpcPPuR+WdeQHpAUWC 1ha8xChi4pAcU7rWC1z61TXuymmr/PNJteyRJBTbhJS3lhx0Sl0cEDM1L gVpeU1JJ8Qx1tKxZEJ2deXijG7qHBnzWL4am+/VM8fSoaR9ah46ryOvMD g==; X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="389105708" X-IronPort-AV: E=Sophos;i="6.00,257,1681196400"; d="scan'208";a="389105708" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 06:23:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="784072092" X-IronPort-AV: E=Sophos;i="6.00,257,1681196400"; d="scan'208";a="784072092" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 20 Jun 2023 06:23:49 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 20 Jun 2023 06:23:48 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 20 Jun 2023 06:23:48 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Tue, 20 Jun 2023 06:23:48 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.40) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 20 Jun 2023 06:23:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iUdrD2XABCoBzpv756kaI8SDIUXXybm6xxA54Oq5Ddis+/hbfd5f6YulF5vVXJo37SwaKMc8b3l8cwf8WdnBq0yMPgYuBuXdm3RGZUNFgwqt9Vnpf6WesVvLX62ZekFfIUKLLSLeQ0Sk1Da1GwnBinaMlYXjKxTDL6ftu18T4pBas44nTsQchif3paKx0aw58nw8XhawJpEycD/Ya9pccGWKUvbu8p0E6tnfbz8wqESFFmqwoobcJg47YxtGat34rqT75eMdctx0Rm9gAd+a5eyrLTIRrmjzvFt5zxZI6wsILWCye7uBeAyijJd/qm671r5U9rBh3bFZae02RM+rDA== 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=+6yGa5+Fmwhz5ngrpu55gi2aWYio4ETVaLi6AMSd1ds=; b=Ub5bosxGxxoGmH+Irzikqleiyu10P/iwtYfuC398iLwlab1KnZ39ymopVmET8nglvNTv/hPRC8ijmkyQ2P8ltoXbCFOzgx8ECVoTUVz3NjHyjAutWbN5icIOx8wEU3+V+cz+gUJVxF6DAF3DwKQIK8o7fxPXwWIe2J8meGa54zvLHUGLlKvKTv9BgdP+GLosaJaKPCHpb0UyjC0rQ3TDzNAa+UZtispmlmJ9Jb5EYhYA0gciuPtCFmccfLt3Xbueo9plLjlhuK0VMwnU7V4sQDRF0iPK6hHqIPL3fvVsiT/vC3ZBvFLnJFEie1z8uqpLxm0RENfX1MoZaO9CQmHUzQ== 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 SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) by PH7PR11MB6932.namprd11.prod.outlook.com (2603:10b6:510:207::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.35; Tue, 20 Jun 2023 13:23:45 +0000 Received: from SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::7237:cab8:f7f:52a5]) by SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::7237:cab8:f7f:52a5%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 13:23:45 +0000 Date: Tue, 20 Jun 2023 06:23:38 -0700 From: Ira Weiny To: Sumitra Sharma , Ira Weiny CC: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , , , , Thomas =?iso-8859-1?Q?Hellstr=F6m_=28Intel=29?= , Fabio , Deepak R Varma , Sumitra Sharma Subject: Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page() Message-ID: <6491a85a37cc8_28e729425@iweiny-mobl.notmuch> References: <20230617180420.GA410966@sumitra.com> <648f48bc3d3c2_1de3f9294a3@iweiny-mobl.notmuch> <20230619154550.GB412243@sumitra.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230619154550.GB412243@sumitra.com> X-ClientProxiedBy: SJ0PR05CA0026.namprd05.prod.outlook.com (2603:10b6:a03:33b::31) To SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB6733:EE_|PH7PR11MB6932:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a184b40-6f01-479d-05ea-08db71919298 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HX5JLApR7fBGYa2haNrZ09vmocj/ypuHVWu5BCjJxZDFW3cPKAT0YjJeZZ/22JJF49Ihw0OWmyRGCavc9r71teXyOqUck+x0N0ZUQ7tIKHjS8Nnwa395zbR8hV5yB0//zwX6bDbTHwY+qLTPpcv0RRTC5Jaa2zg8q+xWYH4T8E3LFogASr93uv4E0lHCbUJPhMqQIuvqoVXJLucA8Axsg+e5tpV1c0X8n0CuA4GYhj2Tbf6myxNJcpd4vlC5D1dfxxhdEmGoFU/d87aGkmnw51s7+JiRdSAl/Jd8oG7AS2j1c0Dt+woo/NddAwztSoyaIpD5xOsVFIdIlJMAf3w/0B+dabFbtBYw3vpRRv/B7fGf009G8J9kXwfyc2Cc++3VPV/2+WZZZWNHS0p+nsl7NVkmhS4DgfL+OdPmeloGWS3MaScsk61yf0IC7XZLN8qVDlggKZP7uYLuuSxGu5DzXyN8W8jHSAXXmbxPAOI9XVvmd43H1z/HBs0Udc4sEomNaQJnQCMqGyJb1YMQFCRZEEByRBWAAOwBJjdCKMvF8fU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB6733.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(39860400002)(346002)(136003)(396003)(376002)(451199021)(66899021)(478600001)(66946007)(66556008)(66476007)(4326008)(6666004)(54906003)(316002)(86362001)(110136005)(6506007)(6512007)(9686003)(186003)(6486002)(966005)(38100700002)(82960400001)(41300700001)(8676002)(26005)(8936002)(5660300002)(2906002)(83380400001)(7416002)(44832011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RGl0blNsY2dOSlNNa2FXSWhIT3l0TlB3Smw4VEttbFg2RUkrOEExazFYY2Np?= =?utf-8?B?VVBYYjN3R3RUZ0srMk9lZjFDZ1oyMGVrUjhPbWh4NlovYUk5M0Q0aVo2aFdF?= =?utf-8?B?ZmJaWmpaOExabGhFa1J5Y3BRallla3pPQ3E5SU4xTGRPcUZKdko3Y2FlZERj?= =?utf-8?B?NHhQYy9sZDhZU0FXY083djVrTWdtZE42SU5wNW9BSk8vak9yeG1TUVBOUm95?= =?utf-8?B?cFRnOFkvUmlwZlJaTmVBT1ZJZXB3bCtBNmVVSjVLYjVvWE9KZFVGNTRuMUsx?= =?utf-8?B?c25kNXFGWFp4OE1Ba0IxcUFENTFPSjQyNzdycWIvRTdYS3JHQTJmQnlNNXgx?= =?utf-8?B?VHN3N2tYTnNRQ3h4TDJaNzhNR1FuMW0wVVc4ZS8yc29LZ0NyRVhEbmZxZDVu?= =?utf-8?B?VVEyZ2pYZHZ3eis5Zkc2bHpucmFWQ1A5WCtHTFRLUFlTdnlTR0dGcXB2SStz?= =?utf-8?B?TnBGMU81SW1oVGdRTjBTZFdzSHpCSGRWdE8vcUxrTW10Ym0wdFplaHVCdHZi?= =?utf-8?B?cUlXaVpraElSOHRTZlJOVGZUUFhPcW9Ca3QrVXFzbGJLUzNyeTMyWG5QL2dl?= =?utf-8?B?STFWemtER25aRTI5bXdhQWN0Q3JHaE50c2VyU2t5Wm1SUzRCUmMyMTVsTVN5?= =?utf-8?B?Q0syYm5NdlM1QU45dkZ6UT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S84cWhKbElkdzNDaVJMRlYrbHhlUWx3UTNpWG9sbTJPNjVMckVaRkhnOUU3?= =?utf-8?B?N1craWdreExMY3lnQkZTYW5uM0l0dm4rSzNmM3RRaDdzaGl4a1VqcS9jcGpF?= =?utf-8?B?bndkVjZEU0VHWlhaWEFQS1JtcmxTTWNHRzhUL0lVTld6ZmV0MFJuQjdEZG05?= =?utf-8?B?czVkbmVIT3Bmdi9wUkl4b1Z4YkpWTHRHdW02WjBxaEJkRGplMGt5RUlvejIz?= =?utf-8?B?NU9tWnVYRDIwSEd4WXBXRlllNDZ2Tm5xbzNjQ3VOUkIva2Y1NVJ3V2liZE5G?= =?utf-8?B?S2ExRkp1OVl0SUxQa3pIMDNpc08rUlgxcHdyZm05eUZHRXloKy9MU3lWU3dt?= =?utf-8?B?YlY2K0d2OGlpaGQwL3FybTh1eThxWlNqNDA2Y0tsVHdveVJYdWtURklOdzJn?= =?utf-8?B?VGd2cU9Ic2E2YzNvS3BBbnRaNCtveE9qTzVzWFhNV0I5UXZ6ZVphYno4VXp4?= =?utf-8?B?azJDdkJoKzFIeDBpUjBPOTZjZ0tJMWdkV0ZvS29DNC9Ud1lJTGR0aUJ6ZDhl?= =?utf-8?Q?SUHbbyNMd6dQXV3CStuRTikZU?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6a184b40-6f01-479d-05ea-08db71919298 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB6733.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 13:23:45.0053 (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: 2PwEF2mKuwN3D3Wwwyl74gYDZhNZ/+9Tz4Rl0jePQ0zNmoa85bzlS58Upfb00SJwJHV6jXJagQT/qyHYVObHPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6932 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Sumitra Sharma wrote: > On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: > > Sumitra Sharma wrote: > > > kmap() has been deprecated in favor of the kmap_local_page() > > > due to high cost, restricted mapping space, the overhead of a > > > global lock for synchronization, and making the process sleep > > > in the absence of free slots. > > > > > > kmap_local_page() is faster than kmap() and offers thread-local > > > and CPU-local mappings, take pagefaults in a local kmap region > > > and preserves preemption by saving the mappings of outgoing tasks > > > and restoring those of the incoming one during a context switch. > > > > > > The mapping is kept thread local in the function > > > “i915_vma_coredump_create” in i915_gpu_error.c > > > > > > Therefore, replace kmap() with kmap_local_page(). > > > > > > Suggested-by: Ira Weiny > > > > > > > NIT: No need for the line break between Suggested-by and your signed off line. > > > > Hi Ira, > > What does NIT stand for? Shorthand for 'nitpicking'. "giving too much attention to details that are not important, especially as a way of criticizing: " - https://dictionary.cambridge.org/dictionary/english/nitpicking Via email this is a way for authors of an email to indicate something is technically wrong but while nicely acknowledging that it is not very significant and could be seen as overly critical. For this particular comment I'm showing something to pay attention to next time but that was not a big deal this time around. > > Thank you. I will take care about the line breaks. > > > > Signed-off-by: Sumitra Sharma > > > --- > > > > > > Changes in v2: > > > - Replace kmap() with kmap_local_page(). > > > > Generally it is customary to attribute a change like this to those who > > suggested it in a V1 review. > > > > For example: > > > > - Tvrtko/Thomas: Use kmap_local_page() instead of page_address() > > > > Also I don't see Thomas on the new email list. Since he took the time to > > review V1 he might want to check this version out. I've added him to the > > 'To:' list. > > > > Also a link to V1 is nice. B4 formats it like this: > > > > - Link to v1: https://lore.kernel.org/all/20230614123556.GA381200@sumitra.com/ > > > > All that said the code looks good to me. So with the above changes. > > > > Reviewed-by: Ira Weiny > > > > I have noted down the points mentioned above. Thank you again. > > I am not supposed to create another version of this patch for > adding the above mentions, as you and Thomas both gave this patch > a reviewed-by tag. Right? > Based on this response[*] from Tvrtko I think this version can move through without a v3. Thanks! Ira [*] https://lore.kernel.org/all/bcb0a1d2-cd4d-a56f-1ee6-7ccfdd2f7b38@linux.intel.com/ Thanks all! I'll just re-send the patch for our CI, since it didn't get picked up automatically (stuck in moderation perhaps), with all r-b tags added and extra line space removed and merge it if results will be green. Regards, Tvrtko > > Thanks & regards > Sumitra > > PS: I am new to the open source vocabulary terms. > > > > - Change commit subject and message. > > > > > > drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c > > > index f020c0086fbc..bc41500eedf5 100644 > > > --- a/drivers/gpu/drm/i915/i915_gpu_error.c > > > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c > > > @@ -1164,9 +1164,9 @@ i915_vma_coredump_create(const struct intel_gt *gt, > > > > > > drm_clflush_pages(&page, 1); > > > > > > - s = kmap(page); > > > + s = kmap_local_page(page); > > > ret = compress_page(compress, s, dst, false); > > > - kunmap(page); > > > + kunmap_local(s); > > > > > > drm_clflush_pages(&page, 1); > > > > > > -- > > > 2.25.1 > > > > > > >