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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A296EB64D9 for ; Mon, 19 Jun 2023 08:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229462AbjFSIsS (ORCPT ); Mon, 19 Jun 2023 04:48:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231224AbjFSIrs (ORCPT ); Mon, 19 Jun 2023 04:47:48 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1A02448E for ; Mon, 19 Jun 2023 01:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687164364; x=1718700364; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=BNE4W1P14rdG6VZuxcI9DPPgclY10aiYF6zQ+x3pbJ0=; b=npOF3U114Gb3v515UdXCbB5+KzluZ/00alxuUYbe+iD4JYkN/NopqByv 32p08mcDm3oiF71EaLJBfFnT/lx4CzuhQGVzymsLSsmCFRY+MjeTS/lwU Sj2AbJE3nkxqeXR3L3SBkvt9TU0cPOoRe23YpCOfLtalISH9AdpweQYKQ ojmfZdWXgd0b6nKGk+Z89GN8NhtI5ITaqLv9/Td7IIFcYWtgg+vsAozbq K//iEIOS+MSjy4a0+VVsSZXO+pyrqnT+GEHbhTyKhBwdLbWXKjqrmnjo1 Z59JgaFY2CWqgmsj1RXzt4tjzmjEdSUCFSV8wgjkN25av0zPc3ZYNRPw6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="344327718" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="344327718" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 01:44:25 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="747478487" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="747478487" Received: from acarew-mobl.ger.corp.intel.com (HELO [10.213.214.207]) ([10.213.214.207]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 01:44:22 -0700 Message-ID: Date: Mon, 19 Jun 2023 09:44:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page() Content-Language: en-US To: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= , Ira Weiny , Sumitra Sharma , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Fabio , Deepak R Varma References: <20230617180420.GA410966@sumitra.com> <648f48bc3d3c2_1de3f9294a3@iweiny-mobl.notmuch> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/06/2023 08:59, Thomas Hellström (Intel) wrote: > > On 6/18/23 20:11, 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. >> >>> 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. > > Thanks. > > >> 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 > > LGTM. Reviewed-by: Thomas Hellström 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