From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:50422 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbeAVTL1 (ORCPT ); Mon, 22 Jan 2018 14:11:27 -0500 Subject: Re: Periodic frame losses when recording to btrfs volume with OBS To: Sebastian Ochmann , Qu Wenruo , , References: <35acc308-d68d-3a4b-a626-38b9a7820fd4@gmx.com> <218e3b6d-a15a-7a43-35b0-721be18fcd86@gmx.com> From: Chris Mason Message-ID: Date: Mon, 22 Jan 2018 14:08:56 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 01/22/2018 01:33 PM, Sebastian Ochmann wrote: [ skipping to the traces ;) ] > 2866 ffmpeg-mux D > [] btrfs_start_ordered_extent+0x101/0x130 [btrfs] > [] lock_and_cleanup_extent_if_need+0x340/0x380 [btrfs] > [] __btrfs_buffered_write+0x261/0x740 [btrfs] > [] btrfs_file_write_iter+0x20f/0x650 [btrfs] > [] __vfs_write+0xf9/0x170 > [] vfs_write+0xad/0x1a0 > [] SyS_write+0x52/0xc0 > [] entry_SYSCALL_64_fastpath+0x1a/0x7d > [] 0xffffffffffffffff This is where we wait for writes that are already in flight before we're allowed to redirty those pages in the file. It'll happen when we either overwrite a page in the file that we've already written, or when we're trickling down writes slowly in non-4K aligned writes. You can probably figure out pretty quickly which is the case by stracing ffmpeg-mux. Since lower dirty ratios made it happen more often for you, my guess is the app is sending down unaligned writes. -chris