Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp682736lqh; Thu, 28 Mar 2024 13:01:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWcm+nhS4Umos9PnUPf57DGyp4xqes2/8HIEIbtsK8hFNUdy3M1Gh5BlL+gW3rC98lr8xaHrAtqvXK2BDrv87PuAHy67GPJgYZ1LyB71A== X-Google-Smtp-Source: AGHT+IFOjI9eCC8w9nW/65DhN81arteV9DwVP0Cb2fOtGfCYaQYQG/sL06zV/zQXkOF3hk3q33SW X-Received: by 2002:a05:6a00:1895:b0:6e5:5597:822d with SMTP id x21-20020a056a00189500b006e55597822dmr380154pfh.33.1711656100596; Thu, 28 Mar 2024 13:01:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711656100; cv=pass; d=google.com; s=arc-20160816; b=B6dKQnmetq5aaMfsNwbAIlEw0wWJnXf7urfmFEx4m1hQRXuCn+9oNMEXwCSHDbI/8p ozGdHqv8TkyfUAWaH8nXiELUwdSKg+P49rNkjQjbNtjGJgpFvkAjiF5Jb79U89xw5l3h j3+H4/FSoP007tuc+QZoe3BioYODOeXQfs59XRlkvDc2zlfp3cMAmhxzyBp4NgJcRQ6C nwPBl77SuKkTurqg6+rpLky88RxDWeK48jE2PkguIActSftcTpr2/JfetdyhrZFY/oXu 3pqcAb9yu13sHjwA1f1U7X9m3H+2LZ8vh1HEHwAYMGxPZKp3DF0W47ZQbD18TzHmQVQJ Oykw== 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:dkim-signature:date; bh=qZtbR5ybrM4VN5GkPPv/g85e7nM016zaozBUPlrxiOw=; fh=JYyhVAcStIY1lJrQSdbMBNHKqT1iSuFrmz0Tsoevt28=; b=ZdnpelL9W/6IpAw8xVpDRrsoVl6+QpPV8MBTM+vwvQDMRkPTRNN0+5zwOamEKrwmvf NkX+vDqbfphnRsMOzZZvBnTyZu1fHbRaySkjGVxe/u9tRd9UekwLpdNrYfeU/TP8JNQT kvkPjQsLmYcAXZ3MXZuFg+dqU6Mj21DT1w7f1Dg3nrkOknTOJazjRuf7YRx2kkiZAMRB ENZcT+Ctx3loL+OfPIhYP8a39gkrwF7B1kcSjRNGsAx0hwmnwwHk62kO2fXkk6OIo4w4 nzQ7wy1jK+TLvlP/h1VUIXbSNDD5dJPsH6SWWxgejfu31ud8VhBms6DU4ENhRrnB5r6l ACNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=oWnTZB6k; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-123534-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j21-20020a056a00175500b006e64772d362si2021871pfc.399.2024.03.28.13.01.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 13:01:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123534-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=oWnTZB6k; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-123534-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 05A9329D816 for ; Thu, 28 Mar 2024 19:59:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09E0313C9B9; Thu, 28 Mar 2024 19:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oWnTZB6k" Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 4FB9413BC27 for ; Thu, 28 Mar 2024 19:55:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711655744; cv=none; b=t8e6ME2PVBFtB2LnsxE3/G5RpLQDocaLJvlHuM4rl52s5GLEyjyD/ywmxNvSEQW4EfCNITkQDcYDISQ6/AvkwLoplTjnvo+0XqXWT0stqsgeEuK0hsArihpbWsx0y8UWtpKJwFgvpLNt54OMwd3HLKHxWh8BE1nXJQuDbYMC/qs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711655744; c=relaxed/simple; bh=3dm7hXsEyv3o3RpQMnPL3+cUR/Meb3nCFGnidYwVRSk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tWoZ/hB0VPCffwbY2482Fdn6VFV62TO6NL1OYvjwgsZPmMDosxeWyAbHCLmi6EArek8UTzTKbZcga4mtk1SVJE5hGfFHzGw19660IWVbVTgOW55rBlDosDU1/m+QtpHxE5EhLZojaJPP582n2MeTp7Iwh71Zsg1U5OYkWehsyTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=oWnTZB6k; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev 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> 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: X-Migadu-Flow: FLOW_OUT 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.