Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3294700iob; Mon, 16 May 2022 18:27:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVPbWiThnOSaimLor4cEwhnZ2+Duf0bBnEZbZ3DGunMU7yH23xwyjw5sLUjgKm4dGyIy+i X-Received: by 2002:a17:907:d92:b0:6fe:307e:2f85 with SMTP id go18-20020a1709070d9200b006fe307e2f85mr7563532ejc.14.1652750826680; Mon, 16 May 2022 18:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652750826; cv=none; d=google.com; s=arc-20160816; b=hy5q31yeboP92JDVkBkiGv2Wa/G3CsatQmjOIa76rL3X1KuAGT9usn5xgGni5V5fsH I8pNY1GhGZpb2kzG5wHleXK6sS8sIFXWRxdw4E/klyiOXUZeGEaLbleCQY5t9JdcTCeC I41FBZo7gNI4oEY4UH0F0LBC1fFiKAllkgOE5dIhbDQ4+cT0CDOA+Fwm/B78ZX7vjhei dV3TLv+8+Bs9E2lf5STp8WDF/0jgR8NA9tTnVKvO6MUZy7CpGR9XHOQvQj9o/iJZ6R7F YuOmeGh3eSDtqPxusiWeSiXJlLRXHWFGQZI1RVqXwwaa//XtcIUkMvv5qRq4BnxiWpGQ kuOQ== 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=HcmBvUgsVeNM17CUNnfRIku+R4yL2gP60EC6MoAvwrg=; b=D47R5VLxWcT51jiZuRyWxh+CaZRXl4EnNPEG6LHOAj4iN3V74+AU2ZApGPs7lPbTzA aH51GdHa9aM//MP3Nm4eSJ7Uwase86LCjhjRsHl4mOS44AT453NPo39ra2Tua45BF1ZH P4MY2rDUYtGPNobo5lcPejrCVBtUm3drfu0XOIgYl4A5xcNa0eWB9uca+Zn8dMIG5jRc 4mOvHTCsnWDrexEELjPWJjWX7caJenCDLtjRA+Y0BSfflHyRO8GlPb6ARxqPU+cSmFCP iUzNlS/8FTpemdgST9yxER37A8uckCeuzzdNScAH7K0anufJf7oVHrt7WZ8GEleeAS89 ADxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IFPjQkUx; 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 y19-20020a50f1d3000000b00425e1e540b3si11606319edl.358.2022.05.16.18.26.41; Mon, 16 May 2022 18:27:06 -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=20210112 header.b=IFPjQkUx; 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 S1349538AbiEPV73 (ORCPT + 99 others); Mon, 16 May 2022 17:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349539AbiEPV7X (ORCPT ); Mon, 16 May 2022 17:59:23 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A5554617E; Mon, 16 May 2022 14:59:20 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id h14so2583615wrc.6; Mon, 16 May 2022 14:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HcmBvUgsVeNM17CUNnfRIku+R4yL2gP60EC6MoAvwrg=; b=IFPjQkUx6GkRaADbf42xb/jtRznMIH61XR1C1J/SPH5ePYaVsHDqdqkBMX5LaBkHhr 1ytV3SU4nMwLxjZZExiByoLP8OLiiLdBwqhA1q5XXcXaOiFoap0YU536uOL7ro0kQys+ up0tQT2lFx0wwR5d43Via0+btZhUY9LPADgEfluawiYt+ZLWZzOGHpvEzF2VRAfpXUA/ G13Qjl+WWCjI5EIZ0eMCTEuT6rhpKy6PkubfuPMAFWm/j44uaIB7CqNBd3s2DMSo7ZLB if1Fhlvd7BT1hnmFkEXuiGMx2Xp0Dat8nC/oM2DuDe6BVVj+VFyHQ+gN5Tspmd9ClJbd PneQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HcmBvUgsVeNM17CUNnfRIku+R4yL2gP60EC6MoAvwrg=; b=v/kssIvQEdHP8SqOFMEDdej7XLd/axE3lZqPpqdnFrSf1sD+83F4ktQkkwQrXHG7k5 WKIrd9zvyyyp5GYMWRg8/qdbVjtwY/I78cb6+QNlawZ6f0LOwnvGlk6wQrguwuGuOCn5 keUHDI4KmggtVyqZn+tpMJopoLvZpZo0NlOd2gcMZwLNhcNziQVswfCRojv7uFvCREr2 U7lNrgjbq851E0A2UpWJg+QzOs4oK0nK8tZY6Qz+SC3sMR58uuW/yokSjNgjHDYuQtpD xNEHWXCEI1zw6yoZQnm8Ujvba53XF5TwS3D9xh9cxKiA+r7K2iVLrgx8ruPnNWOSuysx T9BA== X-Gm-Message-State: AOAM533BmR3Fc1fFrmujmpIy36lAtfX4x0q7Q/Na/AXao23VA64Utpfh KUsGuksnja+FhGEeEy4X6qU= X-Received: by 2002:a5d:47ac:0:b0:20c:550b:4cf2 with SMTP id 12-20020a5d47ac000000b0020c550b4cf2mr16005442wrb.420.1652738358559; Mon, 16 May 2022 14:59:18 -0700 (PDT) Received: from leap.localnet (host-79-50-182-226.retail.telecomitalia.it. [79.50.182.226]) by smtp.gmail.com with ESMTPSA id e12-20020adfa44c000000b0020c5253d8dcsm10422969wra.40.2022.05.16.14.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 14:59:17 -0700 (PDT) From: "Fabio M. De Francesco" To: Matthew Wilcox Cc: Evgeniy Dushistov , Alexander Viro , Ira Weiny , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] fs/ufs: Replace kmap() with kmap_local_page() Date: Mon, 16 May 2022 23:59:15 +0200 Message-ID: <2117615.Icojqenx9y@leap> In-Reply-To: References: <20220516101925.15272-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_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 luned=C3=AC 16 maggio 2022 16:55:54 CEST Matthew Wilcox wrote: > On Mon, May 16, 2022 at 12:19:25PM +0200, Fabio M. De Francesco wrote: > > The use of kmap() is being deprecated in favor of kmap_local_page().=20 With > > kmap_local_page(), the mapping is per thread, CPU local and not=20 globally > > visible. > >=20 > > The usage of kmap_local_page() in fs/ufs is pre-thread, therefore=20 replace > > kmap() / kunmap() calls with kmap_local_page() / kunmap_local(). > >=20 > > kunmap_local() requires the mapping address, so return that address=20 from > > ufs_get_page() to be used in ufs_put_page(). > >=20 > > These changes are essentially ported from fs/ext2 and are largely based= =20 on > > commit 782b76d7abdf ("fs/ext2: Replace kmap() with kmap_local_page()"). > >=20 > > Suggested-by: Ira Weiny > > Reviewed-by: Ira Weiny > > Signed-off-by: Fabio M. De Francesco >=20 > Have you done more than compile-tested this? I'd like to know that it's > been tested on a machine with HIGHMEM enabled (in a VM, presumably). > UFS doesn't get a lot of testing, and it'd be annoying to put out a > patch that breaks the kmap_local() rules. >=20 No, I have not done more than compile-testing.=20 However, I understand your concerns regarding these changes. I can only say that, while they may seem like mechanical replacements, I have carefully checked the code to be sure enough not to break the logic of the UFS and / or the rules of local mapping. I have nothing against testing, but I think they are not needed here unless you see something that is potentially harmful or suspiciously broken and=20 you explicitly request it. If so, I'll be testing the code by the end of this week (I cannot before). Thanks, =46abio