From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796369058; b=PEhy47Gu/HxU+3e07VtI2IUVCAOxRq6NtRHa714T/KLjrVR6yCqHYO0Gnmpy20zPQADw E35K/hFLP5EMB4lJWayegvWccQjSJVzABNswP1gPM07vTSmJ0X/hvGmb7x6xv+nXyBscJ rkT6n7Qd5gUn8Jux7NaHUjSHfU/8JbkrSVoIF/lP+r7MRnNS1Qp4rhBT+NNdwU/OPNgaS w/kgoVmKnl+gcd/gAiaCxPZ72tXqsI3hBrtSVcCre0RCBTjuTV1umPp5PQIWsVPK/q1vE Ty9NvBYtkJJS7OSSlHv2BZ+oDTb3VYtpocix64m99/FAqWra5dsDxRlTxSVK4QOzAyw== 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=14/xQz3/crD9GCOcpmq+jl4CuPh1/6IBatkseRRdFcaMlJSxumQwQWeYZlVfyFTsTy6k bhMebBofASXiACsLGKZRUsv962DdqgS2Zzi23t0riM5JtnkIVtwlpHGRsOMKvKLjmG2Mr KdCIZS4M790icow89m53dC+IY9KHtrVeJVR1nQCQEmM+m0dW3/Yfss/ZLqYMygo2m9PS1 eTAEbckAuntGzFeSj7TkpMKsab2Fli9WYIh6wsmVtSFCM29q0W1kCgxxvPfYQqq2PO3Pl ifkKcmop5RcPtyhuvU5FWg9l4u7tGMXTUMi0k0CcGlKbeYP/PokI8AYgzPQVOW1XQeg== 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.172 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 90905606A32C for ; Fri, 4 Dec 2026 07:24:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 90905606A32C 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) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=0H0uRwuW Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-8b67f25e6e1so358967b3a.0 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=uvKRaoGPlfr9StrtyyntvaZ5XoL5im2d95Qw9cUJu7n18Z66T0eWlnX9WF8n9oSZ9g YWFLN/5IMlnekHcyxHZ7mO6UwQsva0dsosqOuXvDpYt6iClNM96PF5vNknBVWw6fV4Xq yej8j3XkaHilwCR6DtwkIQrIRVjWsTkSGR8wASsHzK5PzLGOcvVEcpRwYVC0qJsS9Q8L dBFLFWsIiRS3peoNPpOdpUpgA026QyjufVDZMm25zOOUPJvcsbB7AUJulMYvrebW8Byu A3zH9nsEEGL6iWTCGBjT8wHWGAvroq5z98tFo0LBJOgEbEglMISX0jIAp4QoPKKhTtct kKNg== X-Forwarded-Encrypted: i=1; AL+hErE0EvQafxemqdd77Gj2MPFt+DC0Q/Uyt100DoLl0VrKhxZlshuiEk++a+sHYj56GTbS7FL9c8JrC+p3yVw=@vger.kernel.org X-Gm-Message-State: APuU4Z+uQkYwh5rPuIiRozusrwSF+BApxgQ78WYsOw8EJFoIvHS38Cgu zuR0o3ibdLc/0uwEd3TLHn4NOdJyOcF4Np3E0RoK902qISmlRVSP28fK X-Gm-Gg: AZFdTZdwOd2w6QbjfWNJk0HfDOBKsa8xb3EOeB58eX0sVDwQDXBSUt+0Dok9LSSkciS k9A/OLHWj3itb8utYluySS9k1eCpLYScdz3a/vLRpJ07o1lPip5Q1vhtJgl3bsFX2FVxIVPC4/5 ZdLhz65sydAQuOBTlExbxB0y9zwEujVBstZbRX4mlrFs3TTEGgm3NSW6vOaDWKKKl5bJ65ZL4Kb L4qVWSK5lQPFqWBBIkjArrGLFj8khsCOvfpxVxVrBWWczeGUiySgkbwjZqx04cbX7FnIXEHiHT0 Z9VIPHnAsPujlZB+jT2aiCG3LfzBTpnjZdx9r8W6AYzdosd534wCDZlrnYH0W2SutyDGrpTDczQ 1f7EOETCN5oDs0unROAVny5Thm7uxp/je+NjHBKrVcj4P0BacLIaWoVA+Sl84L0F+n/7fALV/7t 9QzLThAT4zv8MRN1c1MdQumruSvuAnK7byoVJrn3bUIRLVvMWofk3KO/kvM5YXmxS8yCuv8MvKf WaG+zI2es+XXciOuQptZWxhNqbqA/yBAoDwWUrTi8/O8AlkM3Hpf3YENEd+V0YhIbhTHtOk2hCX DK3UaC+zeaus3adLGCCXpej3JoRHzfZGEz7MnrHfYxtiwP8N5RmniIMLgWsT 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-kernel@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