Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752396AbcDKIEt (ORCPT ); Mon, 11 Apr 2016 04:04:49 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35076 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbcDKIEq (ORCPT ); Mon, 11 Apr 2016 04:04:46 -0400 Subject: Re: [fuse-devel] Horrible mmap write performance (kernel writeback issue?) To: Tejun Heo , Miklos Szeredi References: <56E7C009.3070008@gmail.com> <56F70255.6070806@gmail.com> <20160330184732.GO7822@mtj.duckdns.org> Cc: fuse-devel , Linux-Fsdevel , Kernel Mailing List From: Jakob Unterwurzacher Message-ID: <570B5A9A.6070104@gmail.com> Date: Mon, 11 Apr 2016 10:04:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <20160330184732.GO7822@mtj.duckdns.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 894 Lines: 24 On 30.03.2016 20:47, Tejun Heo wrote: > Hmmm... cgroup writeback support shouldn't affect fuse at all as the > backing device doesn't enable cgroup support. I probably made some > silly mistake. Is there a simple reproducer I can play with? Hi Tejun! A simple reproducer is at https://github.com/rfjakob/mmapwrite . What seems to be happening in the kernel is that the estimated device bandwith drops to zero. I'm not even sure how this works for FUSE, but that's what I gathered from some printk debugging. What I also found is that once mmapwrite is hung, you can unblock it for some time by running something like cat /dev/zero > /var/tmp/foo mmapwrite will then steam ahead as long as cat is writing, even though encfs writes to /tmp (tmpfs) and /var is on the ext4 disk. Note that the hang happens regardless of the backing device, on both tmpfs and ext4. Best regards, Jakob