Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9819367rwd; Wed, 21 Jun 2023 12:17:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5aYZEmvjNUrzu9NsBLVqZ3OPoEC12ANHQdsjtt55R5evcA/s6hD4GtAiKcQig/ze4X2+5b X-Received: by 2002:a05:6a00:1595:b0:666:e8e1:bc8d with SMTP id u21-20020a056a00159500b00666e8e1bc8dmr21580908pfk.11.1687375039416; Wed, 21 Jun 2023 12:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687375039; cv=none; d=google.com; s=arc-20160816; b=msujIGpoP7CnbMwfxN1DfOoTfH7nBys1UqgWoCx/UPoYKHSI497YyHZ42GPPDMYDWb GFZ6GcoMvZClWwwrM946WmXFrlZt9MDGz47IAZhl71cok5jnwaQaO5FNHeuB6nHrJWpC NWF1YZy9IoBGQj+sTjydu6NKCWECmWxhkrwckz9qVW3le2VrIK16I1zcEmKKw5/2kQUf m4TvJ8DwlQcGJLq4FoWJcwRIbBbCbQSOnOfNqC4NBeQv46jY5aRmhpKEvGj+iXubxwtJ ZVNGgUwjYzbolknAhEg7r2w1NFvx9UKuXjeXbzOQ4p0UFuRyt7vxQUbPJtrdpmL9kLEd ddGg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3k5E69rGNItptiLpylp+nJfo0544AzXliQGzHDXiWIc=; b=ZSeLtbixAyuodpsM6XvOKBqu8YKdyp+ZX/UnGUUuHpoHRzxE7fT2fgQEOBKw+bMZQC vszTzgo3bdths6CzxmZbq/JnHyOZOd9A5VYhKJDsuUscMbkH0VXN27xaGAl/aWljqkrV 2irst+v44+nfmTEdjCLRA1pOuO7dmT7+ZDQgUbDHHf2B5B9L6CdAMRR/aBAv76PTRDZk vZyeWHnUnPTYP2ywsAv0KQ2clsAx5bnADhMt73Vk6detVEGYTT/PiOLis1GZhU2RoYTd PEhN7bD9lWgoDA5UnveLS886JeIsL6BK8Vi9K1A+Q4mIyxqJNWmtgISCVAoba4A+Oq5E OaoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=efkLibh8; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p26-20020aa79e9a000000b00665bd58cd5fsi1563346pfq.11.2023.06.21.12.17.00; Wed, 21 Jun 2023 12:17:19 -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=fail (test mode) header.i=@shipmail.org header.s=mail header.b=efkLibh8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230463AbjFUSvu (ORCPT + 99 others); Wed, 21 Jun 2023 14:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjFUSvt (ORCPT ); Wed, 21 Jun 2023 14:51:49 -0400 Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8C25199B for ; Wed, 21 Jun 2023 11:51:44 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id C1BC03F338; Wed, 21 Jun 2023 20:51:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Score: -2.201 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Authentication-Results: ste-pvt-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-pvt-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3-gXWQQZVyex; Wed, 21 Jun 2023 20:51:42 +0200 (CEST) Received: by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 774123F23E; Wed, 21 Jun 2023 20:51:40 +0200 (CEST) Received: from [192.168.0.209] (unknown [134.191.232.81]) by mail1.shipmail.org (Postfix) with ESMTPSA id 9061E3631FC; Wed, 21 Jun 2023 20:51:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1687373500; bh=UZ9dLzxvn9rMplig/F09sFuaqVn4QOtCtPf3MFkS8iM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=efkLibh8YRkRPojkYXPtoahK5+L9pTTxJFwWFY/E5z1KuLwVRIS1Ol/XayUG0SLw2 4kPzN99a7iL/03cbcnusyeI7k9kWmZxSVsWPX00sJFSDsfVQ75/eolEVNOYBghgITU w+jgT8AhXHit/waEfolM1s4THtiLY3ETUGSMXvFU= Message-ID: Date: Wed, 21 Jun 2023 20:51:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page() Content-Language: en-US To: Ira Weiny , Sumitra Sharma Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Fabio , Deepak R Varma References: <20230620180759.GA419158@sumitra.com> <79e1f37f-3ffa-0195-860b-08cc890d810e@shipmail.org> <649326df1b895_1c0dd29486@iweiny-mobl.notmuch> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= In-Reply-To: <649326df1b895_1c0dd29486@iweiny-mobl.notmuch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 6/21/23 18:35, Ira Weiny wrote: > Thomas Hellström (Intel) wrote: >> I think one thing worth mentioning in the context of this patch is that >> IIRC kmap_local_page() will block offlining of the mapping CPU until >> kunmap_local(), so while I haven't seen any guidelines around the usage >> of this api for long-held mappings, I figure it's wise to keep the >> mapping duration short, or at least avoid sleeping with a >> kmap_local_page() map active. >> >> I figured, while page compression is probably to be considered "slow" >> it's probably not slow enough to motivate kmap() instead of >> kmap_local_page(), but if anyone feels differently, perhaps it should be >> considered. > What you say is all true. But remember the mappings are only actually > created on a HIGHMEM system. HIGHMEM systems are increasingly rare. Also > they must suffer such performance issues because there is just no other > way around supporting them. > > Also Sumitra, and our kmap conversion project in general, is focusing on > not using kmap* if at all possible. Thus the reason V1 tried to use > page_address(). > > Could we guarantee the i915 driver is excluded from all HIGHMEM systems? The i915 maintainers might want to chime in here, but I would say no, we can't, although we don't care much about optimizing for them. Same for the new xe driver. Thanks, /Thomas > >> With that said, my Reviewed-by: still stands. > Thanks! > Ira