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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 6BA7EC49EAB for ; Tue, 5 Nov 2019 09:25:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42838217F4 for ; Tue, 5 Nov 2019 09:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730681AbfKEJZy (ORCPT ); Tue, 5 Nov 2019 04:25:54 -0500 Received: from relay.sw.ru ([185.231.240.75]:43296 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730666AbfKEJZy (ORCPT ); Tue, 5 Nov 2019 04:25:54 -0500 Received: from [172.16.24.21] by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1iRv5z-0005iW-15; Tue, 05 Nov 2019 12:25:51 +0300 To: Miklos Szeredi , linux-fsdevel@vger.kernel.org From: Vasily Averin Cc: Alexey Kuznetsov Subject: performance degradation due to extra fuse_update_attributes() call in fuse_file_aio_write() Message-ID: Date: Tue, 5 Nov 2019 12:25:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Dear Miklos, could you please elaborate the reason of fuse_update_attributes() call in fuse_file_aio_write() ? After rebase of openVz7 kernel to RHEL7.7 we have found significant performance degradation: from 136 kiops to 75 kiops during first 10 second and down to 25 kiops later. The reason of this was an extra fuse_update_attributes() call in fuse_file_aio_write(). Our old code was an equivalent of v6 patch version submitted by Maxim Patlasov https://lkml.org/lkml/2013/10/10/281 fuse_file_aio_write(): if (get_fuse_conn(inode)->writeback_cache) return generic_file_aio_write(iocb, iov, nr_segs, pos); However in final commit 4d99ff8f12eb "fuse: Turn writeback cache on" you have included an additional fuse_update_attributes() call fuse_file_aio_write(): if (get_fuse_conn(inode)->writeback_cache) { /* Update size (EOF optimization) and mode (SUID clearing) */ err = fuse_update_attributes(mapping->host, NULL, file, NULL); if (err) return err; return generic_file_aio_write(iocb, iov, nr_segs, pos); } Unfortunately we did not found any description related to this change. Could you please elaborate which kind of the problem you have noticed in v6 patch version and explain how fuse_update_attributes() call fixes it? Thank you, Vasily Averin