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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 563B8C433E7 for ; Fri, 16 Oct 2020 18:19:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 912DB20E65 for ; Fri, 16 Oct 2020 18:19:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bVJVFZVx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 912DB20E65 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 878CA6B005D; Fri, 16 Oct 2020 14:19:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7FFE1900002; Fri, 16 Oct 2020 14:19:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F1056B0068; Fri, 16 Oct 2020 14:19:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 0A0276B005D for ; Fri, 16 Oct 2020 14:19:18 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3FF91362D for ; Fri, 16 Oct 2020 18:19:18 +0000 (UTC) X-FDA: 77378600796.26.sofa83_52014ce2721f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 17A541804B669 for ; Fri, 16 Oct 2020 18:19:18 +0000 (UTC) X-HE-Tag: sofa83_52014ce2721f X-Filterd-Recvd-Size: 3724 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Fri, 16 Oct 2020 18:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602872356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PNcTYASBUK76y4R0AHU+hFUZ+jRwiMVZ47LoAmlhGsI=; b=bVJVFZVxJbBnpEW3LQiruBCgi+SxK/hSvLQE3YrgeJu7KYAUGLAiGh4+LrRBYCifPXaB7F aWnuRWL59zBzGICMreWGxz7OqBm3NiyWv+dKQw50Oc2k1vifv+RvPKVl3yOxYMB1XoFJ8T AUjq6+F+fdc3ncC87y3g0R0g9Cf+U5E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-578-5fJoCHmJMzStAuTrYKDbWA-1; Fri, 16 Oct 2020 14:19:12 -0400 X-MC-Unique: 5fJoCHmJMzStAuTrYKDbWA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A952186DD27; Fri, 16 Oct 2020 18:19:10 +0000 (UTC) Received: from horse.redhat.com (ovpn-112-72.rdu2.redhat.com [10.10.112.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 168DE55774; Fri, 16 Oct 2020 18:19:09 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 9DB1422030D; Fri, 16 Oct 2020 14:19:08 -0400 (EDT) Date: Fri, 16 Oct 2020 14:19:08 -0400 From: Vivek Goyal To: Linus Torvalds Cc: Miklos Szeredi , Qian Cai , Hugh Dickins , Matthew Wilcox , "Kirill A . Shutemov" , Linux-MM , Andrew Morton , linux-fsdevel , Amir Goldstein Subject: Re: Possible deadlock in fuse write path (Was: Re: [PATCH 0/4] Some more lock_page work..) Message-ID: <20201016181908.GA282856@redhat.com> References: <4794a3fa3742a5e84fb0f934944204b55730829b.camel@lca.pw> <20201015151606.GA226448@redhat.com> <20201015195526.GC226448@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Oct 15, 2020 at 02:21:58PM -0700, Linus Torvalds wrote: [..] > > I don't know why fuse does multiple pages to begin with. Why can't it > do whatever it does just one page at a time? Sending multiple pages in single WRITE command does seem to help a lot with performance. I modified code to write only one page at a time and ran a fio job with sequential writes(and random writes), block size 64K and compared the performance on virtiofs. NAME WORKLOAD Bandwidth IOPS one-page-write seqwrite-psync 58.3mb 933 multi-page-write seqwrite-psync 265.7mb 4251 one-page-write randwrite-psync 53.5mb 856 multi-page-write randwrite-psync 315.5mb 5047 So with multi page writes performance seems much better for this particular workload. Thanks Vivek