Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8856714rwl; Sat, 31 Dec 2022 13:31:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXsIbprPtkBOiNrGX+F9farf2iIDa4QHDrfUDRN1W5gsuGTcmdNE7uQI1B7LFjnBLcaODO0O X-Received: by 2002:a17:906:22d2:b0:7fc:3787:243d with SMTP id q18-20020a17090622d200b007fc3787243dmr33449723eja.53.1672522270942; Sat, 31 Dec 2022 13:31:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672522270; cv=none; d=google.com; s=arc-20160816; b=o/Fgkr5ZvwX3kFf4WlfVW6DAj0EIkhEBvOQIM3r8OZ0WbzCf7XPK6bUzQkqzFTvG+9 aK5d9Qg9k4631XFboliPThfKHytR+iUJ98Yw0KlxsksL8g/+Hdh9EyNphovjpxIulv/7 6Rgp3KbSpAY7R3H2nWhHQEN3fPrSry6qLMkbfMIZhQdk/wgZBtppbwhomXr54MrH3hRp MzOFqJKWGPWWUS/qFjaqHAfeqYQqWQJWHjv8c2riIr2GgmsZr8fKCK17MdV0RrZPcGln NZfk26vM/g3uucpjJU3bHCjdlw8tuQWJeZD9a2gKe7Lhvh20IltB8U8Bx4ieHjfBQjH+ YDKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=FzPd5izhFOWnkOLbJ7ZwELg1AubUnQfKP57+24wxihU=; b=G0+97SI+9mbjCRKaqK4jg2wBMmThnNh55x2lmkhY5m6QBvws7yUQUhSWl5VGW7RX1q FCsUSdyYyyF6Roa356io+BL6dGeSYruDew6+TZZIQhAnNkZU7gcAH99ypeXnyljrTRsz 6kITh9W/VKiI1gJjsx+qphZn4Kq4AppcXOfniOM6wN9uv97FvDliEORjdtm77BE5y3mJ wBMv1QbpRjn2oZOttR4ANERdDeYYJ4OG+blLF87wDmGstRZcmYJuf5FBNdZX1JGsfaKA CJmqnLFtaQ2gB+110VF8nyiksFS1b3PBZlx8PhERZo0QEuE4BarUsKPfKOe3+/GWc0RH dhOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=DbA1SqeO; dkim=neutral (body hash did not verify) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=kh4Ni2jH; 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 h25-20020aa7c619000000b00489e993b8easi5902080edq.630.2022.12.31.13.30.55; Sat, 31 Dec 2022 13:31:10 -0800 (PST) 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=@pobox.com header.s=sasl header.b=DbA1SqeO; dkim=neutral (body hash did not verify) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=kh4Ni2jH; 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 S232256AbiLaU65 (ORCPT + 62 others); Sat, 31 Dec 2022 15:58:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbiLaU6y (ORCPT ); Sat, 31 Dec 2022 15:58:54 -0500 X-Greylist: delayed 206 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 31 Dec 2022 12:58:52 PST Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7559D60C2; Sat, 31 Dec 2022 12:58:52 -0800 (PST) Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id B1B1D1CA00A; Sat, 31 Dec 2022 15:55:23 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=date:from :to:cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=l5Z6dWQdVQtlKEa4pcVNXiCPG5nnUO1ELWb6oA mN25Y=; b=DbA1SqeOyu/rIvgnr8isbow2nAXsNzTMiW4UXpmzx84FkDWsMSlpw8 rY4IeIYosnTU7KS363hwRXxaKiH+qrPgS7tSZx6oS2S4tjkLGFM0gctqLqBenBI9 6vmhd2ZdneAY/k+tW5lwvSL7gFbGkP1dQw4ApL4mUQ3WVNzeE9KrI= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 95FA31CA009; Sat, 31 Dec 2022 15:55:23 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=1YCJGrbLB6EsdiwWd9H2pjqwOeUMAIqYiajipI4nVNU=; b=kh4Ni2jHIBm6HrzX7bqXNcoWzNii3GTVw+uP21Tu9Tm0vxHMwJ5K5Gyy/vnmiI7MFZFiQUsYvhBWcdKQtK6aBBPvF+nbHi5xZlj5eVORRPDZ5par82PI9c/PuhogFbIw4VfgQlMKZU/XkRF48Ie78YxOeQoe5O5XUWYJlmttQi8= Received: from yoda.home (unknown [96.21.170.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 1EEAC1CA007; Sat, 31 Dec 2022 15:55:20 -0500 (EST) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 017705A6C9C; Sat, 31 Dec 2022 15:55:17 -0500 (EST) Date: Sat, 31 Dec 2022 15:55:17 -0500 (EST) From: Nicolas Pitre To: Ira Weiny cc: "Fabio M. De Francesco" , Christian Brauner , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, "Venkataramanan, Anirudh" Subject: Re: [PATCH] fs/cramfs: Convert kmap() to kmap_local_data() In-Reply-To: Message-ID: <210n4959-p557-894p-20qp-r595540r0827@syhkavp.arg> References: <20221012091356.16632-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1989546398-1672520118=:4092182" X-Pobox-Relay-ID: 6FE98D26-894D-11ED-A70A-C2DA088D43B2-78420484!pb-smtp20.pobox.com X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1989546398-1672520118=:4092182 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, 30 Dec 2022, Ira Weiny wrote: > On Wed, Oct 12, 2022 at 11:13:56AM +0200, Fabio M. De Francesco wrote: > > The use of kmap() is being deprecated in favor of kmap_local_page(). > >=20 > > There are two main problems with kmap(): (1) It comes with an overhea= d as > > the mapping space is restricted and protected by a global lock for > > synchronization and (2) it also requires global TLB invalidation when= the > > kmap=E2=80=99s pool wraps and it might block when the mapping space i= s fully > > utilized until a slot becomes available. > >=20 > > With kmap_local_page() the mappings are per thread, CPU local, can ta= ke > > page faults, and can be called from any context (including interrupts= ). > > It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore= , > > the tasks can be preempted and, when they are scheduled to run again,= the > > kernel virtual addresses are restored and still valid. > >=20 > > Since its use in fs/cramfs is safe everywhere, it should be preferred= . > >=20 > > Therefore, replace kmap() with kmap_local_page() in fs/cramfs. Instea= d > > of open-coding kmap_local_page() + memcpy(), use memcpy_from_page(). > >=20 > > Cc: "Venkataramanan, Anirudh" > > Suggested-by: Ira Weiny >=20 > Nicolas, I was auditing the kmap conversion status and I see you review= ed this > but did not merge it. Are you still the maintainer for fs/cramfs? Sho= uld > Fabio send this to someone else? Please send it to Al Viro with my reviewed-by. Nicolas --8323328-1989546398-1672520118=:4092182--