Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp505924lqh; Fri, 31 May 2024 08:00:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXuQkz2rdp5ZqaBQadBCihxl1TktJCfRPkLk8Ad/Ro7MDaEHeDaK28EfbcSQ3emI+1eddgi3A1OaZGnLbvu/P4g1CX5rbSILLCTqSZEgg== X-Google-Smtp-Source: AGHT+IHymjStkfKJg6p/Jy3hONVl7Yu1p+nOqpx2wnwxYlAV8TyzTGfpIQo5o21xMMOKwEQOO/XZ X-Received: by 2002:a05:6102:1278:b0:47b:ef66:6720 with SMTP id ada2fe7eead31-48bc22e24dcmr2059994137.25.1717167628139; Fri, 31 May 2024 08:00:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717167628; cv=pass; d=google.com; s=arc-20160816; b=fZDGZqOsTzbwcaCP3IZv85wMdTZUPlTG0wdTtDnNdUOg4RaU3t7gmRrvNFQArg4u5D dgmY/XIDZ5RcYQexDHH98S0iD0mzr6mN1Ro6XT4F68n16ZqnezpvfGjKwG8Hd+3p18GA janc9nXeje/1U3EwZbUAfruIhMND7EyXzZWbEkuFWkKVUjg47Q1OMauc52o7T0lE2PHl yzn4ClsVZ/e7EWD49GXiImIQRGIZn6V8X6I7KYxQRrz9dHq4ugyqmd5KS4lFq39cIqWw 8L+/jfotCOqtVNj2iUNB1Y4kbrado7goNyAe/MHbLTwQk7NRYehu9h39zqdyrBE0muTB Ap0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=crcySkNCwFexci+cxuTuno56KLXf24YiW9x34ns4uTk=; fh=/+oJP8T5Dkpuf5Cn3AdmJIb4b6f4Vsc2mL9mQYxwkNg=; b=XjuCXh2NIBnfKt6mCLxuViQYJsWDfc9lQ9qx3PSIwh2qx2j1I3baEp1uYl0JYYPNTO 7+Exby0hrmzhxjBalTxtPVYvR4Vn44FpqtsomlHicr8mwaWmI7K/pJ7TTB7f/s6n0wsF XSLyxC1RGdaKHAk8tVXKEwKGMSrpJspqv4jSoPvlYyFauzY06Q6Tvf3tzyZYn9aFH50Q Ot3Ik6Rblo07JWErSqK79r9ZCbcon4A9RO8RLhWCj/hoSpPL92QhoS3cZ22EouZMIuTY IyXWttVh5M6bEqJCl+mHjdttFwSE6snjfFirR3WN3dUXm9DQREQEFyio9bci46NJzF0h CGIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fLTihaM8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197021-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197021-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48bbcea7538si449255137.322.2024.05.31.08.00.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 08:00:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197021-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fLTihaM8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197021-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197021-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E5611C25069 for ; Fri, 31 May 2024 15:00:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06DE07406C; Fri, 31 May 2024 15:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fLTihaM8" 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 26EC27483; Fri, 31 May 2024 15:00:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717167617; cv=none; b=JDC/80kIhkUV28jvCK0Of/B8xxhtwMrSej6LRqcPlczxat4N3wRAjefDLjp0W6n/Tc/sNz0pmGmz7tJMRVs1SRlwbhWrkjcZkdvYIEgI/mNcPgc3M9cMS7pjSdefPRUgvQk+bnoNBtxizBukrgeazdWc5NxwIZN48rN0cRNyDg8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717167617; c=relaxed/simple; bh=oHjJ3ge5Oy2UenWzWYCDHU9h8HZVrZIgr4dbqGF2JYI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SCAtr2G0XceqeIlinUEvgTDpD1pJRNXOS/DnMTVlSPSuvMy+XPKfdneL1TEHbhQN/iy1zSDXtJHAs/0blmrUblb3qIBZCD+nzShE8lfZ6B2iSboqvut1EIjhxYVVZRPDKB8f/SbfTQg1BZgzhtY0FpTxtaoAI0E0swp3c/e1PQY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fLTihaM8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A88DC116B1; Fri, 31 May 2024 15:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717167616; bh=oHjJ3ge5Oy2UenWzWYCDHU9h8HZVrZIgr4dbqGF2JYI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fLTihaM8uhf8S4bQ24cMMo9PFjcBjm1r9poKMCfnpvSKZIo2uyE76MniP84yBbO46 WFsj05gHbaftfJYMHi9ggHyH/XIcyBDAgE6z5ckcZl2LTS14+fNeSmraIDVyCFWz5P bJNH88ug57pC82N5g7GdRfevaz3W9hlhjYhZWDU1S+cCEG1dWjo9hLDZGiHQmENayW HLav5+/ZXvAzn+NqOuy4YEYGqlTec3oK58LNwDWOY18DbHuxi4XjKQ7/5bsUFuvVMf bb1ky8R7NHfgf/RScZv5yPb4ty8TPIky1W3jnrxxYlNybXPgOT/1PVPvYdp1GoMQ2T C3FYhbPW1QpWg== Date: Fri, 31 May 2024 08:00:16 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: Zhang Yi , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, brauner@kernel.org, david@fromorbit.com, chandanbabu@kernel.org, jack@suse.cz, willy@infradead.org, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [RFC PATCH v4 8/8] xfs: improve truncate on a realtime inode with huge extsize Message-ID: <20240531150016.GL52987@frogsfrogsfrogs> References: <20240529095206.2568162-1-yi.zhang@huaweicloud.com> <20240529095206.2568162-9-yi.zhang@huaweicloud.com> <20240531141210.GI52987@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 31, 2024 at 07:15:34AM -0700, Christoph Hellwig wrote: > On Fri, May 31, 2024 at 07:12:10AM -0700, Darrick J. Wong wrote: > > There are some users that want 1G extents. > > > > For the rest of us who don't live in the stratosphere, it's convenient > > for fsdax to have rt extents that match the PMD size, which could be > > large on arm64 (e.g. 512M, or two smr sectors). > > That's fine. Maybe to rephrase my question. With this series we > have 3 different truncate path: > > 1) unmap all blocks (!rt || rtextsizse == 1) > 2) zero leftover blocks in an rtextent (small rtextsize, but > 1) > 3) converted leftover block in an rtextent to unwritten (large > rtextsize) > > What is the right threshold to switch between 2 and 3? And do we > really need 2) at all? I don't think we need (2) at all. There's likely some threshold below where it's a wash -- compare with ext4 strategy of trying to write 64k chunks even if that requires zeroing pagecache to cut down on fragmentation on hdds -- but I don't know if we care anymore. ;) --D