Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9382653rwd; Wed, 21 Jun 2023 06:51:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4GtSORzEPX5EG4HkgMPyx3mj1dp7s0gKh9tJdaLQZcMZ1cUQVyW736J0OpM2i6/X8m6XKV X-Received: by 2002:a05:6a00:23c1:b0:668:9bf9:fa8d with SMTP id g1-20020a056a0023c100b006689bf9fa8dmr5913222pfc.16.1687355505928; Wed, 21 Jun 2023 06:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687355505; cv=none; d=google.com; s=arc-20160816; b=GNjMvVrx6j7qKG0lacBwNAbQQdrENmC9jqHHqLFcjapF5vHjKdKP3+Js320oWhgMKf lEM/8LXhSSQytP8jqgxSfNJlCxwtti7d9jEIYE1dUI3cGeMjenzYA93t1hg7vqt6MJmZ 3e3DxWzss12Rpr59JjVT10D6RkSQ4KO3V5xZxVdzpGxmRt262IzxctPP5LoJqT4SKyBg gdcxF5njEl/Hg9y8lhcsUBYtoGaF9EIEUyzUkvMDXQmCIM5f2oF7m6Cz0n6BFe3zSR7u lybf6V8Tp4MgAuT4JKWV99fc27jKyCfpKEV0CCAPY6VhR35wqqaAzbPUn7XKFARvC76b OouA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mF/025lHMkEmRtTPFqKcm0Vi5RzrrdiwBpzJM5RkWZ8=; b=bpeNV7IZzjeyqAvz6xgMvy6GayrNcvrXZkU5GgOMMmngecoCaR308c/enjLffqkMO7 2NeiEC8tIy398OSQhrwQHqPvEakv7cwjjw9pM3d5DBZORXED7bxa5UfvP9tt3z/gbogS hthjiwKc0rAUuw6TY4lw9xk7L6VPmUzR8HsVn/7IuzoIcx6qeeVUD9j6xK3yC83XfC5l JU9OSg44XAxHwjTlA3VC+Ooep4nrYVRLPDIAHVONa/8fWNK7EjvwrGqi0PmV3OB0P5Ig sZib0ErqGHFofrsNewPaotHTkfk+cJUv19Z5Im/aOSCakWuaviIXbcwNzttKnYRK0d6h 1i1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Jr9bfIAK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s189-20020a625ec6000000b006689d5c5953si538457pfb.112.2023.06.21.06.51.33; Wed, 21 Jun 2023 06:51:45 -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=@gmail.com header.s=20221208 header.b=Jr9bfIAK; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232339AbjFUNYh (ORCPT + 99 others); Wed, 21 Jun 2023 09:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232512AbjFUNYg (ORCPT ); Wed, 21 Jun 2023 09:24:36 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E9C0191 for ; Wed, 21 Jun 2023 06:24:33 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3111547c8f9so6869780f8f.1 for ; Wed, 21 Jun 2023 06:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687353872; x=1689945872; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mF/025lHMkEmRtTPFqKcm0Vi5RzrrdiwBpzJM5RkWZ8=; b=Jr9bfIAKQrvaxFa4rQoB4iHF8uY03ENM5OyAxuR6kuc6ipsREZE/7ifr74zl2QfhV+ C9Bcwu0EnxVmK8drtToETGjGveagQG5FXv70MzTefjuuFPtdhfWxCA2lDDrKQA1yZofb kSBXaBmGEGzUIRJzxYBGmUpqpHqOIFESvXFyXTUD9onvIMxL9uKbZs4qaC4bRJtMoAYE pk0lTzJDWf1lJlfxPc/fjr+E8Ipck1Ni1m7Db8Zgt1/3cotxRD/p/5B3q+hzeMBrTOb9 E7g8MvoLZdGIpZQBDNGe+04yNACmz8mvjxAgJOhfvK6NE1C6PjeEI0EXcCvd/ZgWR7TC 16KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687353872; x=1689945872; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mF/025lHMkEmRtTPFqKcm0Vi5RzrrdiwBpzJM5RkWZ8=; b=IwzIVpwu/yXcKna1fjDjpF+YE61epR84WoxPLkzMwqde6JdBcjJ63GJ99T4N3cBcv6 9EdV/BV/M07ExwTKYvgnnskQuRrSAw32JYKnGRhB/78Cd1br3ne+g8DjIsgApK/y8R+n 4kBNj1QEtrmvmlkBIuxoKm7wk6lKi+Dkk4e952oMjU01ibkGr+LVJIMH/ImqKq+zJwx8 BVQrq+2BvwY+fcMTwnztlr43xEhpejRdwW03cVHRIydmnY/o3p9MrN6AOYAzVLUpLj0o ccoveD+1ZmLjbfZaWrunULBIfjYTTFtxJMpzVFKOIvS4B69HQEnxhm4maGy4lSP+RsMK uiGA== X-Gm-Message-State: AC+VfDzMmCUt7o4ahZ0GmY8HnK7dt4Pz7M2n+glrfI9CgaT7eUgiZnqT ecgTypY3KIL4iWUJvs9nXXA= X-Received: by 2002:a5d:4643:0:b0:30e:4a21:808b with SMTP id j3-20020a5d4643000000b0030e4a21808bmr12971936wrs.55.1687353871739; Wed, 21 Jun 2023 06:24:31 -0700 (PDT) Received: from suse.localnet (host-79-50-220-240.retail.telecomitalia.it. [79.50.220.240]) by smtp.gmail.com with ESMTPSA id w18-20020a5d4b52000000b003127a21e986sm4447046wrs.104.2023.06.21.06.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 06:24:31 -0700 (PDT) From: "Fabio M. De Francesco" To: Sumitra Sharma , Ira Weiny , Thomas =?ISO-8859-1?Q?Hellstr=F6m_=28Intel=29?= 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, Deepak R Varma Subject: Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page() Date: Wed, 21 Jun 2023 15:24:29 +0200 Message-ID: <13316568.uLZWGnKmhe@suse> In-Reply-To: <79e1f37f-3ffa-0195-860b-08cc890d810e@shipmail.org> References: <20230620180759.GA419158@sumitra.com> <79e1f37f-3ffa-0195-860b-08cc890d810e@shipmail.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 mercoled=EC 21 giugno 2023 11:06:51 CEST Thomas Hellstr=F6m (Intel) wrot= e: >=20 > 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(), Migration is disabled. > so while I haven't seen any guidelines around the usage > of this api for long-held mappings, It would be advisable to not use it for long term mappings, if possible. Th= ese=20 "local" mappings should better be help for not too long duration.=20 > I figure it's wise to keep the > mapping duration short, or at least avoid sleeping with a > kmap_local_page() map active. Nothing prevents a call of preempt_disable() around the section of code=20 between kmap_local_page() / kunmap_local(). If it is needed, local mappings= =20 could also be acquired under spinlocks and/or with disabled interrupts. I don't know the code, however, everything cited above could be the subject= of=20 a subsequent patch. Regards, =46abio > 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. >=20 > With that said, my Reviewed-by: still stands. >=20 > /Thomas >=20