Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2819528rdb; Wed, 4 Oct 2023 12:23:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGi7WpEXgZA7zIguERVaC6pyuPUd3muXqhPwbTPqx2WoRzlKtb87RQa1NNO/iWWVdL99K6 X-Received: by 2002:a05:6358:2904:b0:141:bfc:b11d with SMTP id y4-20020a056358290400b001410bfcb11dmr3647002rwb.16.1696447404769; Wed, 04 Oct 2023 12:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696447404; cv=none; d=google.com; s=arc-20160816; b=VqcdYryzQhEsiIxMsO+yVXihxgXKPTfAJvwMsnd1FAQ5ohXnIlWIUWWq0iVD/dNodP rsWS9hVyegVJq0VN//PjcsK1jVIwqLghnTlJfgeCiw5AbEJnKyZJt7zcUkznC/aUf+6A a+4uYJAK8E1lGLd60TxLWr2qMFdOMKeIHlH7oZuxTZ5lCiTzhYKiizGvShzm/Tl91OZo Pfzuof9w62exgit7e/Hqxd6IBW4h9x6pUP6ejJTAxSLvJzVvSNzV7RZ3A+LaNQnu4/uz 9vv8FvTohAvw9u1X0/5nWUg+xvlnGGvnlnaK5VTzH/uVgY999qh1e1H4Jgocg7Kd1Gc6 TVxA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=jkCd19CwQrPmu8oeXBKgORvhKgKP0KURMRX76XbJ8X4=; fh=qmJj2tduG0hp1cMHTsR+YJYYyQ/ioJRTqhHd+94ui2U=; b=kWgbmLFgLeghFOnUs6OTPqjSRtw+9ph1zx8sByYOOEOnYSu+77H/dvVRZOcleujqU3 yOghEVnYFDzaWFbf/A9uZchu6lE4LdYno6QIiNkJVOtY+0dkipkzKd/LH6Uop2w2uULC HAMZ8mgJarePsi3m/ftpDwesjcURqphwx2LWs/UtOAZGUKjw4KTNCGnAjrPKIwfCdzxw 2DMUPCZTS30chHJJ304nluiOAmcz6KiZqKtcJZTD6KOMeIDd4WKojdrvkAtGK+LxXWhS YVNOsud+mnEsAL3UbJjh1qRLS0hWs+bvopPqK6CjVtTcCwowa+Ibu1QCPPvO8pnXJUDX 2PfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GPvMdCBd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y7-20020a636407000000b005893a7c43a4si3846883pgb.320.2023.10.04.12.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 12:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GPvMdCBd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D21D28184E3F; Wed, 4 Oct 2023 12:23:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244759AbjJDTHg (ORCPT + 99 others); Wed, 4 Oct 2023 15:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343819AbjJDTHU (ORCPT ); Wed, 4 Oct 2023 15:07:20 -0400 Received: from out-209.mta1.migadu.com (out-209.mta1.migadu.com [IPv6:2001:41d0:203:375::d1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9F1030E7 for ; Wed, 4 Oct 2023 12:02:45 -0700 (PDT) Date: Wed, 4 Oct 2023 12:02:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1696446162; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jkCd19CwQrPmu8oeXBKgORvhKgKP0KURMRX76XbJ8X4=; b=GPvMdCBdjfSQr376dX+S6ZkziYW6v58FjLd6pXRyRfIAjZwWPfOYUCigqgOEVLXM4Iq1CR /E4fW+l2mj2UbQ0fEPjsPSl7MjKRgF4s5GrszkP2p0Pzb8/v8PFxTRuCLTw5MQVIJXbbtH d/pR3EHSoW9yJY/LV7jLBB3swXFa09I= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Dennis Zhou , Andrew Morton , David Rientjes , Vlastimil Babka Subject: Re: [PATCH v1 0/5] mm: improve performance of accounted kernel memory allocations Message-ID: References: <20230929180056.1122002-1-roman.gushchin@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 12:23:24 -0700 (PDT) On Wed, Oct 04, 2023 at 08:32:39PM +0200, Michal Koutn? wrote: > On Fri, Sep 29, 2023 at 11:00:50AM -0700, Roman Gushchin wrote: > > This patchset improves the performance of accounted kernel memory allocations > > by ~30% as measured by a micro-benchmark [1]. The benchmark is very > > straightforward: 1M of 64 bytes-large kmalloc() allocations. > > Nice. Thanks! > Have you tried how these +34% compose with -34% reported way back [1] > when file lock accounting was added (because your benchmark and lock1 > sound quite similar)? No, I haven't. I'm kindly waiting for an automatic report here :) But if someone can run these tests manually, I'll appreciate it a lot. > (BTW Is that your motivation (too)?) Not really, it was on my todo list for a long time and I just got some spare cycles to figure out missing parts (mostly around targeted/remote charging). Also plan to try similar approach to speed up generic memcg charging. Thanks!