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 BA157C433E7 for ; Fri, 16 Oct 2020 18:19:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CCAD2083B for ; Fri, 16 Oct 2020 18:19:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eMf2HngX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391426AbgJPSTQ (ORCPT ); Fri, 16 Oct 2020 14:19:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32657 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391238AbgJPSTQ (ORCPT ); Fri, 16 Oct 2020 14:19:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602872354; 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=eMf2HngXru+VPbmjsIipMZbYebTwZCMq2aG+gN4HFIcXhsasxKpj87vSYkAcWs70Jti4S+ VmMBvRHxojgV2MJpsD0j+m2Nywt68oM2XEL7tn9W+y/z/4aI3+AP6W6fz0TR3o0JD8ZjMQ jRntZM7HF7ouvl0a99QXBIFuNdicP84= 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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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