Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4140599pxv; Mon, 26 Jul 2021 23:01:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJOqjrntJffyiNOgd/HU5iHDJ+ht1DMfgDSh2JVkVJsupppYKb8X72/AzsmnSjoBO7Moey X-Received: by 2002:a05:6e02:f93:: with SMTP id v19mr15294140ilo.170.1627365710978; Mon, 26 Jul 2021 23:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627365710; cv=none; d=google.com; s=arc-20160816; b=NBAcS16+OVxFVruo8NMA50rYtKZ39lESouMr5X986bb3AxOKkQzux6DtQ0vNNnDk3M JAIJ2kVhgacUr5R3Iqn6QQ9reuN4swGximJESv1RxPK4tDpnlZec/NlIO37hmMZeV7k3 WUH+r++zuY60Pvd+PHhUH0jV/CaYUvzVWJEhQTJOwidXCrbTned+3c2kf3oRAiN9yZSp qhdzbn2kH600S5YPHyYltbQkO0Ao56v2elD7MhRZk/p40+TFBxCgpkytHi4fLOOVts8f AYn49Bau20BCl/9AqU9xUuTP9QgeOqE0zsznPn6xJi9g96IFqWyBPkmH2+XHnUlBWOFq sDrA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=r1glimHAK1enYyvXjb7/p34hcH8iizqcqcTqLcbpL40=; b=Pi0NFt7fYNluislm4/Eidl/FGdegCEeYrfHwZuDTkZz566CMDeixOPQNWhT2GItoPB mQb00jl9kSJc4lvndIwcQE9OM3fNnZVOp1zzvLG//WarnwS1vDUMN3BO4aL0VU6roTkk esGRhUtKZvPER3Lg20QQz4SqICY9U9ecDwAUgwpHNP8My7Ut3+ok//3xnTHGSmaL9hEo qnuvn09heMeAezWibgQgh0akM3sHBFk33ekGzL2jG6nntH0mbUBban8J6Awq/HlklmCE co4cdZtSKX/ubkXW3Ek8gpV7lV9brFQJjRHV5e45kNZOLCEWBJT7qaWs4iwUOil0sq1i e5Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T5d98nxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si2219659ioz.70.2021.07.26.23.01.38; Mon, 26 Jul 2021 23:01:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T5d98nxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235378AbhG0GA6 (ORCPT + 99 others); Tue, 27 Jul 2021 02:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233553AbhG0GA5 (ORCPT ); Tue, 27 Jul 2021 02:00:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BD20C061757; Mon, 26 Jul 2021 23:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=r1glimHAK1enYyvXjb7/p34hcH8iizqcqcTqLcbpL40=; b=T5d98nxPB2NSUwaDW1/4ThOw4h mwBZPoHDeyOsBF649ZNNo33MNZQzWi0ZFuhI4eKK0LgULX0MsqgeIQOBYFcVdvKjWetSjsEtcEbgT bzCKnlOCmB9pBMg+vYWLfuVKM/S+kiKgQsy9VXVewqDLm9/kntrDKGQt6AqK5rIL5UbZERIYfa9n9 vDtCDAa7QtxDyflxi3fLu6Wx3l7oA/wMF90H2zvKDirZpl6hxERMkCGDdYj1Wn6+0Mu1uCyFRVPZ5 Czm9ZKlXm044gwqHaG8d0dmum4I+zX+maX24o8ilAWbmfhZy83uCU/ZwHgs5GqXAZw0JuYosBPpI6 2Yvj4Lxg==; Received: from [2001:4bb8:184:87c5:b7fb:1299:a9e5:ff56] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8G59-00EiCP-1F; Tue, 27 Jul 2021 05:57:15 +0000 From: Christoph Hellwig To: Jens Axboe , Thomas Gleixner Cc: Thomas Bogendoerfer , Andrew Morton , Geoff Levand , Ilya Dryomov , Dongsheng Yang , Mike Snitzer , "James E.J. Bottomley" , Ira Weiny , dm-devel@redhat.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ceph-devel@vger.kernel.org, linux-arch@vger.kernel.org Subject: switch the block layer to use kmap_local_page v3 Date: Tue, 27 Jul 2021 07:56:31 +0200 Message-Id: <20210727055646.118787-1-hch@lst.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, this series switches the core block layer code and all users of the existing bvec kmap helpers to use kmap_local_page. Drivers that currently use open coded kmap_atomic calls will converted in a follow on series. To do so a new kunmap variant is added that calls flush_kernel_dcache_page. I'm not entirely sure where to call flush_dcache_page vs flush_kernel_dcache_page, so I've tried to follow the documentation here, but additional feedback would be welcome. Note that the ps3disk has a minir conflict with the flush_kernel_dcache_page removal in linux-next through the -mm tree. I had hoped that change would go into 5.14, but it seems like it is being held for 5.15. Changes since v2: - rely on the flush_dcache_helpers in memcpy_to_page and memzero_page that now hit mainline Changes since v1: - add more/better comments - add a new kunmap_local_dirty helper to feal with flush(_kernel)_dcache_page Diffstat: arch/mips/include/asm/mach-rc32434/rb.h | 2 - block/bio-integrity.c | 14 +++----- block/bio.c | 37 ++++++---------------- block/blk-map.c | 2 - block/bounce.c | 39 +++++------------------- block/t10-pi.c | 16 +++------ drivers/block/ps3disk.c | 19 +---------- drivers/block/rbd.c | 15 +-------- drivers/md/dm-writecache.c | 5 +-- include/linux/bio.h | 42 ------------------------- include/linux/bvec.h | 52 ++++++++++++++++++++++++++++++-- include/linux/highmem-internal.h | 7 ++++ include/linux/highmem.h | 10 ++++-- 13 files changed, 102 insertions(+), 158 deletions(-)