From patchwork Tue Oct 18 18:10:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13010875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C3B3C43219 for ; Tue, 18 Oct 2022 18:11:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F192A6B0078; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EC77B6B007B; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D8FE56B007D; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C6DC76B007B for ; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 850D9AB7F6 for ; Tue, 18 Oct 2022 18:10:59 +0000 (UTC) X-FDA: 80034861438.12.2CAB76B Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by imf19.hostedemail.com (Postfix) with ESMTP id 273051A002F for ; Tue, 18 Oct 2022 18:10:58 +0000 (UTC) Received: by mail-ej1-f50.google.com with SMTP id y14so34240107ejd.9 for ; Tue, 18 Oct 2022 11:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9FJEHOoMkjVGRlOZfU33xcjvk8gVc0gJkKWOVMhT1hk=; b=YKVioc1cJrhW8j2q33izuLomY4JfzAqH6+8bDDXIqMvE4+VgTl1+DWt9X0JvJa96dS bjWwF2UlwQLI14UU085xpm9npwWQbW4iK3Sw30+tefJYDNaUP06vzKyETch6tOA7s2Yd F/KUA26JImniA6eEzt0bjQJpH9fNxjeIpw0qyvleGFF+p+lWtXc6UbwyirQn8qCbwUMe kirJf4P99BF4BV0Sr1O9g+L44sDFNkW71NnO7pDKFvrceM7QzalCKzDHyiuiz6U9WYML HoagkIuOoJwwxsMTZouT8vD0rRQNwMlVMjzNwyx2Wv3v6p+RV9btb5h605iO1R6WG655 p70A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9FJEHOoMkjVGRlOZfU33xcjvk8gVc0gJkKWOVMhT1hk=; b=yvo6K6HuX8x3fuecKSmFCOBe1wlaoucXf3Ql72bFDxy9jSPGF0+U4T7cpc+yjWxr3/ 61D4AkSe6NZqjM/rh0O0cLvuS4mL/CG+61PYuT5jPzGI0hzNpJBKSOxDtmQHO5tOZLH2 ov04Pzt0v8I5M+pnXO/rBThAcxTFpEifSf6eBK42RyRndVy3np+3kRw0llvz9ifm5pFS 3YEZksZZj/LI/RsIpUdJxUwL1dYrv0ajagnyFZSnJWY4qXENnjUFaeDyCqd4So8PEMZ9 ZhWZQPTkPTIcLUJ+HmP8gap3I2r/4Hvm7TaWecs7CTArD+iZyXLQIZGgtb85U9pMya6D GRXA== X-Gm-Message-State: ACrzQf27ghTF77O2TwJ3rp30o46w46xLn8nQVgYchonFNTcP/lEgvdMt heiQBj2CQzabhGHWa0T47wY= X-Google-Smtp-Source: AMsMyM507Q8XFIA9G1zyTC/2DkCVGHsJGqQ6bAsF53Q9yeXxoWcJRJz+Sb3DI7QS6UGEGgXc4qL7vw== X-Received: by 2002:a17:907:97c2:b0:78d:accc:c0a9 with SMTP id js2-20020a17090797c200b0078dacccc0a9mr3400841ejc.312.1666116658572; Tue, 18 Oct 2022 11:10:58 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b007877ad05b32sm7739302ejf.208.2022.10.18.11.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:10:58 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Steven Rostedt , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH v2 2/7] mm: vmalloc: Add purge_vmap_area_lazy trace event Date: Tue, 18 Oct 2022 20:10:48 +0200 Message-Id: <20221018181053.434508-3-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018181053.434508-1-urezki@gmail.com> References: <20221018181053.434508-1-urezki@gmail.com> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666116659; a=rsa-sha256; cv=none; b=Rr6H6WOlVYIS0tTqkkDN0tUI6h85/2c/BOE6l3piDF9WnegJ5l49rGmaNybI/JLAunDHeH 1TACp+N0WWu70UfZ3+NPvxwTWaB+culcnLlMTv3MpMEde21mPifU+gKcXdT3sitILLZLpO qQfIolk6f/9QNBIZLdF4r4a7ovH6jds= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YKVioc1c; spf=pass (imf19.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.50 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666116659; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9FJEHOoMkjVGRlOZfU33xcjvk8gVc0gJkKWOVMhT1hk=; b=Ld5bht3CLltQNaMDrrqoxWPHMzmVhTEGMXVheBnFopiUMaeaIjFKYPwLwg6xpxQSo1Mza9 3tiJeAIgJ2GH0t0vlOvceTfGCG8puTFM3eWNGuGUt+w9J+GwH4wlMKnvZH8kIGR3SR+25L tg7Co0NFFp2EQ4MWyH/AKeMlpJBAe/k= X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YKVioc1c; spf=pass (imf19.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.50 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: x9fd6p5z9nchjhk5iw854y3nhngnto7x X-Rspamd-Queue-Id: 273051A002F X-Rspamd-Server: rspam10 X-HE-Tag: 1666116658-882229 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: It is for debug purpose to track number of freed vmap areas including a range it occurs on. Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Christoph Hellwig --- include/trace/events/vmalloc.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/trace/events/vmalloc.h b/include/trace/events/vmalloc.h index 39fbd77c91e7..afeb8003a0f2 100644 --- a/include/trace/events/vmalloc.h +++ b/include/trace/events/vmalloc.h @@ -50,6 +50,39 @@ TRACE_EVENT(alloc_vmap_area, __entry->vstart, __entry->vend, __entry->failed) ); +/** + * purge_vmap_area_lazy - called when vmap areas were lazily freed + * @start: purging start address + * @end: purging end address + * @npurged: numbed of purged vmap areas + * + * This event is used for a debug purpose. It gives some + * indication about start:end range and how many objects + * are released. + */ +TRACE_EVENT(purge_vmap_area_lazy, + + TP_PROTO(unsigned long start, unsigned long end, + unsigned int npurged), + + TP_ARGS(start, end, npurged), + + TP_STRUCT__entry( + __field(unsigned long, start) + __field(unsigned long, end) + __field(unsigned int, npurged) + ), + + TP_fast_assign( + __entry->start = start; + __entry->end = end; + __entry->npurged = npurged; + ), + + TP_printk("start=0x%lx end=0x%lx num_purged=%u", + __entry->start, __entry->end, __entry->npurged) +); + #endif /* _TRACE_VMALLOC_H */ /* This part must be outside protection */