Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp231756rwb; Fri, 2 Sep 2022 13:09:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR5eb5iCDCsTV6A2g8DoXuFsL3U4+saN2/fp+6O2OqnWvWon93smNZELmCgvxTjG4RnV0wmT X-Received: by 2002:a17:90b:33c5:b0:1fe:9dc:2b1b with SMTP id lk5-20020a17090b33c500b001fe09dc2b1bmr6646356pjb.211.1662149365498; Fri, 02 Sep 2022 13:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662149365; cv=none; d=google.com; s=arc-20160816; b=pANPJgTaTJ4YUWTZO1ibJfYh+UTlS4Bl+wuenjySmCrcw2LO3AzUKY/vbYDwf75L+x HodT2b00GMP4cM/veIiBCW/POMCWLaO5Ls22O8kZUmjvH+RKKugdVEe/uLOVBMT9ynIg NkFzq9KlBBKqtkFqLv9rCSwHtU/q54kjJ1TGxoA8457evWBeLOZKwTVhUSsfGw51wkcW QgltRpbdCXaa/Y5s1q2/sDr2D3uNwa5xyPjJYP6yY5VyJGD4+rTrzFQ+ebNRTzu55wy8 OsAVrm6CHznHi0Z8LJKwi4NDa+qHOAz6DQisO0TtGV3iUkvXqQR/5vK78wX9HsDIyYEc YkeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=n3Vt2n+PBD0eNIsvGTR1l3JrOeVtWEjP88FVSBBEvEY=; b=eaRQFnXu8o/i14ZW9DxENrouB2saR06L2pA/U6G9fAgv+fTaG7WxgtuHLlqQIn9q/m r9q5GRtXjK3AXRjwIoanw/RzSp6cG1F876QrQ6qiNE5/uG8+/2FnwsOjy5pIsZcmtmXE 8XuPogAqP7Twq4tfcFP1QgAQRd6bT+OtxRlgOBm8x4F5UqPcq985unpDxRFfpexAdybX A11XiJMnrEogds/SMOwSH0kFxPGRV4MDWWxmI+ZGkrJyqTOScFa0M5DHDlqQZbDlXWT0 buWl74bNKL+NdCOCJaW3n8ckiiR0mwFrvcGWySn22wGBwyE3YHVE3E1GJIZckSSAJbD5 qbZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=mPyxzHSC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk7-20020a17090b224700b001fddccc9214si9422626pjb.171.2022.09.02.13.09.13; Fri, 02 Sep 2022 13:09:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=mPyxzHSC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbiIBTsy (ORCPT + 99 others); Fri, 2 Sep 2022 15:48:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiIBTsv (ORCPT ); Fri, 2 Sep 2022 15:48:51 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F3F120BEB; Fri, 2 Sep 2022 12:48:50 -0700 (PDT) Date: Fri, 2 Sep 2022 15:48:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662148127; 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=n3Vt2n+PBD0eNIsvGTR1l3JrOeVtWEjP88FVSBBEvEY=; b=mPyxzHSCWJDs7FY0KQSQlCnTELLgR0D5y3QUtw1jP0xws7G95PlcumsBf40lKyXM7CpTgQ EQ03B0NpMd3GmyUjL7/LRRu2b7P7CYcc/5drjtaORm2I0b47gBiN9Kk3SiUGyi3Al05Eo0 A5b6cgfMPf2NEURa1fE7EOtxMOAAjIs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Jens Axboe Cc: Roman Gushchin , Yosry Ahmed , Michal Hocko , Mel Gorman , Peter Zijlstra , Suren Baghdasaryan , Andrew Morton , Vlastimil Babka , Johannes Weiner , dave@stgolabs.net, Matthew Wilcox , liam.howlett@oracle.com, void@manifault.com, juri.lelli@redhat.com, ldufour@linux.ibm.com, Peter Xu , David Hildenbrand , mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, changbin.du@intel.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, Steven Rostedt , bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, Christoph Lameter , Pekka Enberg , Joonsoo Kim , 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, Shakeel Butt , Muchun Song , arnd@arndb.de, jbaron@akamai.com, David Rientjes , minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, Linux-MM , iommu@lists.linux.dev, kasan-dev@googlegroups.com, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-modules@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [RFC PATCH 00/30] Code tagging framework and applications Message-ID: <20220902194839.xqzgsoowous72jkz@moria.home.lan> References: <20220831101948.f3etturccmp5ovkl@suse.de> <20220831190154.qdlsxfamans3ya5j@moria.home.lan> <20220901223720.e4gudprscjtwltif@moria.home.lan> <20220902001747.qqsv2lzkuycffuqe@moria.home.lan> <3a41b9fc-05f1-3f56-ecd0-70b9a2912a31@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a41b9fc-05f1-3f56-ecd0-70b9a2912a31@kernel.dk> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 02, 2022 at 06:02:12AM -0600, Jens Axboe wrote: > On 9/1/22 7:04 PM, Roman Gushchin wrote: > > On Thu, Sep 01, 2022 at 08:17:47PM -0400, Kent Overstreet wrote: > >> On Thu, Sep 01, 2022 at 03:53:57PM -0700, Roman Gushchin wrote: > >>> I'd suggest to run something like iperf on a fast hardware. And maybe some > >>> io_uring stuff too. These are two places which were historically most sensitive > >>> to the (kernel) memory accounting speed. > >> > >> I'm getting wildly inconsistent results with iperf. > >> > >> io_uring-echo-server and rust_echo_bench gets me: > >> Benchmarking: 127.0.0.1:12345 > >> 50 clients, running 512 bytes, 60 sec. > >> > >> Without alloc tagging: 120547 request/sec > >> With: 116748 request/sec > >> > >> https://github.com/frevib/io_uring-echo-server > >> https://github.com/haraldh/rust_echo_bench > >> > >> How's that look to you? Close enough? :) > > > > Yes, this looks good (a bit too good). > > > > I'm not that familiar with io_uring, Jens and Pavel should have a better idea > > what and how to run (I know they've workarounded the kernel memory accounting > > because of the performance in the past, this is why I suspect it might be an > > issue here as well). > > io_uring isn't alloc+free intensive on a per request basis anymore, it > would not be a good benchmark if the goal is to check for regressions in > that area. Good to know. The benchmark is still a TCP benchmark though, so still useful. Matthew suggested while true; do echo 1 >/tmp/foo; rm /tmp/foo; done I ran that on tmpfs, and the numbers with and without alloc tagging were statistically equal - there was a fair amount of variation, it wasn't a super controlled test, anywhere from 38-41 seconds with 100000 iterations (and alloc tagging was some of the faster runs). But with memcg off, it ran in 32-33 seconds. We're piggybacking on the same mechanism memcg uses for stashing per-object pointers, so it looks like that's the bigger cost.