From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.176 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796369058; b=k8UUO2267tmxJvk9Dv1Z/DgQQacYm13Hz/rHorDfCKH4fSDIR9jYpiF42qqHQX0Lt7bE WGy8QTzKoiXhzRDrOXUEG7n0haeoj0jyIT3+eYVJrRfjKsgzx9XfD3kOE2caCoCL9ZAQJ Nj6k/yX1a7wSHEDiYXYO4kg+gSjoS9FBFQ7zTHGRvm8pulFJf5wUNZbHTk3/r6y0zqflj nw3uS3Ogh1N4eXDMZi0z0K81ANB6lykMlnNWRuXVrukeHms5HmzpzHq8ZztjOfsrcxQ/l gpiGTA1/CWVxYG/kJyOiaZiCd7jEBtJmSF8n6Ubq2xs0FE8+GEQVVUej8E1H17cl+XQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796369058; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=de8YgCAcYezj2cM0nTkFpRaxULa+4+H6ZO8POG/0zaw=; b=ms4L7+ZsjJiOsL7jAmh6LNtK3LRg9NOjVYKArIeNSddzprOiugE+7i8baML00Pz32Ovv vijVCMbv8xBuE5IvlrXH55uufrpGg5a/fpKfxNOgb4U7yCpJXi/kZLB08TfSmMkRr63kp UF/eFwWMSg2/AqyAvPy53vZ8RTLDR7KM0A8ScGYmrAumhZUHnmWAHgnKE6TjAJIyL8ibi N4e0QPngRR0jixcWzVLJ6E+HHouzZaXEFONXc6rGEQbDJ+rV9eum3cAR9a9WN/GsooMP6 6HgQi3UKgJeuN8FwrkXv/snvS/EGqMctzj3/VTgRat02GLjezzOfkZ+1U2uO0uAcjZA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=0H0uRwuW; arc=none smtp.remote-ip=209.85.210.176 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FC20606A322 for ; Fri, 4 Dec 2026 07:24:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8FC20606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=0H0uRwuW Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8b6b22be970so282366b3a.1 for ; Thu, 03 Dec 2026 23:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796369058; x=1796973858; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=de8YgCAcYezj2cM0nTkFpRaxULa+4+H6ZO8POG/0zaw=; b=0H0uRwuWHMpPrBb5lPfXXR/oweyb7c51BZqjOl3jiK4qEG2bt5lvo0LC8zYme05Kvf KQnSMIPXTTikN4suCVT3jqA3DrutteSFqENUl06C5Sr7MAIh/QvwuFlAgomAIU7ayZ3Y 08rwsbKXnOlSWh2nV1vQ1iO+0GDHrvkDT8SZ7vQC9APLY0O1HU5ev19sLIIRZXb2QkUY SX3IIVi9FXMtN9TPiFJ+0QWuLy+8U4uez9qji8+vhKkYwOyKKpSTCH1an4ZSen0l+2Pi IdvJmtrL9dj9bm6cF04OE82nKGeuqqJz7A43nhqkhTP6G39AUtKjaf9i1KEUskq8K1ti FKbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796369058; x=1796973858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=de8YgCAcYezj2cM0nTkFpRaxULa+4+H6ZO8POG/0zaw=; b=tFEEYII16YcnAvG9160vagrwW87jycGTbthoLFhHV6hzts8xnZsSQYQG0IAr0nQvFY 7EGFSyXhI2uZWZd87DdI5e+XdMKe3CgESnJ/nUZy2Tav+ovwvyYUSy2+jD7F4S7EmGXN CP8cMf4Py+gOiOWtaSP0Y0gReVqEQrydC7eNs47HQ51CP3fgXJc/z6V09QBuev6sL7SV tuCjJWssm1pbxXog8LbS3ix5tocO32xQBeHCB1hVRYww4txB2f39UfBpJBiL3peJYIkS CVE0BhQsd1Vn2rG0Gcm+9Hf0cTLDJ+nHDtd0R4ZQs0ErCeHlC1EjZc2An60AfWZwtvtA Qa8g== X-Forwarded-Encrypted: i=1; AL+hErGo9HSOFPJfMrbgj5pd2hRfOoLW+E/PE03pXHBdOlA1gwMt6+o/tdM3CVL+B89TaePMZr3ay/t5MfE=@vger.kernel.org X-Gm-Message-State: APuU4Z/WnK8OvfUsc2zBCS4Y3S6KEoU1bH7m3lefunMOneI3JP+CrQm6 AXV5XZoauI/BOorZjQKtSGo6NL2r8uCxmqrrzso/f6l0L6KM/9Z0dlNbdZL8ZqgmzrnyIA== X-Gm-Gg: AZFdTZeDW8orulOxAkZhXOf5tVWO2wpPfC0fBD51afrLOKofsQqa6/FNiZ5MC7dEP1r WIlpRX5gahr7X5ege9a1824IIrCNE7MtIH7hgb1u7sUZLVECMMaL8J3gtZhmhr1x9IXTCu/2A1H F19XWJ2m5/SLT+JYaUyy/litsEvu3DGFkA4AUUBPO6dPWBjhcmWs+AURsid1dznqphNtyK5tZLy 8MzyzbmabGgIuUsK4Qyj7Qytq2yIrd4JEw5eUTwXBtKvuMZIrbVp3ihDopx6+p7EUAJqU/a5axU VQfjLw04ksO1uLxjTtg+47wzqFHOpRXGNxf1skYMHtXjgKbV4hrDk8yGBtHHQrzreYXxVRoJXbS DjOeHbtHkl4VXpWTkGAOlGttdqq2Kn75m2I/mppJ92kBEjQB3q5WC6fBZacqdxpofSaHSY0IpNK LOhOOrc48p8+8jWP5HW4ShUb58xbLw34Jv9VGQzfi0k3xBa9BS5BLbEfFuhwT7JkwPvF/+sh3vA V487CGNArOBL0WIkReG0YustJs3HoN2ZakKxbMasrdVJZlty+HB+LbEPNFD+1c63eagplw2sE49 4TgXAFBmDEiiWz8F3Ypi+N5TkcIdoqwlWLr8SsKPlBZQNuOMEB8YwaxYuG0N X-Received: by 2002:a05:6a00:2d9b:b0:8ac:3a71:38a6 with SMTP id d2e1a72fcca58-8de2e7c4df1mr1345803b3a.52.1796369057683; Thu, 03 Dec 2026 23:24:17 -0800 (PST) Received: from DaejunLaptop.vivo.xyz ([98.98.232.247]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8de1358b3c4sm936020b3a.49.2026.12.03.23.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 23:24:17 -0800 (PST) From: Daejun Park To: Christoph Hellwig Cc: daejun7.park@samsung.com, Carlos Maiolino , linux-xfs@vger.kernel.org, Dave Chinner , "Darrick J. Wong" , Amir Goldstein , Brian Foster , Pankaj Raghav , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] xfs: skip the fsync flush when a later flush has completed Date: Fri, 4 Dec 2026 16:23:06 +0900 Message-ID: <20261204072352.4356-1-pdaejun@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261130125841.GB27971@lst.de> References: <20261126-xfs-fsync-flush-seq-v3-1-830f5dd79fae@samsung.com> <20261130125841.GB27971@lst.de> X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Mon, Nov 30, 2026 at 01:58:41PM +0100, Christoph Hellwig wrote: > > 32 AGs, 512 clients: 4812 -> 3256, 0.5 -> 21.6 s [...] > The 32 AGs, 512 default number looks a bit worrysome. What is the > file system and log size in this case? 80 GiB with a 64 MiB internal log. The log is the mkfs.xfs 6.6.0 default; I set agcount=32 by hand. With 8 CPUs, mkfs.xfs 7.1.1 gives this device 4 AGs, or 8 if it is non-rotational. With 8 AGs, the 64 MiB log and a write back cache, 6 boots per kernel: clients MB/s base -> v3 v3 vs base, 95% CI max latency (median) 128 1786 -> 6587 +269% [+261, +276] 0.4 -> 0.4 s 256 3090 -> 4650 +51% [+47, +54] 0.3 -> 4.1 s 512 4202 -> 4638 +10% [+7, +14] 0.4 -> 24.9 s 1024 4358 -> 4532 +4% [+0, +8] 10.2 -> 27.1 s With the default AG count, v3 shows no throughput loss, but the long latencies remain. [...] > And this looks really weird. The changes are fairly minimal, but > if reproducible something is wrong as we should not slow down > workloads that do not have a volatile write cache. Thanks. On a write through device, with 24 runs per kernel instead of 3 over 6 boots, the slowdown did not reproduce: v3 vs base, 95% CI 4 AGs, 256 clients +0.6% [-1.3, +2.6] 32 AGs, 512 clients 0.0% [-1.1, +1.1] > Is this just the extra atomics? Can you check if the overhead > disappears if you only maintain the counters if data or rt device > cache flushes are needed)? In the dbench runs above, gating the counters on bdev_write_cache() showed no gain. With the CPU as the limit, the counters seem to cost about 2.5% at 8 and 16 jobs: fio 4 KiB overwrites with fdatasync on a write through null_blk, 6 boots per kernel: jobs v3 vs base, 95% CI gated vs base 1 -0.4% [-1.2, +0.5] -0.5% [-1.5, +0.6] 8 -2.6% [-5.2, +0.0] 0.0% [-2.0, +2.0] 16 -2.4% [-5.6, +0.8] -0.9% [-2.8, +0.9] So v4 will keep the counters only for a device with a volatile write cache. [...] > So the default log about is 64MiB? Yes, up to 128 GiB. For a larger file system, mkfs.xfs 7.1.1 makes the log 1/2048 of it. On a non-rotational device, many CPUs can make it larger. Best regards, Daejun