Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4083638ybp; Mon, 7 Oct 2019 02:57:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+RYOU018jWCMK7jnhEsaJbsgb/LPnS1iRNAH+sIbzakcuEaCH/8z88Rdkz3qp+Tm/75j5 X-Received: by 2002:a50:d758:: with SMTP id i24mr27666600edj.246.1570442274968; Mon, 07 Oct 2019 02:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570442274; cv=none; d=google.com; s=arc-20160816; b=e17Cyo0eFZUMS7xgA2AWAmTCLayhK+fD9rhgjObaJgKR7gCzx6a2DHtygqob0h7+jH VRipAoERrBeD359k1WlnVUu7aBJJY4rD4s235V7bNzc/kkiKX/H6mO4v526nPnznJuCu HQSnA7NHmPVUalv4jj79XnNgXPLSZjF1gTLmejpgbdjCVqg/c9nBrbia5x75AFKsK+6V nZ9H9e1mEbKcaUaB+82571eNcWaxZJRVGJa+7YP5/mIJ9g1ANKMQrvfX+gS3j886ndwq 0qy22WCr0aAeJRC0/kyChGDuPA8c7/P8D27DkA3JTyMzBUK/Tf7dTCOkebTv/SoUPBYv zcEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2l4W0bW0R058ppA0WVJUUW28/CmVGl2bP09jvcPrg0g=; b=dEoaKUGp/FuKklJcrXvl9CcoRDBfS1GF/W/mHFA8oTgtst820jpYFmCHx1HOV8OC+l tI94FWKPvrDlhjgRUO7e2/jtU0ZrWcUN4v3fBWYRdKwLVVl3W1EydRIiqzpp3dD/dx7n tpDdT50J7VZ1O2Wdt3lL3PS0twz9aZR0gtTbnpOEHeJwut1QJggrBjvk4tFI4o4GRrRB N/enaiRyW4ezNHeIrCwsC+/S3GI93uqEZ1DZW7wRNzB5gbYROgPZX1eCStG4GGZ83xpr BZWt7TM9RLSj2/xJwV8/Oec567ZV3LLDWepgW4zaXT+pbze8WStYO0sX/ga+R0ozyLKV MNHQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si7520934edv.377.2019.10.07.02.57.31; Mon, 07 Oct 2019 02:57:54 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbfJGJ5C (ORCPT + 99 others); Mon, 7 Oct 2019 05:57:02 -0400 Received: from foss.arm.com ([217.140.110.172]:58848 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727376AbfJGJ5B (ORCPT ); Mon, 7 Oct 2019 05:57:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7713315BE; Mon, 7 Oct 2019 02:57:01 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 724B13F68E; Mon, 7 Oct 2019 02:57:00 -0700 (PDT) Date: Mon, 7 Oct 2019 10:56:58 +0100 From: Catalin Marinas To: Alexey Kardashevskiy Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Michal Hocko , Matthew Wilcox , Qian Cai Subject: Re: [PATCH v3 1/3] mm: kmemleak: Make the tool tolerant to struct scan_area allocation failures Message-ID: <20191007095658.GF45043@arrakis.emea.arm.com> References: <20190812160642.52134-1-catalin.marinas@arm.com> <20190812160642.52134-2-catalin.marinas@arm.com> <2ac37341-097e-17a2-fb6b-7912da9fa38e@ozlabs.ru> <20191003084135.GA21629@arrakis.emea.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 05, 2019 at 01:08:43PM +1000, Alexey Kardashevskiy wrote: > On 03/10/2019 18:41, Catalin Marinas wrote: > > On Thu, Oct 03, 2019 at 04:13:07PM +1000, Alexey Kardashevskiy wrote: > >> On 13/08/2019 02:06, Catalin Marinas wrote: > >>> Object scan areas are an optimisation aimed to decrease the false > >>> positives and slightly improve the scanning time of large objects known > >>> to only have a few specific pointers. If a struct scan_area fails to > >>> allocate, kmemleak can still function normally by scanning the full > >>> object. > >>> > >>> Introduce an OBJECT_FULL_SCAN flag and mark objects as such when > >>> scan_area allocation fails. > >> > >> I came across this one while bisecting sudden drop in throughput of a > >> 100Gbit Mellanox CX4 ethernet card in a PPC POWER9 system, the speed > >> dropped from 100Gbit to about 40Gbit. Bisect pointed at dba82d943177, > >> this are the relevant config options: > >> > >> [fstn1-p1 kernel]$ grep KMEMLEAK ~/pbuild/kernel-le-4g/.config > >> CONFIG_HAVE_DEBUG_KMEMLEAK=y > >> CONFIG_DEBUG_KMEMLEAK=y > >> CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=16000 > >> # CONFIG_DEBUG_KMEMLEAK_TEST is not set > >> # CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set > >> CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y > > > > The throughput drop is probably caused caused by kmemleak slowing down > > all memory allocations (including skb). So that's expected. You may get > > similar drop with other debug options like lock proving, kasan. > > I was not precise. I meant that before dba82d943177 kmemleak would > work but would not slow network down (at least 100Gbit) and now it > does which is downgrade so I was wondering if kmemleak just got so > much better to justify this change or there is a bug somewhere, so > which one is it? Or "LOG_SIZE=400" never really worked? I suspect LOG_SIZE=400 never worked on your system (you can check the log for any kmemleak disabled messages). Thanks for testing the patch. -- Catalin