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: 4279 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2096366wrs; Tue, 18 Oct 2022 11:16:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51IbBmOISRvfTwnoa5IIO+9qq7E6D9cQl8bOMsNxi9apjS6aJoO5h0mND2u+u3lSHabDYa X-Received: by 2002:a17:907:2710:b0:78d:9be4:492a with SMTP id w16-20020a170907271000b0078d9be4492amr3410426ejk.151.1666116969563; Tue, 18 Oct 2022 11:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666116969; cv=none; d=google.com; s=arc-20160816; b=DM1m35T9H/SBI5RCo2OedInaj7Bp8rB+R2FP2w4CVeK71t8MiA/A0duRlRbMtL0b57 9XnXT6lfW5BTI598k6I5UyIIawgd/cGWeOFFuElw+62WVfISDgC9D9OZgpF9Nc6tU+W0 q/yeyPUU7GiIobZo4H3fO6eYGUuwCalqv1QUkCBOK2JvR4GO1aoqqObEEuGJnciZPE4T iBNMll4s5fvpgCxhufGrxNKgSzt8/79l7U7wmSxvFeVP3NFfJk70UdNaIiKYTmlr07qx Nebumz+uXjwzNOG+IQWtWmxciMjInfa/Xz9bU4dwkeObGqppnxmMsN0u1kjMuT2xEDt5 mkgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9FJEHOoMkjVGRlOZfU33xcjvk8gVc0gJkKWOVMhT1hk=; b=N4ef6wvz8KPNnwmYDt0+YgaFCe7g3d4tjv9gC/uhWh5Cj9N6Yr4bise2CCIEH1Vcw1 EQM7h0345jpezHtF84jHKQx2w1J4ejXZaGq5ys1PEyOW5NOCLopZ7bBvF0NSGotx8KzO N//2BeIiHcIsRez1KOR1gi5zTZ7s4IBt9HQgSBnbPZ83Weu1INfUi/Jz+RS3TIGb/XGf BQ60L9MMO9sOy0X+hGOh9QK3AKI5QFW9YtJSW/4DdC0yAkaJyRoOS8ypW3T+PaRlZx3X 3LUC6jDPYvQ1YMGjjMVl5HWN63mlgFNCbMYvZESQOc3TfbejP0zTEkOlzFY1xxznetEV YnIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YKVioc1c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a50eb0b000000b0045b50cee511si11272525edp.122.2022.10.18.11.15.43; Tue, 18 Oct 2022 11:16:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YKVioc1c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229752AbiJRSLG (ORCPT + 99 others); Tue, 18 Oct 2022 14:11:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229896AbiJRSLA (ORCPT ); Tue, 18 Oct 2022 14:11:00 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E9BD72EC2 for ; Tue, 18 Oct 2022 11:11:00 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id d26so34271072ejc.8 for ; Tue, 18 Oct 2022 11:10:59 -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=uC7zHmAVYPvmBeny5eVdOUheOJMkkKW5VZxS4d2iMwcJUJei5y7t3rTDPzzt9xoybC U4D9AYTzWSKHybroiAwu7QiqUjzgvU4VMcVHoky8upr1p1DY+oR7hyHxHEl9NqyOAxmZ UwT0JIQeQjeLfDcM10VotsFE6LsnHAjmWKGHzeTGRe4lDnw0d2xMnos6bVT2oVt07Rlr N4zWKdAs82ZJOveoaq01G3wB3dhI5vVwxFDakbcidNm0W9Hr3LC7Zsk5dbaDYlJEowvA UUdyfA2zz+vdb6+vJw8r97sOwLAG0GYikBKYwCxwH3pl2COUS4romGeHL46cfFdn1fr6 524Q== X-Gm-Message-State: ACrzQf23PpkaeUsvDNZh0hYWwMJlyzlGBNmXf48U6cI7lnJfwB3CSKHU /9R9qJHx/w3eaItHFh2eI60= 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747050267739505516?= X-GMAIL-MSGID: =?utf-8?q?1747050267739505516?= 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 */