From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC18CCD11DF for ; Thu, 28 Mar 2024 19:55:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 186F16B009F; Thu, 28 Mar 2024 15:55:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 136FE6B00A1; Thu, 28 Mar 2024 15:55:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F40726B00A2; Thu, 28 Mar 2024 15:55:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D55646B009F for ; Thu, 28 Mar 2024 15:55:44 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 89AAD1205E6 for ; Thu, 28 Mar 2024 19:55:44 +0000 (UTC) X-FDA: 81947503008.28.A2CDA6B Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) by imf22.hostedemail.com (Postfix) with ESMTP id ABDBEC0007 for ; Thu, 28 Mar 2024 19:55:42 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=oWnTZB6k; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf22.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.180 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711655743; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qZtbR5ybrM4VN5GkPPv/g85e7nM016zaozBUPlrxiOw=; b=Qaf3agu4tEqXN5Lsg+Xm7QEhpXBusTmlfSYedQHNLum8hEeQlpBHAG/BmFH7Q0D29n+uJ0 eCbBw6NU5o31/uoQHJvpMhVuS0cccjEyRFqFROHYO/Cbzv0f9k2OrM3treHWR0dtba333k hhMjts0Ig9tPzcPYdtFxT4guODH6wrg= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=oWnTZB6k; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf22.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.180 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711655743; a=rsa-sha256; cv=none; b=3lqZ3h8OdEnGR/bMOv2Pd6c2WJvelenh58vPBeUPDw258ktA5Jd7/CwgTeY7wnbcALOkCs 0uc9/P+I0i7jhsl1Hiv9zSesjyiURJ8BpY63FjI70ABkv2mde/Dy53BCxnL44MkHCci8gB VXFXj9O4SJica4xkSydnoVUFw4qUDn0= Date: Thu, 28 Mar 2024 15:55:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711655740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qZtbR5ybrM4VN5GkPPv/g85e7nM016zaozBUPlrxiOw=; b=oWnTZB6kB9RObBVUWC/hoNPZhiMDaIS4FrtDJC3YG581FBvbZRo8QPodfZzy1XDijlrlj2 P6YB8HOLpxFyGwFBccNqr0Jiz+2zMdON2s77rPR4nar3PWbDLXIMyV/gdCigVUGLt9wZdP TAamaZnrSzR9I7ilSTIl2Rr1LRdSwVk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Tejun Heo Cc: Kemeng Shi , akpm@linux-foundation.org, willy@infradead.org, jack@suse.cz, bfoster@redhat.com, dsterba@suse.com, mjguzik@gmail.com, dhowells@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 0/6] Improve visibility of writeback Message-ID: References: <20240327155751.3536-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: ABDBEC0007 X-Stat-Signature: fwo9zjk4xxbqhw3juwufp5sb5i1kk8q6 X-HE-Tag: 1711655742-859067 X-HE-Meta: U2FsdGVkX1+sM0yDvnoMG+XIXwwBHGmjH/omDBlmnI22eDqvjG4Mx7FuJRn6sszsxvU5858J5PwH5Uxe0JmiKubhjbMPX101fbbaoqkqjUBovO1t5fkUn7SVzKLXOu50ks1ocF5hmjQGT3Ejf1+bmQRnW8NzzKsKgLagpq58yU24Y0/7XhaR8SBX4ybp1cUpOgH7miTUbCXHLPHl/yOTttkwD3U7QYDEIyXI+Etu6lq1ClkQplkiz7f7w5ZXFABJX6ZoSP+OZjVMbDtyd8QmIizAV98Pr0BpDcGKbl702IcMn+XTpsRiHdr6DG/2s5xTk4D8P06x61zSyxBZSCWCqZe9sR+Ga3/2wMAp+LM5NUI7KrmXyHGhdAf8LO3nEpkKy842V5Pkmccbk+Idx0HI8mo31ZC2oLL25S+rj7YnZe5oGqgN9m++zSyQUGqEV5HNSA5JiyceKxUTKEpm8fA5JiLYTZs6hJ2xiESPTwvNCUak1Ror848LEQm65CKI2Lk5pW1ev6HkOYt5jugM0A8kn8glT5LTfrNzMmOIaPeKaQKNmdnWDbagMW7ahekF1qNyUOChqTbR2fMHFL7FM+aExB+Hob0DejX098vEj+W3cUijrQEF8EmTQBPGU4GXH+B0+C+iFTttjYb4Rpob/kVdvbRc3wLy/DwVu9yYWhfYNBwYwb82sWr1+IwwSWIakwVWadu7VmxhPQJhehF5rVYJwCqUsPHWZfwl79j2vV4fi3k9dgC3+e+okB0oWBrZV/ex+yhSHhhSz+sZX8/LQZCem8ceCwZkHhGPhFWPXlTYqz4OM9Ikf475tr6XDByYvfu6r3b0RPILfr5UNPIcDF7hNBqnbUZ2Le6ht5W/TxY9DfrpIVZHEgKsOy/kLqV8J6Jbkr3REXUF7kUHthLctNhSGbZPJgI3mdyEdyUf3vntgwY1041huLg4Rq5gcwJdvsxQRR9Sf1aMrG9xtU6KS7Z ZAebMRHI XamdvwrZqOdH2hycsou0eU/kW1yYCJeUE+v1yMFNc2oEkhMSWtwppuWrB7dUgL3QyhCz9md7ZPhMXIeU5stOV6ksuaw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000025, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Mar 28, 2024 at 09:46:39AM -1000, Tejun Heo wrote: > Hello, > > On Thu, Mar 28, 2024 at 03:40:02PM -0400, Kent Overstreet wrote: > > Collecting latency numbers at various key places is _enormously_ useful. > > The hard part is deciding where it's useful to collect; that requires > > intimate knowledge of the code. Once you're defining those collection > > poitns statically, doing it with BPF is just another useless layer of > > indirection. > > Given how much flexibility helps with debugging, claiming it useless is a > stretch. Well, what would it add? > > The time stats stuff I wrote is _really_ cheap, and you really want this > > stuff always on so that you've actually got the data you need when > > you're bughunting. > > For some stats and some use cases, always being available is useful and > building fixed infra for them makes sense. For other stats and other use > cases, flexibility is pretty useful too (e.g. what if you want percentile > distribution which is filtered by some criteria?). They aren't mutually > exclusive and I'm not sure bdi wb instrumentation is on top of enough > people's minds. > > As for overhead, BPF instrumentation can be _really_ cheap too. We often run > these programs per packet. The main things I want are just - elapsed time since last writeback IO completed, so we can see at a glance if it's stalled - time stats on writeback io initiation to completion The main value of this one will be tracking down tail latency issues and finding out where in the stack they originate.