Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1774618ybn; Wed, 2 Oct 2019 23:30:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAYqbY1gyBtk72D8w8d3mE7FWrZa8GWRCJxpiPMnb7nUx2HMtE1/sPgLZl5gQwSk5ZT3+V X-Received: by 2002:aa7:c343:: with SMTP id j3mr7858043edr.187.1570084218389; Wed, 02 Oct 2019 23:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570084218; cv=none; d=google.com; s=arc-20160816; b=Q66f1pkgB4EjzRNW9bfJ3ePkV9UXWVLjhuvK1HCDNzMpsVulpgs2CYg/UVT74bjsjK 0f2uX1K03F6RZxwTTKZ6Yx4o+BZUNZbZDOkCGQu3bvalOWauYfOM5Zl+7yyDMF2NmDJF OF5M13JNl6apdwJQvVGnPbiSaUk5Mb1MMw7R7usmJh8oK/QoRbHgZGGKVuaHSeGIVABR cu2M16IWOhKlt5EyYcWwPc76u+MXnZmQFnowXvi2R+UJa6A3Qd5VWrGzhVFXffFXpKhe 1LST63Jvuu/TMPtoIgDc/MrqV0p6ymJk1DYfuGYci3y/Gi9Ft3pHkZeSbmZ6XW3oQl5l umXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=9fRETY9RhiSOxgTnFBCjm3tx4YRlm+tuITEEPXz0fHs=; b=Qg83I4HFadJbQxsTHOMHSK+ZuFRRZ22aseY7gQ5a9QYnE29zS9lHSQzXEmiujQE6wo fbXB8/wy9d+9gFs0GKeVb//oHdeCuV2Nzv/EH/yQsZ2dE4S2kZEdnCYUpOuEKlPfjAhp TFmtbnbyBlVsiZshRKK2JGbdTeebnZGEs3DurjE6eWo3oGxdf/vZlHH4owrpKvQ6p7Ui XwM8YG6BUsZ7u+pKs3ggo/u5msdcuVT12s3tkx+0Z7BS3C9McRLXj+0UQvNbl09z3BB8 HmjJccW4tG7g2ffoFNsr6OpNoyMbDXsJnZOKefI25rrPDEGB8txqjZLq0TyAXLCMRAtj rtzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ozlabs-ru.20150623.gappssmtp.com header.s=20150623 header.b=hofJGP1d; 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 z35si891348edb.146.2019.10.02.23.29.51; Wed, 02 Oct 2019 23:30:18 -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; dkim=pass header.i=@ozlabs-ru.20150623.gappssmtp.com header.s=20150623 header.b=hofJGP1d; 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 S1728167AbfJCGNQ (ORCPT + 99 others); Thu, 3 Oct 2019 02:13:16 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42165 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbfJCGNP (ORCPT ); Thu, 3 Oct 2019 02:13:15 -0400 Received: by mail-pg1-f193.google.com with SMTP id z12so1059588pgp.9 for ; Wed, 02 Oct 2019 23:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ozlabs-ru.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9fRETY9RhiSOxgTnFBCjm3tx4YRlm+tuITEEPXz0fHs=; b=hofJGP1dDwI/zMraZPgIDB7r+urEJr38V9lTkIlvnQ4Qwc379JIATzV445w46l5Klr v4Idt4E3INifQhykaiI9ED8gy6lyhKGoWl9d7ZXBFT2Og3bn7jOXWTtgl7OowyR3VkNm OKqgH/0hDWA2XK9qdexD8/0M7CUam4MiVCtLbQ9ebjf26H6IPhvPjO/v8r8VakwvdBB2 I6lmirdfDNzUpR8zrbHa82HbGeyduCnx0sIuMc2L5yQFymT8yq9cV3Fmb3tR5RBVl5lA hLNLXfl2p3Ce/pLp2VZbf6Sr/8u+F0BlfqGzFW1/g16vic2hpGFfkMCY2U8HT+Qh/Hxh +WtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=9fRETY9RhiSOxgTnFBCjm3tx4YRlm+tuITEEPXz0fHs=; b=g+fZSu8ohApGZw3rhH+maS6rc2I+BcJ4SNrh9Ei5zxc90zUEIx4rHX3WCVOKmCPY35 JskdgrGF6yF6mZInZLXGI1dLolukH9Y8ZvPawEFFhEiwxALRSZ19Ppc9i7DBxtD/tw4U skGQ4VbtQUzZsPOZq7YqBt9ZeWG2MV7jIf+76C2STlmT952GkZfEB/Zy1bu9q4L8OiLq f4EN+tTyh7+1rdrWO7Bm+1vpTDny8P8ge6YxUEJWrujrVIdTnddwAl2xne/driH2rE2r pPcr6WbkKufx3dFuA8jcMtmRP8RshApz4rJkgbZ/RW04pa1qXFaG5/SpB/QL68B2hV4Q 2EqA== X-Gm-Message-State: APjAAAVDFjd8FK2QWfrpDsXggxmVKranuzVicd/xIUlVy6GxEG9Xogpc 4GZCZyUbHWTbfUUgzUiUuJkrUw== X-Received: by 2002:a17:90a:8b8c:: with SMTP id z12mr8926915pjn.100.1570083193215; Wed, 02 Oct 2019 23:13:13 -0700 (PDT) Received: from [10.61.2.175] ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id 19sm1004217pjd.23.2019.10.02.23.13.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Oct 2019 23:13:12 -0700 (PDT) Subject: Re: [PATCH v3 1/3] mm: kmemleak: Make the tool tolerant to struct scan_area allocation failures To: Catalin Marinas , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Andrew Morton , Michal Hocko , Matthew Wilcox , Qian Cai References: <20190812160642.52134-1-catalin.marinas@arm.com> <20190812160642.52134-2-catalin.marinas@arm.com> From: Alexey Kardashevskiy Autocrypt: addr=aik@ozlabs.ru; keydata= mQINBE+rT0sBEADFEI2UtPRsLLvnRf+tI9nA8T91+jDK3NLkqV+2DKHkTGPP5qzDZpRSH6mD EePO1JqpVuIow/wGud9xaPA5uvuVgRS1q7RU8otD+7VLDFzPRiRE4Jfr2CW89Ox6BF+q5ZPV /pS4v4G9eOrw1v09lEKHB9WtiBVhhxKK1LnUjPEH3ifkOkgW7jFfoYgTdtB3XaXVgYnNPDFo PTBYsJy+wr89XfyHr2Ev7BB3Xaf7qICXdBF8MEVY8t/UFsesg4wFWOuzCfqxFmKEaPDZlTuR tfLAeVpslNfWCi5ybPlowLx6KJqOsI9R2a9o4qRXWGP7IwiMRAC3iiPyk9cknt8ee6EUIxI6 t847eFaVKI/6WcxhszI0R6Cj+N4y+1rHfkGWYWupCiHwj9DjILW9iEAncVgQmkNPpUsZECLT WQzMuVSxjuXW4nJ6f4OFHqL2dU//qR+BM/eJ0TT3OnfLcPqfucGxubhT7n/CXUxEy+mvWwnm s9p4uqVpTfEuzQ0/bE6t7dZdPBua7eYox1AQnk8JQDwC3Rn9kZq2O7u5KuJP5MfludMmQevm pHYEMF4vZuIpWcOrrSctJfIIEyhDoDmR34bCXAZfNJ4p4H6TPqPh671uMQV82CfTxTrMhGFq 8WYU2AH86FrVQfWoH09z1WqhlOm/KZhAV5FndwVjQJs1MRXD8QARAQABtCRBbGV4ZXkgS2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s5qg0/3ihh6XuOGggZQOqrYPC3PnsNs3NxirwOkVPQgO6mXxpuifvJ DG9EMkK8IBXnLulqVk54kf7fE0jT/d8RTtJIA92GzsgdK2rpT1MBKKVffjRFGwN7nQVOzi4T XrB5p+6ML7Bd84xOEGsj/vdaXmz1esuH7BOZAGEZfLRCHJ0GVCSssg== Message-ID: <2ac37341-097e-17a2-fb6b-7912da9fa38e@ozlabs.ru> Date: Thu, 3 Oct 2019 16:13:07 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20190812160642.52134-2-catalin.marinas@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Setting CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=400 or even 4000 (this is what KMEMLEAK_EARLY_LOG_SIZE is now in the master) produces soft lockups on the recent upstream (sha1 a3c0e7b1fe1f): [c000001fde64fb60] [c000000000c24ed4] _raw_write_unlock_irqrestore+0x54/0x70 [c000001fde64fb90] [c0000000004117e4] find_and_remove_object+0xa4/0xd0 [c000001fde64fbe0] [c000000000411c74] delete_object_full+0x24/0x50 [c000001fde64fc00] [c000000000411d28] __kmemleak_do_cleanup+0x88/0xd0 [c000001fde64fc40] [c00000000012a1a4] process_one_work+0x374/0x6a0 [c000001fde64fd20] [c00000000012a548] worker_thread+0x78/0x5a0 [c000001fde64fdb0] [c000000000135508] kthread+0x198/0x1a0 [c000001fde64fe20] [c00000000000b980] ret_from_kernel_thread+0x5c/0x7c KMEMLEAK_EARLY_LOG_SIZE=8000 works but slow. Interestingly KMEMLEAK_EARLY_LOG_SIZE=400 on dba82d943177 still worked and I saw my 100Gbit. Disabling KMEMLEAK also fixes the speed (apparently). Is that something expected? Thanks, > > Signed-off-by: Catalin Marinas > --- > mm/kmemleak.c | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/mm/kmemleak.c b/mm/kmemleak.c > index f6e602918dac..5ba7fad00fda 100644 > --- a/mm/kmemleak.c > +++ b/mm/kmemleak.c > @@ -168,6 +168,8 @@ struct kmemleak_object { > #define OBJECT_REPORTED (1 << 1) > /* flag set to not scan the object */ > #define OBJECT_NO_SCAN (1 << 2) > +/* flag set to fully scan the object when scan_area allocation failed */ > +#define OBJECT_FULL_SCAN (1 << 3) > > #define HEX_PREFIX " " > /* number of bytes to print per line; must be 16 or 32 */ > @@ -773,12 +775,14 @@ static void add_scan_area(unsigned long ptr, size_t size, gfp_t gfp) > } > > area = kmem_cache_alloc(scan_area_cache, gfp_kmemleak_mask(gfp)); > - if (!area) { > - pr_warn("Cannot allocate a scan area\n"); > - goto out; > - } > > spin_lock_irqsave(&object->lock, flags); > + if (!area) { > + pr_warn_once("Cannot allocate a scan area, scanning the full object\n"); > + /* mark the object for full scan to avoid false positives */ > + object->flags |= OBJECT_FULL_SCAN; > + goto out_unlock; > + } > if (size == SIZE_MAX) { > size = object->pointer + object->size - ptr; > } else if (ptr + size > object->pointer + object->size) { > @@ -795,7 +799,6 @@ static void add_scan_area(unsigned long ptr, size_t size, gfp_t gfp) > hlist_add_head(&area->node, &object->area_list); > out_unlock: > spin_unlock_irqrestore(&object->lock, flags); > -out: > put_object(object); > } > > @@ -1408,7 +1411,8 @@ static void scan_object(struct kmemleak_object *object) > if (!(object->flags & OBJECT_ALLOCATED)) > /* already freed object */ > goto out; > - if (hlist_empty(&object->area_list)) { > + if (hlist_empty(&object->area_list) || > + object->flags & OBJECT_FULL_SCAN) { > void *start = (void *)object->pointer; > void *end = (void *)(object->pointer + object->size); > void *next; > -- Alexey