From patchwork Mon Oct 17 16:02:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 3583 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1529174wrs; Mon, 17 Oct 2022 09:09:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6t9viKTVRwT5fr5z7fadtYGKhgm6SDwrg/dz4FXcTvMz1gLpYaOgABh1hLas+4G5vL0I2/ X-Received: by 2002:a17:907:84a:b0:733:735:2b1a with SMTP id ww10-20020a170907084a00b0073307352b1amr9356155ejb.290.1666022959932; Mon, 17 Oct 2022 09:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666022959; cv=none; d=google.com; s=arc-20160816; b=n0DWKrLGkF2zhUK4/kiKmffjT/ERfYkCZSWGzuDsTZmH4FZp8/w0Gmo67KxFZiKmtS zxmJKJtwUnMX1w+HfC+oKOPswlxmCMkn3O8HZRvagPPevH5MpgkE6pGulXIRZAwBhx8y UuCitvCbPNHHzdF5fPhUfnZNE/sLm7TBgYVK0x3U+4LU85HA4ywazf/927mLR2TpivbO /aiiGmVetZhtcIoQxvUlOYfyCrkuPRVt+QyxeI9jnFIOVitk9Sacx6rm7DpBfiw/8Awj c2axojah4WJ915u916vetc/x9Z+gz856ogmpuBsaKRIrv8lKHPHDQSF6miVDyRk3sHWQ Sl+Q== 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=V8PGF12HowaED9GsfrGSUOr+T+BR5MJRz00gwWuwNBY=; b=H13qhGZQm0w8psyY5klfQCtPYxlI4Ve3PFKDd9wFrzAP5hJp7DpPEOxC0FmL2rIYTZ 5IHYwac76QCVXG69c/74hqiN7b6PDoyA4lA5s5ppI2QGSj22N7IlMMogMDLZFVxhDYB7 ZjHyDvQqCDhXl3F5RgWL7Vh1auV+OK0dFvI+RkV8alU9I6uxEb5/gN62cQ65QLYX4Kxd XPtU2cHgGT0GcMsrNnrkjiq0RFBsk11D9Wwsk7hs0Np2Mhy+TZ73cJfkM+KOZoiI/9qS RtwFpMxIDzwYWH4POHZmX36vY1CJhpW7dy8BOxZLsxOsVXL3a1H5uc5kV2YpFFzQzdH2 817g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PuSyLUli; 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 k19-20020a50ce53000000b0045941fa8e21si8582556edj.620.2022.10.17.09.08.50; Mon, 17 Oct 2022 09:09:19 -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=PuSyLUli; 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 S231230AbiJQQC7 (ORCPT + 99 others); Mon, 17 Oct 2022 12:02:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229896AbiJQQCp (ORCPT ); Mon, 17 Oct 2022 12:02:45 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 141A46B64B for ; Mon, 17 Oct 2022 09:02:43 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id g27so16706181edf.11 for ; Mon, 17 Oct 2022 09:02:43 -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=V8PGF12HowaED9GsfrGSUOr+T+BR5MJRz00gwWuwNBY=; b=PuSyLUliSWcCdVU4u7qHBbywoFiv8OcPvJLS/1g7R6MQWRqgwi9ab6h3UNMAdzJ3r2 LE2uVd4tU/Ubdl3myCXCO7PeGNs0vZnHReXivgvRK4Bze4KVRzOvfA4IOQeK3rrfgt5D BhZZPORrFgoF7oDSHAYM4kvWeAMUBuIE+njxY7T2eKBV5QjqdSWPU6xjQMAcWilw4HNE XUcV9qbf13+VHz9QpAEi8xk9Rd7hA1twg3bjLCnisbFN1Gk9+o5TNA3+jq20D4ikP/W0 5loQEp4hEFdhDBNpIjn7WEtAFSZD2gDZlrfK4iHK+ND1y29bST762akZlqLlK6Zjd8v2 gFZA== 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=V8PGF12HowaED9GsfrGSUOr+T+BR5MJRz00gwWuwNBY=; b=0ydvQxqmDP9pGzDFGNZKNZn1lvzMDesjorfG87BHQIyIge15Udz7YPSDWQwX7MFk7n devx7wIscoDD93gVFFb703ugbr4Vpacgdx9xDIYx+pjciykbsTxEgfw/QWsIXbtwhYSw p5p6s4xhBbzYoL3yF0AWhdbdX7FmyFzr7AvC9gB4IYZbPHDcIzfFsYAhdRS794LYy63j 3gewocabqzmRLWBupUDeUNUHewvbZ6jNx1KF5yjVxoILr4FXruGIOGEd5vTXPdasGDtu iN5LpetieM5TuhdgTLns2vnuupCgY/BvTlZNwL7/N2DGvWeb7TsAZt0T8FQe2FuSLNj+ FDow== X-Gm-Message-State: ACrzQf1bAvbmpcOIwe93px4E9NmVJ9A/QBFAYm7XY6DOWfRINdbFmNo5 WVupWbExZKQSSILxvPD38A4= X-Received: by 2002:a05:6402:35d6:b0:45d:a52f:2d30 with SMTP id z22-20020a05640235d600b0045da52f2d30mr3601725edc.4.1666022562308; Mon, 17 Oct 2022 09:02:42 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id g16-20020a170906539000b0073d5948855asm6389629ejo.1.2022.10.17.09.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:02:41 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH 3/7] mm: vmap: Add free_vmap_area_noflush trace event Date: Mon, 17 Oct 2022 18:02:29 +0200 Message-Id: <20221017160233.16582-6-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221017160233.16582-1-urezki@gmail.com> References: <20221017160233.16582-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?1746951690976407251?= X-GMAIL-MSGID: =?utf-8?q?1746951690976407251?= This event is used in order to validate/debug a start address of freed VA, number of currently outstanding and maximum allowed areas. To: Steven Rostedt Signed-off-by: Uladzislau Rezki (Sony) --- include/trace/events/vmap.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/trace/events/vmap.h b/include/trace/events/vmap.h index 2af2b84c6eb7..5ba9bf58772a 100644 --- a/include/trace/events/vmap.h +++ b/include/trace/events/vmap.h @@ -83,6 +83,40 @@ TRACE_EVENT(purge_vmap_area_lazy, __entry->start, __entry->end, __entry->npurged) ); +/** + * free_vmap_area_noflush - called when a vmap area is freed + * @va_start: a start address of VA + * @nr_lazy: number of current lazy pages + * @nr_lazy_max: number of maximum lazy pages + * + * This event is used for a debug purpose. It gives some + * indication about a VA that is released, number of current + * outstanding areas and a maximum allowed threshold before + * dropping all of them. + */ +TRACE_EVENT(free_vmap_area_noflush, + + TP_PROTO(unsigned long va_start, unsigned long nr_lazy, + unsigned long nr_lazy_max), + + TP_ARGS(va_start, nr_lazy, nr_lazy_max), + + TP_STRUCT__entry( + __field(unsigned long, va_start) + __field(unsigned long, nr_lazy) + __field(unsigned long, nr_lazy_max) + ), + + TP_fast_assign( + __entry->va_start = va_start; + __entry->nr_lazy = nr_lazy; + __entry->nr_lazy_max = nr_lazy_max; + ), + + TP_printk("va_start=0x%lx nr_lazy=%lu nr_lazy_max=%lu", + __entry->va_start, __entry->nr_lazy, __entry->nr_lazy_max) +); + #endif /* _TRACE_VMAP_H */ /* This part must be outside protection */