Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10673646rwd; Thu, 22 Jun 2023 03:17:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sVRqau6mH6Rip+1FvZsw+ukhxIbkpYMgIFW/eMr+zNddHYbf9UNKitRdCVXpthTmX4crg X-Received: by 2002:a05:6808:2111:b0:39e:cf4d:f5ab with SMTP id r17-20020a056808211100b0039ecf4df5abmr12625856oiw.7.1687429067642; Thu, 22 Jun 2023 03:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687429067; cv=none; d=google.com; s=arc-20160816; b=ULyaKAMyf1r3j0qHcx9Ch/Yc5fFeLmyAUgZsEys9+pd5uZsWTNhn0QsB58hakAKqZ4 wsyr5i5wLcWaPNpHIQJPTV3QVR1c5cVJCqAHPs3GMOycz1jbH6VouFJ1G6IHramTVIUp Kwd8cHNkq+3fsOA4jGgTlUAT+0buC9B3EvFkKu3F4HxUW4AoRVSzle7Pur7Jas5fel/4 WcAB0fH2tb7mVH+dp3Y7mqYIL7axl4fnbrjRW0jys76vXSqQNR4YCgZWnv9ltzEI6dLw O4Z5GLCNkmeT7LZ3yXVmDZCo9uhs92bAmITMmCabFd8Ox7Kd4En/f5A5yTB3UUq81iPS Jl8w== 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=ltOaMarDQJJns1+AcBaJ4l1yQUrBcGGm+rC42CieJHQ=; b=F9VcCLxNndz124hlsny1dcFSfm77P7v0IBapTVH/JEor8haqFB+FEk+yZkDO7dwv6+ KzrXbZmZPHc+0YXu4f242bsszcz+ngCzwvsWR2vE+5YXI3sI3VQAYPZ0pqiR5E2OOLjI zu0+Zw0pChs6g9d+E2KvF26kD4fxCopPkwArpuk9v7UmJ9BkhDwx/qqBSzgMQlOS+QyJ 1vRM3z8lzI53RP5RmdixQTyon6VXIgKi9ktuB5ED5cyVjNc7jtGRksXq+5fcqkfX4Vhk stU4TsxS1AxHAKPi5cHjReuY4w0vegNrZa6DwAPlgOKSa+F9G604VnrsAYm25Qac3nZQ a1ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="bqrSq7/k"; 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 mp16-20020a17090b191000b0025e90db660esi6221949pjb.100.2023.06.22.03.17.35; Thu, 22 Jun 2023 03:17:47 -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="bqrSq7/k"; 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 S231318AbjFVJu4 (ORCPT + 99 others); Thu, 22 Jun 2023 05:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231324AbjFVJul (ORCPT ); Thu, 22 Jun 2023 05:50:41 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 997971A4 for ; Thu, 22 Jun 2023 02:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687426835; x=1718962835; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=2NhxX3rdSOywNGKYmhtGB0pRTH8j8R7PfKDrsXNYHAo=; b=bqrSq7/kTCNAHdHVjvTbaageZ7rXJAVr/3WRJWZi1MYPOUw9zrsVLqZn cdHad3Gm09KArRZ9vezYQ+ZcwkGl8BBsp8kHXE1dOr4RxP/y034R5VpKu YokJKnE7f78zZ+6JBS9rJ7u+G8hn/In+ldNMfd0RxW1K7LAMqA4nOA3pB Z9VF7MusihKAY0LI3OSnRhqFDw1xrt0cRiI019AwJr5d+gVy/deXngyGF mSGRUh+lYxXSofVpbfaURLwxqvzDQq6Yzxn/+Py3bGWXBrLi5F3gok4XL 6zMzSJRN7KngUbWQrIvZVJX/XIvMsRgMdaltJy0xTJdlfZPGNAwakZ/YC g==; X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="390129355" X-IronPort-AV: E=Sophos;i="6.00,263,1681196400"; d="scan'208";a="390129355" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2023 02:40:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="692179249" X-IronPort-AV: E=Sophos;i="6.00,263,1681196400"; d="scan'208";a="692179249" Received: from gdoolan-mobl1.ger.corp.intel.com (HELO [10.213.228.155]) ([10.213.228.155]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2023 02:40:23 -0700 Message-ID: Date: Thu, 22 Jun 2023 10:40:21 +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 Cc: 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, Fabio , Deepak R Varma References: <20230620180759.GA419158@sumitra.com> <79e1f37f-3ffa-0195-860b-08cc890d810e@shipmail.org> <649326df1b895_1c0dd29486@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=-4.4 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,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 21/06/2023 19:51, Thomas Hellström (Intel) wrote: > > 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. AFAIK i915 works on such systems so I don't think we can drop support just like that. Not sure what the process would be. Perhaps as part of a wider kernel deprecation would make most sense. Regards, Tvrtko