Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6087352rwd; Mon, 19 Jun 2023 02:01:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Sf6BQrrDpsyhf7Pf9e1uXUc06W6eUi5zMsNQvqcUt/uJMjZX4Ar1FLk4wkr1vjmXd/Iwf X-Received: by 2002:a05:6a21:585:b0:10e:f369:2809 with SMTP id lw5-20020a056a21058500b0010ef3692809mr4162608pzb.21.1687165273442; Mon, 19 Jun 2023 02:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687165273; cv=none; d=google.com; s=arc-20160816; b=lYFxGQiYEJvjW0X77cg2f06U77LVOs9RQtPhVpHUIZwHqMS1rrT2wR8ensiVaKYX0v NQOGpAuXlAX1tOhH7LWEhJBv6RR5Sl86dQpjMHON/x5EHKnVBwB1H55BiJYtkzl8ONeT Y9Mz0/v2yZo3YdkAG95F/Lvy4yJKxgj5kaTPcop5EMQimajCdbv+4LjisIt/wNyRLSVD g4lXhgl1pcUmyFWsSXMhi064TP2ReezWf5NVBaIy5B7A7JWua+RHkbQzW+SRrumowFE9 awZgYs4jgcn/eZfaSU/ql6F2G6iJXfNPQC5ZgmwXnRxzRWoxi/biakYtu6bWDIhuuGPB 2bAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=xiHMje7NRBiGjfMFm/F1eMK2xY3suO5ajUSJtoCxMRQ=; b=kUrvQ7f0htpwMrck1Rfe7FAD2pJgdpWVWNuuw8sudAByAe9dbmjbHRJV1LoHy6Sxs6 kL0U237gjzKCSgA2KzZo1Ss+xmpwCwq4F10Xnnoza4s5nuAWeoCBQawxEw1kZcU4u8yc 6SV+QTiu2ug93WoB2JrGclZrf8dc9LYhcFlkVfxHBrjoB5q3ZtNItScIDhVoitlitIHs cx5foF4wghLEqNvy3iPyIVC0rtaRb4Ky1efuoFBCE9Ifs/26jayl6y2i+/xt5Qn9tyTp h+70rbJ8ZDfohdMF7zdZmcSpN1rMmuexaKHDGrcJX5djT9FwMObzc9nk6pPAGUX0oyVg S7MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=npOF3U11; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22-20020a637216000000b00553a587e5dasi3297308pgc.833.2023.06.19.02.00.26; Mon, 19 Jun 2023 02:01:13 -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=npOF3U11; 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 S230328AbjFSIsP (ORCPT + 99 others); Mon, 19 Jun 2023 04:48:15 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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