From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7179C43467 for ; Tue, 13 Oct 2020 18:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BF94208D5 for ; Tue, 13 Oct 2020 18:44:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="DayNIijN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732292AbgJMSon (ORCPT ); Tue, 13 Oct 2020 14:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726848AbgJMSon (ORCPT ); Tue, 13 Oct 2020 14:44:43 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBE8DC0613D0 for ; Tue, 13 Oct 2020 11:44:42 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id l16so552580eds.3 for ; Tue, 13 Oct 2020 11:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ACWQZXFIYAYZvPtA0kqqET9/h2VeNuWUmvFkuiSdGDk=; b=DayNIijN9rJ4wynxycYBrXAQR84x3xjByl1z2VFzt7YCa69TNkAlkIdWKG0xwP6Yp3 3F/H2nz44gihJO9JHyXWzYL4P1dc46CKqiaNR3yRo/w37eMMjkAo/koyRg9J9cet4J5o 8pAZLke452kN1ce4bdWIlGHc47qEL6KSVsDbeqJDAMDzDUrFyC9OKIrNu9C/VaSoREWg 9B9an2yfiyuzSelcHqdOabrCOxSG6vx+IObNMb98zyieMNME4f/11W7Es7O7m/+Kevvk a0bkM4fWgVplo/2Lunr6iSwR8tSVOWAyX1+gyP4UJdvdg+R8/4qIc/xXlFMWt9dzq4A3 WVxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ACWQZXFIYAYZvPtA0kqqET9/h2VeNuWUmvFkuiSdGDk=; b=fGBf3CacTCewKwR2l8CN/ej8tm+vr+4NkqLfuAknekA40oQC+5eEqle10Q2I+2atgJ rlMcz0PiKB4SDn0hnHPrUy7OuTa9gnehAl1Ckk2k04vAcaNnKVUxxK01fOLrfS93B62v GO62a1RmvLUGodLDSCf0UV03k9n/gz3LG0GOqeKSzzfxQFmvkPlTQ7sF58h6Zhzm2IvY DWLTfyD5pc0vWiRmw5LTQ64uNoVqv+l8/QO/NGoPReXzmNc9JaW11SzQzQJpbLqlfRsF Ahk9iv8vwA8fOifkNPHtsWDUxO3taEbWjsjjApO0AG7YxED6FKFpcEmLUu0CGZSnu4FD dOiQ== X-Gm-Message-State: AOAM530GSgONmVmL5fwTDXTYMmIqbAL+Q8D9PynqIrSoKjgLJ5bUoFjj Kmx7+PXKgurLlrqeqSkl4bZp//+QllwzVf6C8B/7Iw== X-Google-Smtp-Source: ABdhPJx/D4CFI8iBKDneanR6scqyHSM4b5ae7bBsGU7JbHG59bZqw8grXz+3fxsJ2hpJPfBR1HipQc3XH+/A2xgb2Ys= X-Received: by 2002:a50:8e1e:: with SMTP id 30mr1027503edw.354.1602614681174; Tue, 13 Oct 2020 11:44:41 -0700 (PDT) MIME-Version: 1.0 References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-34-ira.weiny@intel.com> In-Reply-To: <20201009195033.3208459-34-ira.weiny@intel.com> From: Dan Williams Date: Tue, 13 Oct 2020 11:44:29 -0700 Message-ID: Subject: Re: [PATCH RFC PKS/PMEM 33/58] fs/cramfs: Utilize new kmap_thread() To: "Weiny, Ira" Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Peter Zijlstra , Nicolas Pitre , X86 ML , Dave Hansen , Fenghua Yu , Linux Doc Mailing List , Linux Kernel Mailing List , linux-nvdimm , linux-fsdevel , Linux MM , linux-kselftest@vger.kernel.org, linuxppc-dev , KVM list , Netdev , bpf@vger.kernel.org, Kexec Mailing List , linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, devel@driverdev.osuosl.org, linux-efi , linux-mmc@vger.kernel.org, linux-scsi , target-devel@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-ext4 , linux-aio@kvack.org, io-uring@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-um@lists.infradead.org, linux-ntfs-dev@lists.sourceforge.net, reiserfs-devel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nilfs@vger.kernel.org, cluster-devel@redhat.com, ecryptfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-btrfs , linux-afs@lists.infradead.org, linux-rdma , amd-gfx list , Maling list - DRI developers , intel-gfx@lists.freedesktop.org, drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, xen-devel , linux-cachefs@redhat.com, samba-technical@lists.samba.org, intel-wired-lan@lists.osuosl.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Fri, Oct 9, 2020 at 12:52 PM wrote: > > From: Ira Weiny > > The kmap() calls in this FS are localized to a single thread. To avoid > the over head of global PKRS updates use the new kmap_thread() call. > > Cc: Nicolas Pitre > Signed-off-by: Ira Weiny > --- > fs/cramfs/inode.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c > index 912308600d39..003c014a42ed 100644 > --- a/fs/cramfs/inode.c > +++ b/fs/cramfs/inode.c > @@ -247,8 +247,8 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset, > struct page *page = pages[i]; > > if (page) { > - memcpy(data, kmap(page), PAGE_SIZE); > - kunmap(page); > + memcpy(data, kmap_thread(page), PAGE_SIZE); > + kunmap_thread(page); Why does this need a sleepable kmap? This looks like a textbook kmap_atomic() use case.