From patchwork Mon Oct 17 16:02:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13009010 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 A5662C433FE for ; Mon, 17 Oct 2022 16:02:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D3BA8E0003; Mon, 17 Oct 2022 12:02:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 580EB8E0001; Mon, 17 Oct 2022 12:02:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AF848E0003; Mon, 17 Oct 2022 12:02:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2C6918E0001 for ; Mon, 17 Oct 2022 12:02:45 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E859F120DC9 for ; Mon, 17 Oct 2022 16:02:44 +0000 (UTC) X-FDA: 80030909448.15.E766574 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by imf14.hostedemail.com (Postfix) with ESMTP id 7640D100023 for ; Mon, 17 Oct 2022 16:02:44 +0000 (UTC) Received: by mail-ej1-f44.google.com with SMTP id y14so25953065ejd.9 for ; Mon, 17 Oct 2022 09:02:44 -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=JtTLJEmxkngU/xzkXx+LrxeCsOIvLIsQVzHgn6JJ/30=; b=Rfae/Y+4yaGIP0vcpaZVNUfII+7m7g52LOf1BBwmovC33F4FdDhsJTYyIWL6AuKQyJ 00E7hdNbT9AJARRPFsDe+QTTbCVOvP+tYMJdn3lM6XO5CgyjpiptP6Q89gE+W1m+COwH HIeCPuYctOpQLqLjeW8NBHyioUVGGZIfXWGSFqtzWlYBCk3fQzcUr7twHFDxB6r6BW5L KFSwG/f1vRCNHovUODXMUVMhzSQ+3NWuvcbOzn46gaRHV7UEPuNjXWgRV3pLSNYQtIoe cya/NQMrFKU+F/PM631Jf2/A1+xMxqBwxO0MeJ6+eWPO8W3Tq1TO0XHKXup/VIpqLgfW nVjw== 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=JtTLJEmxkngU/xzkXx+LrxeCsOIvLIsQVzHgn6JJ/30=; b=cWiCa5O3ahO1BBppI3+42ah09XueSChsp9Stn8Pp4G9odZr1tid3UPHmo76g+9D2mU U+AsVLdM9XmXBlr1H6oWT8+X/SzUStunhnoNFbssz7ce62ntWNRbi+gkV6KaAyzOzEwW K70ddTpkDzYPvqbQMW+94nOyfCU0kYwMLErm2Vxr1fqciiFcmr+XHG0Uj67bfYLw1Bos 37niDjVjJ0h8m6P8jaXdCFhKKmmzTP0XYtWPlCPc7o0/hhk0Zxq0+CaFyx1ZzEN/gGnS fsaYfJH+4leVpilPOrg5GFNKqwcW1E6vjA3sNS4sXzfbtMksVHLmmUcDTLf1yrGKf7jl e8sA== X-Gm-Message-State: ACrzQf0JKfUOZRf2rgU5dJR7aPyfAPpCSqoSI4LAhK5UxE8xLqN1wYIn /kNIAQpVYp1Cg2AldpvFQFA= X-Google-Smtp-Source: AMsMyM5llVzvSQnQKDP6QZSuQ5Zyi2qyUSdhaPTRPjvw7/c1QoH9pgMxAEO7uSQNp7a9ikcRbXmHEw== X-Received: by 2002:a17:906:7944:b0:73c:838:ac3d with SMTP id l4-20020a170906794400b0073c0838ac3dmr9166590ejo.242.1666022563310; Mon, 17 Oct 2022 09:02:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:02:42 -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 , Steven Rostedt Subject: [PATCH 4/7] mm/vmalloc: Use a trace_alloc_vmap_area event Date: Mon, 17 Oct 2022 18:02:30 +0200 Message-Id: <20221017160233.16582-7-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666022564; 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=JtTLJEmxkngU/xzkXx+LrxeCsOIvLIsQVzHgn6JJ/30=; b=4C7gQckGCEZ/2o+JoPSxxr1ImvN3jrtNcwGwCvBfCdji3p5wqInffVcdD9fpb40XqOKAtc svxkSgeYoAcp3Ka0j7G6tGVvdvb+he1Ugj9emksAeraOqKcFLO/FrpwVPo57ae4h+K3Fpj Zkn6G2MgWtouWir132jf63pgC/ADIJ0= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Rfae/Y+4"; spf=pass (imf14.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.44 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666022564; a=rsa-sha256; cv=none; b=XGIgR7O/E/+WfMREIFgI00iSYISMf4bCnGjMw3O+ekKWcQmSB6xKZ1awN3bDSM5+QAUQRU 3Mcc8jhkKOypyi1tPkKiQBYKAx7a5roQsmulCOb9wd7eAba3Z7v9bkaDcyd6cTLiozOhNb SgKf4bcGM9BoD6fUpJb8C41bkCzdTm4= X-Rspamd-Server: rspam12 X-Rspam-User: Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Rfae/Y+4"; spf=pass (imf14.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.44 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: msd8imjtew3mmpux966kwfyt4jzj3njy X-Rspamd-Queue-Id: 7640D100023 X-HE-Tag: 1666022564-425456 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: This is for debug purpose and is called when an allocation attempt occurs. This event gives some information about: - a start address of allocated area; - a size that is requested; - an align that is required; - vstart/vend restriction; - if an allocation fails. Cc: Steven Rostedt Signed-off-by: Uladzislau Rezki (Sony) --- mm/vmalloc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 83b54beb12fa..f4397817ccd7 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -43,6 +43,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + #include "internal.h" #include "pgalloc-track.h" @@ -1621,6 +1624,8 @@ static struct vmap_area *alloc_vmap_area(unsigned long size, size, align, vstart, vend); spin_unlock(&free_vmap_area_lock); + trace_alloc_vmap_area(addr, size, align, vstart, vend, addr == vend); + /* * If an allocation fails, the "vend" address is * returned. Therefore trigger the overflow path.