Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp179258rbb; Fri, 23 Feb 2024 17:01:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUce6qNBEUajh5yU0zzvwJDqqb1wkBU9BmtzPWjS6S8smJYpmP1ltpZss15zvGwbFOGGvVJE2tb9rxdls0QAlrTxpCiDHByRSSJXo/tAA== X-Google-Smtp-Source: AGHT+IEkx4A5tA4YgIwuSjC2OmE84TVIUo/XQz04opKlqJVgY68uGkB3dYiwbitzKjRWWqwMUMd+ X-Received: by 2002:ae9:e701:0:b0:787:bb6b:4d2b with SMTP id m1-20020ae9e701000000b00787bb6b4d2bmr1463331qka.75.1708736467012; Fri, 23 Feb 2024 17:01:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708736467; cv=pass; d=google.com; s=arc-20160816; b=JBxrDpLlzFGV9XStuI29ZAcMwESUE5W7pGKjWKDAlhtEpOwR3kJwTUks6apwJrKmlC Ds71HhMKo9w3r8GJ1Lb7sZH4XS+nC0lNZtyohhDyytOWKgbe7g5IrYotS3Ov9vtYG7+j iwMdf8Cqh3FPDJj4SpHgcKD4blbFgQLGVashCo1EJRrGTi4AKjJQZEIkgX1tY8rAVpGM cutNFfzlBrGL/bkiv7Sm+GvUZnupxpDQ98cDNPCLdXl++CbiP56wXvk4OFzWvdAgrgWU td/8Vez1MkziFWmy8hbSLegPq6hYXhWyoS5A9rjZ1ud7JTcijdEL2z6MeLPKP5Qfa0iu oWZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=rDmXoVKoRpSpx3FJbnUEoyU4P7Wmwu6SiXdPDld2AsE=; fh=T1Scya+FbdimO68LB0HTRsxIUt5w5IIxda813vkGRlA=; b=BGWATAiwk99qhU4vJGl8uWRLqj3XGvXybdkr26ye4gTY92nfnIKXaNsmwjjBDvEhv5 NpeEWOiBaf3ayl65TWZHcsZzmvZpbY0aiw/tW9Maex5ZkL3u6l1vSh02haztn0t6JuQO BEk/i6+r3G5IUEEo9HtZ3iCXRgigGPPC1CXAD7lzAzqyQsJMABi9mPhnsyYYRqM4Hyw/ yh04bZGzX55ApMPgTOcl2bYuGlGFolSPvSmyCQu+1uDjoNno2oIYzNVW7DIrKvuuPPos +fpOD7JKHRUnP89zr2q9vT/jtXo7e3fYABPRnwhrY/Za0mS/SU2phQl6ZLjrUOvlat47 J3hA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DxINRkfq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79379-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79379-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 i3-20020a05620a248300b00787aed80761si118199qkn.203.2024.02.23.17.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 17:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79379-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=DxINRkfq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79379-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79379-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 660EB1C2294B for ; Sat, 24 Feb 2024 01:00:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 080734439; Sat, 24 Feb 2024 01:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DxINRkfq" 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 29C6D15B7; Sat, 24 Feb 2024 01:00:17 +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=1708736418; cv=none; b=WBJI+kkw31/5UeIvLEDyEKoTtVzu3h4YmPau3qTz/8VFvUAMPXEDYfIqj7zUeaiL82iBhRK93gGB/Qd0+YGipe6YdG7xY06J7a/bn7zjpHs4GL3n4H6k5GNCJSarLK3wHIp3gxYCZHurakIjXV0lTl0RRvxM7K/mG1T1yRZ1fVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708736418; c=relaxed/simple; bh=47CiTeUQMoF+fNPDyBJ4FJQteyxz+4E8UMb9etYDCKQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=BYzmL5x6wEAYgsS89zWwLfFSXFLgtpO+bBrDNmEOGqoGuofULN/mA7uaJaz9+AGqBLLplHtVw8Cs9MFtYoQury13LN9gBlt3CyvSDSDCcpknZZCyR830gN3tklyTjGFQwjIlDHs5jdXiAZE59iLzKVXz2+csClfbDasc8Eq6Qf4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DxINRkfq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C8DCC433F1; Sat, 24 Feb 2024 01:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708736417; bh=47CiTeUQMoF+fNPDyBJ4FJQteyxz+4E8UMb9etYDCKQ=; h=Date:From:To:Cc:Subject:From; b=DxINRkfq/CxUNstQrcWay8JINBj4+yv/TYi/INrwISSoMOANb1t0edg7DmSzqYjRB IRTzj62+WwJzRI0/zQat3ortXs1SHnxMVZQT5vi2YuivYwt+MLP92+meDhdefLe9+W CNXv3PcKsq2KT/zrim9Vpqr6PzVt4zRGfZB46iz5O4X0h7QvFpuMuTGmXc8kIqyMiX 1I/zelXIZapYZIq63GHuKfVbVdmYbHHhO8QVMzK59D+Y2e8GVvWeDWpbvPJ53Pq5t/ utOT43yicNC91cAHHrE0X8KYvppDyiB8cGYEOETJVpRlqzvlIGQ+UXUrglAZEbfMIl Q/7GTVb7KMbmA== Date: Fri, 23 Feb 2024 17:00:17 -0800 From: "Darrick J. Wong" To: Kent Overstreet , daniel@gluo.nz, akpm@linux-foundation.org, keescook@chromium.org Cc: linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, xfs Subject: [PATCHBOMB] time_stats, thread_with_file: lifting generic code to lib Message-ID: <20240224010017.GM6226@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 Hi all, Kent and I went on a little sprint of figuring out if there were any pieces of bcachefs that we could steal for XFS. It turns out that there are -- the timestats code is useful for measuring delays due to lock contention, and thread_with_file will be very helpful for exporting filesystem metadata health events to userspace. So here's a pile of patchsets lifting those pieces of bcachefs to lib and fixing a bunch of bugs in them. These patches have already been soaking in Kent's testing tree (and -next) for a few days, but apparently not all of them got emailed so here I am blasting out the entire thing. If you want to see what XFS does with this, have a look at [1] and [2]. For 6.9 it'd be helpful to get these modules lifted. --Darrick [1] https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/log/?h=health-monitoring_2024-02-23 [2] https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/tag/?h=contention-timestats_2024-02-23