Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5015032ybv; Wed, 26 Feb 2020 07:01:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxGzkopfk91iqr30owpmBWT0Sdar2pqwVH2GAeTcOFMQzSxyhNKIMRk7H8XauQnOOQ12Ym6 X-Received: by 2002:aca:1101:: with SMTP id 1mr3458617oir.30.1582729286870; Wed, 26 Feb 2020 07:01:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582729286; cv=none; d=google.com; s=arc-20160816; b=Rih8LP2a05XE9sgFkHZOKn6dOwDR/eMvblkaukCaXHdqNUNyTH1TzrBvw+vVWW++mK HbNaE5PsQd88kBKZ53QykYcHpPoDDk1TrtdAa/daMAr7OKza9f0QimqroUYEQ7aVYY8/ mkkwFwFUmxq2Gyx9vDaWv4nkL0mF4ayVhLXFzGzjZaZhP2P47Yg+ihPfBLkfdqifIPTB XzlVxAaJbl1BFg6vUTWcMu/3eK1ww6Zclct+IhtdEBU5L0xZI/xaSQSuxIHmM1qq4hWU ib1dFWDWGLGIIWnpnKctjwlygyjj0cEMUAyUyLnGPEfwaKxDgANNLyOJP2GBmY4xHFzE b6Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=XEQXtA92WxEoyYVbPjA9RQHILAt7XDfCFPviC5NGtgE=; b=QqyGoFKk8x/OuDN1LeNu/7e6wQV1dJ6kDDojwzds6Q6NA5DvF4SnzmV1vB5RIyBBfa RfaUZ2hK3zyKUo3Xcr+5zNbTcKsRZicyI16crQIjeCEWr+5HZe7lbX9ZcGmUouF5Rjjm s3hPq6NaGrp1T+/rkpAM3x/iw0m4x0FpI4AbOXp/FKP7/IW9/Tw5LzvK2r+5mV1eaYeD 5YU+PpKZ6Kdk9MxvjQRfFWVre6JcXztsb4FQFe0TkQzgr/TGtjiMShSN2fY5A/wtRd/L pmTwOYO4CkSLD4wSuKDZC8l7ccgvjRznym6CVTsR4wPSZfMAsyY5ETT7ACQisXcUsRxs O2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CFkZivHS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si1480872otn.53.2020.02.26.07.01.14; Wed, 26 Feb 2020 07:01:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CFkZivHS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727699AbgBZPA4 (ORCPT + 99 others); Wed, 26 Feb 2020 10:00:56 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28496 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727078AbgBZPA4 (ORCPT ); Wed, 26 Feb 2020 10:00:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582729254; 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=XEQXtA92WxEoyYVbPjA9RQHILAt7XDfCFPviC5NGtgE=; b=CFkZivHSsHlsIcB7gII0Jbr0m8dLTjN0o8b5RcoPbamHf3yiC3NU4cANvcv0rz3GH1Hadv qUVDAA0zcK7x8jQN6UOEtIGLhXnUTOGsMk3hc+ls0JZvahpgXOrSmAMOVSakoKb/MytmTj PynM9AkAFyVAg6xgLVy/DRHhfCLOAKs= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-YYj90b9yPDCd6RT60cmDAA-1; Wed, 26 Feb 2020 10:00:52 -0500 X-MC-Unique: YYj90b9yPDCd6RT60cmDAA-1 Received: by mail-wm1-f69.google.com with SMTP id n17so760660wmk.1 for ; Wed, 26 Feb 2020 07:00:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=XEQXtA92WxEoyYVbPjA9RQHILAt7XDfCFPviC5NGtgE=; b=KvU6RAiym2NFQpI8fpG051SReBi/YW7kgq9XTP0FqjF+UQNM6hbp2m8At7m/po+bDi 7Q986i6qULOUk6jVoLUd0yoss5F0Ixg7wqjfGtSDW91vF8WApWWVQ48SmKpvIUmrAbgC J7KW/sFYYDTzBkHI4WTCy2FGJQnI2RYDbfHGpuGrNuDjMOIoDa9NDjwUlaNbSjmD+v+p fny1eIengDr5L0afb7mLmtYGh+yYGmAOswFmLsm1Ps5N6DXhW9bwf2eIxDg4ZCD69Jdv d4ElAZUxH6U5fmdA0tsqfiIDjjCBcXNYotVsdBDGQTtAo5DIxrAQ76x/b0n5fHMr5GOQ b3NQ== X-Gm-Message-State: APjAAAWZi3BDwjvOfPRGsp90DI0E/S3XxF7/g8D1YysDWeHpiST0wXCc R8zgH1aG3AvUzJKF1kB2FePnL6qE3dPWgFYuDA/erp2rtFAjz2Yld8AjtaR9J0Yh9+kamBfKJ42 /F2gHEKxJMPQj+G4jzz6gfFRk X-Received: by 2002:a1c:dcd5:: with SMTP id t204mr6009904wmg.34.1582729251468; Wed, 26 Feb 2020 07:00:51 -0800 (PST) X-Received: by 2002:a1c:dcd5:: with SMTP id t204mr6009871wmg.34.1582729251234; Wed, 26 Feb 2020 07:00:51 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id x10sm3320837wrv.60.2020.02.26.07.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 07:00:50 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id BBFCD180362; Wed, 26 Feb 2020 16:00:49 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Luigi Rizzo , linux-kernel@vger.kernel.org, mhiramat@kernel.org, akpm@linux-foundation.org, gregkh@linuxfoundation.org, naveen.n.rao@linux.ibm.com, ardb@kernel.org, rizzo@iet.unipi.it, pabeni@redhat.com, giuseppe.lettieri@unipi.it, hawk@kernel.org, mingo@redhat.com, acme@kernel.org, rostedt@goodmis.org, peterz@infradead.org Cc: Luigi Rizzo Subject: Re: [PATCH v3 0/2] kstats: kernel metric collector In-Reply-To: <20200226135027.34538-1-lrizzo@google.com> References: <20200226135027.34538-1-lrizzo@google.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 26 Feb 2020 16:00:49 +0100 Message-ID: <87ftexz93y.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Luigi Rizzo writes: > This patchset introduces a small library to collect per-cpu samples and > accumulate distributions to be exported through debugfs. > > This v3 series addresses some initial comments (mostly style fixes in the > code) and revises commit logs. Could you please add a proper changelog spanning all versions of the patch as you iterate? As for the idea itself; picking up this argument you made on v1: > The tracepoint/kprobe/kretprobe solution is much more expensive -- > from my measurements, the hooks that invoke the various handlers take > ~250ns with hot cache, 1500+ns with cold cache, and tracing an empty > function this way reports 90ns with hot cache, 500ns with cold cache. I think it would be good if you could include an equivalent BPF-based implementation of your instrumentation example so people can (a) see the difference for themselves and get a better idea of how the approaches differ in a concrete case and (b) quantify the difference in performance between the two implementations. -Toke