Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2869578rwl; Mon, 27 Mar 2023 06:27:43 -0700 (PDT) X-Google-Smtp-Source: AKy350a5tnRoM6lO0oyoX4KgOQ+En5mdxxors7B0fL7vNbSoScukkx6bnFP9Ud7v4Fusm9dLVS/2 X-Received: by 2002:a17:906:5fd9:b0:930:d17b:959b with SMTP id k25-20020a1709065fd900b00930d17b959bmr12871611ejv.22.1679923663296; Mon, 27 Mar 2023 06:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679923663; cv=none; d=google.com; s=arc-20160816; b=H7qvdxLXunc8HesrCxwhC0S2mrWh2LLtG2yDvXuXQUj4ParOk+2g9OnbpaeYGHKffS DCjJthOvFAmudm9t3JPGm96/apIjDFZEknApLkXgRodbsk9MluSac0/9G6+qf0YqeqXp Sc19kHOv3tpwuiFgO3Zbeugjl67UZ9/PZBpyo3i9yO+Fr0qszPNILVo7ISOMINwKj4r+ GC2dxJQ4A7Bz0DbQrI2iwpIGumiAJA0QeCRXqZauc4WoMhITO+L/tfM9AbXDBZMxalIG +RvlC12hnBgQMRRnqPwrF5vKf+EXKIn5zxtouZYQkZxy16NXQDokUJrskvt/angsII6z FlsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RLzmFr8AmbjIY1B1jEN0btaao1pVMqT2Dh1OkNlg1IM=; b=aRJQZshEV6dd+73mdrZs1Jp+1+BQjBj1HSDhkA4IWWXcAY7csspFDM+qg9LfoiJpfE E4btC/KMURlLx4P1OOIRhhFadUmIe4Dq9snmsXfGRuV8P+jYMucoJZtU3Sp8bIs4vJDS Qlpw2dufOB6oV1ko2cGF5KW4AUNjiThmukk1VyUc+9QdAY4Bk4Tlgpbmc5dtcTczRtlG Jwdbcxxe3tcKpl/cdcSf2fMFOqHKgVfOrqFhPQb/Sbw26mjTAvvsNR59mCPgx7lkpmnR JYdVppH0chsDaScxpsVoEH6RF4IwyIzOQS0RvQCPMFbU87C4A1a/4+AvKQAyOWCURtM2 68tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kZE665Lh; 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 ud11-20020a170907c60b00b00931ac4cb302si24584083ejc.948.2023.03.27.06.27.18; Mon, 27 Mar 2023 06:27:43 -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=@infradead.org header.s=casper.20170209 header.b=kZE665Lh; 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 S232613AbjC0NY4 (ORCPT + 99 others); Mon, 27 Mar 2023 09:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232607AbjC0NYj (ORCPT ); Mon, 27 Mar 2023 09:24:39 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F1D5FE1; Mon, 27 Mar 2023 06:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=RLzmFr8AmbjIY1B1jEN0btaao1pVMqT2Dh1OkNlg1IM=; b=kZE665LhpJ3pAkpkQurCtqXGr3 3ns14crmk1+cSV3MbJ381mXQgOVruGRvb0wNz6zz0OWOrD+mymMFNQhzD5qB4YlOKjyklu6nqm6N1 OxJAHqaBZAGvOYqhVubOZ0pQci0Fe2P6ntLZp0+G3hrS4oTPKlM4IvDxW06wGHxhfnZL0rgIXKcGQ u0EQovuNQNfH3oZ91DVUoB3NR5BlFDVzTwTCpTwaQ6AspmC/PimietJjPZLnOYbp3WfRffIO/BQI+ /4tfsenPBcqrfX3Z9vjvbnuRBHhlGKiwgZ6XNUAYUvGFlCl2mau/rw+73gPHEBvbxRWHsvCaPq+oV bYib1JZA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pgmp3-007QOk-NL; Mon, 27 Mar 2023 13:23:41 +0000 Date: Mon, 27 Mar 2023 14:23:41 +0100 From: Matthew Wilcox To: "Fabio M. De Francesco" Cc: Evgeniy Dushistov , Al Viro , Ira Weiny , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v5 0/4] fs/ufs: Replace kmap() with kmap_local_page Message-ID: References: <20221229225100.22141-1-fmdefrancesco@gmail.com> <11383508.F0gNSz5aLb@suse> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <11383508.F0gNSz5aLb@suse> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Mon, Mar 27, 2023 at 12:13:08PM +0200, Fabio M. De Francesco wrote: > On giovedì 29 dicembre 2022 23:50:56 CEST Fabio M. De Francesco wrote: > > kmap() is being deprecated in favor of kmap_local_page(). > > > > There are two main problems with kmap(): (1) It comes with an overhead 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’s pool wraps and it might block when the mapping space is fully > > utilized until a slot becomes available. > > > > With kmap_local_page() the mappings are per thread, CPU local, can take > > 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. > > > > Since its use in fs/ufs is safe everywhere, it should be preferred. > > > > Therefore, replace kmap() with kmap_local_page() in fs/ufs. kunmap_local() > > requires the mapping address, so return that address from ufs_get_page() > > to be used in ufs_put_page(). > > Hi Al, > > I see that this series is here since Dec 29, 2022. > Is there anything that prevents its merging? > Can you please its four patches in your tree? I'm pretty sure UFS directories should simply be allocated from lowmem. There's really no reason to put them in highmem these days.