From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32EC1C433ED for ; Mon, 10 May 2021 14:57:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A15A161480 for ; Mon, 10 May 2021 14:57:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A15A161480 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 26E286B0036; Mon, 10 May 2021 10:57:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F8826B0074; Mon, 10 May 2021 10:57:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0495E6B0075; Mon, 10 May 2021 10:57:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id DAF8F6B0036 for ; Mon, 10 May 2021 10:57:25 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 971628249980 for ; Mon, 10 May 2021 14:57:25 +0000 (UTC) X-FDA: 78125624850.17.0EB6406 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by imf28.hostedemail.com (Postfix) with ESMTP id 344382000264 for ; Mon, 10 May 2021 14:57:24 +0000 (UTC) Received: by mail-ej1-f51.google.com with SMTP id f24so24975479ejc.6 for ; Mon, 10 May 2021 07:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=f2JnqweJIfSd6LQ8EPIWiAKNItoboLHhQmvENtw3fGA=; b=fJ5QX8QyyDydhJgvmYnV/Fx/KQk0nuRWucA9AHSa04/YgeaZG/SCjSduWq2ga/q1+U m8CDb70flkViXYAMtpRpUv1ZSnQiOcEAuzIhDi025GEtAf1xbEq57s1qs9VMrrZ7ETc0 svQLWNXdhVfIqCJuXP2cMowr8eqgYk3PffhKha8KErPLmb3qMdWQe+vKVxrtSiZOLJZd GIxrtOj+ZRnd0lCcGa/1T33UEc+6LJA08xUIkMTsAbNGLRNp537SzkZxLVhdhyNYzCXU MkKukHhMzS2DNvV5hRC0zd93jZe8JC+JUJYqt1RBhDQSN91mGsfdJotflZpJSg8HKxKu nk3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=f2JnqweJIfSd6LQ8EPIWiAKNItoboLHhQmvENtw3fGA=; b=I/oBvfM2FnI/TrJZywSa9pyK1R2fsfHx2lNejXYWq4AmhytplodXY+eXd0RJEat07v 1UrLLSB8rMoftDmeNx+B/Nd+j5RKSxvoP90lj6LN9eS/k7fbUiSAUMTpDaVhy0jJCtDw vWtO1TIcsKh0QG/fzh1YHZPD1Rx11stFDQ16ocfgh2Ikq4dfyHznSc+MFRoZDpHfyiRM AD8mk4ne8PLypgz4OaT1iB5YNufwxnoiQMWiHpktfIEpcY+LM+SUUE4w4bxLNrxM6tFe /M5qAh0Ha+8YMKTP6v6PDwkwsfBTkQ+iGp5mYbS6Zhn7jPfOu/oKcd3S54+FD49989oP E40g== X-Gm-Message-State: AOAM530xYghCy9GwCk3+AWpmFNGotsexqI2BTSivu6Nr+eMJ3pJRTkiC xuOzd7ZYCscMRkGXS7f8/LJCWZ+1i+kfpnGEeN8= X-Google-Smtp-Source: ABdhPJw3fgQsWMwpVMBXeuRT8yPmLHx3OalvK87l6mKLuGxwkrvbEn0CjGIWrkoiDgpIYWMXMQk0p/MVPxEKbOkCMNE= X-Received: by 2002:a17:906:7487:: with SMTP id e7mr26967650ejl.106.1620658643874; Mon, 10 May 2021 07:57:23 -0700 (PDT) MIME-Version: 1.0 From: Shivank Garg Date: Mon, 10 May 2021 20:27:07 +0530 Message-ID: Subject: Profiling execution time for __alloc_pages_nodemask To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, gregkh@linuxfoundation.org, sergey.senozhatsky@gmail.com, pmladek@suse.com, david@redhat.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 344382000264 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=fJ5QX8Qy; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of shivankgarg98@gmail.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=shivankgarg98@gmail.com X-Stat-Signature: 95z9ekszxdwhwzpg7q9qxfccdgpnoe5f Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=mail-ej1-f51.google.com; client-ip=209.85.218.51 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620658644-470888 X-Bogosity: Ham, tests=bogofilter, spamicity=0.008056, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Everyone! I want to profile the time taken to execute the __alloc_pages_nodemask for different linux configurations/parameters. To measure the execution time, I use the ktime_get() apis. I get the ktime_get() on the top, and I want to do ktime_sub(ktime_get(),ktime) and record it in a tracepoint. However, the patch on implementation prevents the kernel from booting up. I debugged the bug to find out that the issue recurs on adding ktime_get() inside the __alloc_pages_nodemask path. So, that the kernel fails to boot up ( and show the blank screen without any logs ) I'm using the Linux kernel 5.6.13 (5821a5593fa9f28eb6fcc95c35d00454d9bb8624) Is it an expected behavior? or a BUG? Has anyone else faced the same issue? Can you please suggest, what would be a good way to measure execution time for page allocation (if not ktime_get) Stay Safe! Best Regards, Shivank Garg Open-Source Enthusiast and Student, IIT Kanpur