Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2926541lqz; Wed, 3 Apr 2024 12:33:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYrtbLnT0TnkwKpdISrQpBqS5Q2f+MMRk8mawswAfhGcH91a8SFsPqrSrP3vBUu39SyBRUsgQgfVelsg/f16lrD8Q3FH9wzugMrfdRsw== X-Google-Smtp-Source: AGHT+IGt3DHu3N/kRdjgN5AmaaUu7ajNOfRCZ5d1i1Q+030K5D2D+y10hgQBoDokVt2NC7DCZ7a5 X-Received: by 2002:a05:6a20:3d8d:b0:1a5:6d13:2afc with SMTP id s13-20020a056a203d8d00b001a56d132afcmr635257pzi.11.1712172818380; Wed, 03 Apr 2024 12:33:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712172818; cv=pass; d=google.com; s=arc-20160816; b=PNKGwesFtAQj+5t3YkrIfnFdwsJXVxKOTtcIi3T/T7EhKRyHc453RVsD3moVCgGWbo F7SbidT74jdu2S7ntRjQXhnRBlTU3zY4AxQ5k3RYaMm6nP6rn0a7D7jx6cPG2GPS/zZr dVet+UCjyZl75udpQoULhmuIYaUTs3l4A777/VwSYJAoThWUd+yo/tIa5m5KrVZYyQWg d5mlIIxAhWkf7gbXy0MxIlhXQk0Z8eYZDtLOgHKfaf0ISW6AL2Jut9qgCeQTCUr9Dauz kQfRU9XlM+ybHBwwQK6BWXCGoyZDrK9qUpFQNkMVztj825gY4vPTW9VwIwQw03/8HQO5 xWfA== 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=MPufZuIJuTLIDu10Urps9fsUQXIz9rznyNkrrZnyWEM=; fh=2K+ssTfQF3FVrwg7pLfxiwEmD7chCV6JLcBMEZWCyjw=; b=yY7VUQyoDLcqxfE0MQzax4E+SCZW1kfArzuDZh7+rpzWGx0RQWDcFVpvgMPK1vIztx LwBHfxKRPxCTGqGyGejpGJDh7QfPLp3p1/wGPTVsJOpL0SPxQiat+poHUOlC2n7M7Vzk XHSh6uws/sFQJFWxoV2u/9dCXFI8K7gJ/WoK3QGsMl6V2OXZ9mkBcZ0sI5A+i2nMiW2A 37OlVtxoF3lGr//35TG04H+zYWL3Sldc0JgAhSq5S5tAnJG7Cbg8qBPYNL3HmSR4j8Kh i30PcFR04jTNp0TMzlcnJls19ZhHbW4tzdtGBIYstP162UgIEHd0EC5smwOsgtq4eFWe Uhgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ab29Awgi; 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-130485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z9-20020a634c09000000b005f05689e3b3si13759695pga.649.2024.04.03.12.33.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 12:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ab29Awgi; 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-130485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130485-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5E322B299C5 for ; Wed, 3 Apr 2024 19:07:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE45A1552E3; Wed, 3 Apr 2024 19:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ab29Awgi" Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (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 68C2E15099C for ; Wed, 3 Apr 2024 19:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712171225; cv=none; b=aDOjOZPC9ahoQqW7jjFpqLJftCYKbe3jRcH13as1s3vtMX6klzmHRqrFxL8xdmblKMvy90ETDCIJKl25OihF/S35XV7JhFFMVquyK6ktfH+0aPWsVX/9Ck+WjNKTfvmqevBkimhgQiz62R21GihJ8O3QY5PtXG+g3/goiHZRi+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712171225; c=relaxed/simple; bh=DmbUJaU7fvPvxuhQjMUT+PZdyRm/OezzMypWogtG338=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F148U1L8NOP7I40cBQde6wap4+4hQEj0/jXYbulnn1/eDM1MKXMVHQgJb1xiBnPwkzxK+07QLnV0SKXr/6rzEOxXeZcyXIBvy5DAAY7/Or9YQq1gUikOSTgKU+RPt8YASDxRXC6Sv216HCxNh67QjRz/Z2IhimPXqY7Tw/N9HSI= 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=ab29Awgi; arc=none smtp.client-ip=91.218.175.188 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: Wed, 3 Apr 2024 15:06:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1712171220; 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=MPufZuIJuTLIDu10Urps9fsUQXIz9rznyNkrrZnyWEM=; b=ab29AwgidGYXl/9pYqDFJfdDItXW7t4LUhM3Qj9YVwhcTDaF8J7UEropu/nN8V+SnlrPp/ +SrSQ2f18s9M0jQ8SgPaaB8J5ogz82i+9eN08TaGx4gkgjN0F4Euhr/MbcHZN6rMiDbbtt T9FLbyOJvoCIqIyAx5v/kURkMzbxliU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Tejun Heo Cc: Jan Kara , Kemeng Shi , akpm@linux-foundation.org, willy@infradead.org, 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: <20240403162716.icjbicvtbleiymjy@quack3> 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 Wed, Apr 03, 2024 at 08:44:05AM -1000, Tejun Heo wrote: > Hello, > > On Wed, Apr 03, 2024 at 06:27:16PM +0200, Jan Kara wrote: > > Yeah, BPF is great and I use it but to fill in some cases from practice, > > there are sysadmins refusing to install bcc or run your BPF scripts on > > their systems due to company regulations, their personal fear, or whatever. > > So debugging with what you can achieve from a shell is still the thing > > quite often. > > Yeah, I mean, this happens with anything new. Tracing itself took quite a > while to be adopted widely. BPF, bcc, bpftrace are all still pretty new and > it's likely that the adoption line will keep shifting for quite a while. > Besides, even with all the new gizmos there definitely are cases where good > ol' cat interface makes sense. > > So, if the static interface makes sense, we add it but we should keep in > mind that the trade-offs for adding such static infrastructure, especially > for the ones which aren't *widely* useful, are rather quickly shfiting in > the less favorable direction. A lot of our static debug infrastructure isn't that useful because it just sucks. Every time I hit a sysfs or procfs file that's just a single integer, and nothing else, when clearly there's internal structure and description that needs to be there I die a little inside. It's lazy and amateurish. I regularly debug things in bcachefs over IRC in about 5-10 minutes of asking to check various files and pastebin them - this is my normal process, I pretty much never have to ssh and touch the actual machines. That's how it should be if you just make a point of making your internal state easy to view and introspect, but when I'm debugging issues that run into the wider block layer, or memory reclaim, we often hit a wall. Writeback throttling was buggy for _months_, no visibility or introspection or concerns for debugging, and that's a small chunk of code. io_uring - had to disable it. I _still_ have people bringing issues to me that are clearly memory reclaim related but I don't have the tools. It's not like any of this code exports much in the way of useful tracepoints either, but tracepoints often just aren't what you want; what you want just to be able to see internal state (_without_ having to use a debugger, because that's completely impractical outside highly controlled environments) - and tracing is also never the first thing you want to reach for when you have a user asking you "hey, this thing went wonky, what's it doing?" - tracing automatically turns it into a multi step process of decide what you want to look at, run the workload more to collect data, iterate. Think more about "what would make code easier to debug" and less about "how do I shove this round peg through the square tracing/BPF slot". There's _way_ more we could be doing that would just make our lives easier.