From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6092EC432C3 for ; Tue, 3 Dec 2019 16:08:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CADB20803 for ; Tue, 3 Dec 2019 16:08:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CADB20803 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B81B16B05C3; Tue, 3 Dec 2019 11:08:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B31AC6B05C4; Tue, 3 Dec 2019 11:08:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A466D6B05C5; Tue, 3 Dec 2019 11:08:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0091.hostedemail.com [216.40.44.91]) by kanga.kvack.org (Postfix) with ESMTP id 8E6D26B05C3 for ; Tue, 3 Dec 2019 11:08:13 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 4BAAF5DCB for ; Tue, 3 Dec 2019 16:08:13 +0000 (UTC) X-FDA: 76224312066.26.park48_2a7c1dc39164d X-HE-Tag: park48_2a7c1dc39164d X-Filterd-Recvd-Size: 3847 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Dec 2019 16:08:11 +0000 (UTC) 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 A2D1131B; Tue, 3 Dec 2019 08:08:10 -0800 (PST) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.197.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8C3C23F52E; Tue, 3 Dec 2019 08:08:08 -0800 (PST) Date: Tue, 3 Dec 2019 16:08:06 +0000 From: Catalin Marinas To: Noam Stolero Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , Michal Hocko , Matthew Wilcox , Qian Cai , Tal Gilboa , Tariq Toukan , Saeed Mahameed , Amir Ancel , Matan Nir , Bar Tuaf , "brouer@redhat.com" , "edumazet@google.com" , "netdev@vger.kernel.org" Subject: Re: [PATCH v3 0/3] mm: kmemleak: Use a memory pool for kmemleak object allocations Message-ID: <20191203160806.GB23522@arrakis.emea.arm.com> References: <20190812160642.52134-1-catalin.marinas@arm.com> <08847a90-c37b-890f-8d0e-3ae1c3a1dd71@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <08847a90-c37b-890f-8d0e-3ae1c3a1dd71@mellanox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Dec 03, 2019 at 03:51:50PM +0000, Noam Stolero wrote: > On 8/12/2019 7:06 PM, Catalin Marinas wrote: > > Following the discussions on v2 of this patch(set) [1], this series > > takes slightly different approach: > > > > - it implements its own simple memory pool that does not rely on the > > slab allocator > > > > - drops the early log buffer logic entirely since it can now allocate > > metadata from the memory pool directly before kmemleak is fully > > initialised > > > > - CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE option is renamed to > > CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE > > > > - moves the kmemleak_init() call earlier (mm_init()) > > > > - to avoid a separate memory pool for struct scan_area, it makes the > > tool robust when such allocations fail as scan areas are rather an > > optimisation > > > > [1] http://lkml.kernel.org/r/20190727132334.9184-1-catalin.marinas@arm.com > > > > Catalin Marinas (3): > > mm: kmemleak: Make the tool tolerant to struct scan_area allocation > > failures > > mm: kmemleak: Simple memory allocation pool for kmemleak objects > > mm: kmemleak: Use the memory pool for early allocations > > > > init/main.c | 2 +- > > lib/Kconfig.debug | 11 +- > > mm/kmemleak.c | 325 ++++++++++++---------------------------------- > > 3 files changed, 91 insertions(+), 247 deletions(-) > > We observe severe degradation in our network performance affecting all > of our NICs. The degradation is directly linked to this patch. > > What we run: > Simple Iperf TCP loopback with 8 streams on ConnectX5-100GbE. > Since it's a loopback test, traffic goes from the socket through the IP > stack and back to the socket, without going through the NIC driver. Something similar was reported before. Can you try commit 2abd839aa7e6 ("kmemleak: Do not corrupt the object_list during clean-up") and see if it fixes the problem for you? It was merged in 5.4-rc4. -- Catalin