Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3021394rdb; Wed, 15 Nov 2023 19:15:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhPEE3qy/1Yc2JeCReX4IvhrPNlKV6q0xUIA3imZrEkS5FEAJmSvdvLvytH/MMEwJDPKqv X-Received: by 2002:a05:6a00:2d1:b0:6be:b79:eca with SMTP id b17-20020a056a0002d100b006be0b790ecamr13646833pft.32.1700104545346; Wed, 15 Nov 2023 19:15:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700104545; cv=none; d=google.com; s=arc-20160816; b=hpBKWP2ZX7oj5NhcXZFyYL5LAbyoegqeOyqCObLPzA1RBudZT4bO4z402bOvYztB2o 7lAFadTMU15SNQftb5M/J+jfNcekmtkC5ADgV9bbDfGpceAR2W95hm15mFGWoQwCyj0Y cB6LfUuXz16amZN6IO1BEQ/hH+DJ+GK1pMEk0kNWtg+Nk8jLdBnemY52InRGlepA340Q f92RbMHc1mUrrur6l8JfbLJg/YSld9T+FQMKpGbo8eXZM7t3YazUz/Joc7IDWFcdn0Ve IEEwOO6Cjxm3zQKBEFgLJoIlJoUbknc1Q3DWr0XLg+wSxOpOuP8YacLLcqq+k+GC0vyC 4swQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :auto-submitted:content-transfer-encoding:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=Gvv6O8BWM1wgQOwT6wgPV439hlaBJ/Ow294O55CSLXA=; fh=lfmAJNlsrgVlLfgmf+xa0zOkAKc6VKVRczifYgkRnAY=; b=WAgnP/I4dMiB33w5frhUWNjYbTXTZ7G5kCX/lc+WlK1qhaZ9sfFYOM0vS2meAI/jrI wHhGGg+FzxeKMdD/qulW2fXTH10BCbuXrDZvGdChnj2Ro4bmz4Jo0WGqLk3CFKpPEVEB eD5rmwB8jAA5nctUzXKqAcUWUMnfVAWZSTD11XrrS5C0drIvsOHdl5DHfHS8VKzLat9d 2rKgGtHz5FLRbD4bruqrIJt78ckCzn4L1Ox6RRS1H7S0P4sn0XU1B+YFXLsCpUqtBEDp o9JX8o6iaD1nfJYD4oZG+Jo18H82cqeefNKDZwzlmv4F8KkV5KCv3AmbsjbLKh02ql63 B8vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t/bfcv0n"; spf=pass (google.com: domain of linux-ext4+bounces-18-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-18-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y42-20020a056a001caa00b00690f9e835d8si11377316pfw.132.2023.11.15.19.15.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 19:15:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-18-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t/bfcv0n"; spf=pass (google.com: domain of linux-ext4+bounces-18-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-18-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B6F63B20CAD for ; Thu, 16 Nov 2023 03:15:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90E7F63CF; Thu, 16 Nov 2023 03:15:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t/bfcv0n" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F68463BD for ; Thu, 16 Nov 2023 03:15:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 8EBEEC433CA for ; Thu, 16 Nov 2023 03:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700104533; bh=NXvJktUT/JIlYAtRxYA0I6R1uPL2nUVOPtfd2W+02/M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t/bfcv0nDeQHTkF8GHdlRKiZgq7gy8OIsf/dG/XiCL9jSqYQ1TRuTmug71aHE8Efx pIH2psudkm1s9InPa0szEYQXTXfSRWggK5GHDJFvYn5EFdFbIOvAB6aU7SfDXPux/L eRuYPGTNyX13DxS4C/ADMs1FJ9OqPBpf5QEJpNMLKn/qT3tDuecZRecqWtrgryXyn8 pI0CXx+wXrawRrzrSOkSY7paMGHdf8ucUxNGSC9Y7e5WwOycXtMQJTD0ZuIPTiIUIy AuJx//LYgEi1xqHRCDefYhSROF11n9h2YZznYM1NubwkPwwIHg7ZIN3NSZkjkPSsYn bX5oxa2SL2+1w== Received: by aws-us-west-2-korg-bugzilla-1.web.codeaurora.org (Postfix, from userid 48) id 76ADBC53BC6; Thu, 16 Nov 2023 03:15:33 +0000 (UTC) From: bugzilla-daemon@kernel.org To: linux-ext4@vger.kernel.org Subject: [Bug 217965] ext4(?) regression since 6.5.0 on sata hdd Date: Thu, 16 Nov 2023 03:15:33 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: AssignedTo fs_ext4@kernel-bugs.osdl.org X-Bugzilla-Product: File System X-Bugzilla-Component: ext4 X-Bugzilla-Version: 2.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ojaswin.mujoo@ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fs_ext4@kernel-bugs.osdl.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 https://bugzilla.kernel.org/show_bug.cgi?id=3D217965 --- Comment #27 from Ojaswin Mujoo (ojaswin.mujoo@ibm.com) --- Hey Eyal, So the way most file systems handle their writes is: 1. Data is written to memory buffers aka pagecache=20 2. When writeback/flush kicks in, FS tries to group adjacent data together = and allocates disk blocks for it=20 3. Finally, send the data to lower levels like blocks layer -> raid -> scsi= etc for the actual write. The practice of delaying the actual allocation till writeback/flush is know= n as delayed allocation or delalloc in ext4 and is on by default (other FSes mig= ht have different names). This is why the ext4 allocation related functions (ext4_mb_regular_allocator etc) show up in your perf report of the flusher thread. With delaloc, we are sending bigger requests to the ext4 allocator since we= try to group together buffers. With nodelalloc we disable this so fs block allocation happens when we are dirtying the buffers (in step 1 above) and we only allocate as much as that write asked for thus sending smaller requests= at a time. Since with delalloc we see that your flusher seemed to be taking a = lot of time in ext4 allocation routines, I wanted to check if a change in allocation pattern via nodelalloc could help us narrow down the issue. Using: $ sudo mount -o remount,nodelalloc /data1 should be safe and preserve your other mount options so you can give it a t= ry. Lastly, thanks for the perf report however I'm sorry I forgot to mention th= at i was actually looking for the call graph, which could be collected as follow= s: $ sudo perf record -p 1234 -g sleep 60 Can you please share the report of the above command. Thanks!=20=20 Ojaswin --=20 You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.=