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=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 9B848C43460 for ; Mon, 10 May 2021 15:02:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2EC2761090 for ; Mon, 10 May 2021 15:02:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EC2761090 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id ACE4B6B0078; Mon, 10 May 2021 11:02:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AA49A6B007B; Mon, 10 May 2021 11:02:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9458D8D0001; Mon, 10 May 2021 11:02:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id 792826B0078 for ; Mon, 10 May 2021 11:02:08 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 35B11824999B for ; Mon, 10 May 2021 15:02:08 +0000 (UTC) X-FDA: 78125636736.08.972A648 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf01.hostedemail.com (Postfix) with ESMTP id D002E50018F5 for ; Mon, 10 May 2021 15:02:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620658923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SSKCNUzKlt6unZPOx+lQtXRtPyOSSWMLCTpTg7CYZ1k=; b=cDjVLbnBEelcGE2UBI45xviYae/RYyvqjhs8R53CFsleVTDH32Ev4PYBW7HwsHvQNHfm6C pC9771wfNaUtQtkF1BjT73WnePHh2efZizcZQsryF97G0aTCQ7YvOFkCcpN7EBfBGJ6bka FDsF/QI9Kw/7H+8dwuH+BF8pQGpytVk= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-514-7O45xKMFNg2E1CQUOUVeQQ-1; Mon, 10 May 2021 11:01:57 -0400 X-MC-Unique: 7O45xKMFNg2E1CQUOUVeQQ-1 Received: by mail-ed1-f70.google.com with SMTP id y19-20020a0564022713b029038a9f36060dso9190041edd.4 for ; Mon, 10 May 2021 08:01:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=SSKCNUzKlt6unZPOx+lQtXRtPyOSSWMLCTpTg7CYZ1k=; b=Pp8UAaysl6Z5Tg/ckedeHzu4VNdaOmkY2M+hSzRjF7La60BLBxxzH9sf3nsQ317B+M r3OPxQbFOm3BsllpeYxV2dL73HCjHJdc5OYPPyrwqsABBHQBVwc+DbzssYi7bgxVJ7xv BJo2hhtmjIlVPe8pSustZlAQSu1sLnQuC9u5vHRmWVFUVE0uMqRouTvM+KtzdspGHBi7 hd8UkvWkEUTFSvW+yDREWaj6l6+Xbrqb/8hgfKZnIk8wLk3oA6D+ZwrhuQEVHOole6Vt p8cLn+ZjeFRybiF49r8qeJ2yhN4o2K2vv4HCeKFtPdrOGHudMesiaIUGrTTeo/5NEiMS F7DQ== X-Gm-Message-State: AOAM532oMAkFNdnb7OFL64VNOPvUfPvFNKKnmN0EppFqa2PG37A/YL7p evB59d2heAmfT5EgcdVFTm5hO3015bF7Mq4RKFqapbQOZJT/Oxp8FKYVptW/q7vnMgFHNIpXIXN t8a+d+LQ7wjI= X-Received: by 2002:aa7:d543:: with SMTP id u3mr30341603edr.26.1620658916516; Mon, 10 May 2021 08:01:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJya0NVvJRL8eIfk38seIDjzRl8n8clFqG9PALQkjgv7k4fH6d0K8YCGPu2CNevpmq4Bj4ldAA== X-Received: by 2002:aa7:d543:: with SMTP id u3mr30341573edr.26.1620658916200; Mon, 10 May 2021 08:01:56 -0700 (PDT) Received: from [192.168.3.132] (p5b0c676a.dip0.t-ipconnect.de. [91.12.103.106]) by smtp.gmail.com with ESMTPSA id k9sm9798954eje.102.2021.05.10.08.01.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 May 2021 08:01:55 -0700 (PDT) Subject: Re: Profiling execution time for __alloc_pages_nodemask To: Shivank Garg , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, gregkh@linuxfoundation.org, sergey.senozhatsky@gmail.com, pmladek@suse.com References: From: David Hildenbrand Organization: Red Hat Message-ID: <03693c3f-e95e-d0a7-d7de-f2cda92ba6ea@redhat.com> Date: Mon, 10 May 2021 17:01:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cDjVLbnB; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf01.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D002E50018F5 X-Stat-Signature: ds8pbqg65nmzgb689sx9ustpn8164nfm Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf01; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=170.10.133.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620658920-961818 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: On 10.05.21 16:57, Shivank Garg wrote: > 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. Don't tracepoints already record a timestamp? It's bee a while since I worked with tracepoints ... > 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) Are you maybe calling ktime_get() too early during boot, where some subsystems are just about to be brought up? > > 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) I could have sworn ordinary tracepoints would already give you a timestamp ... -- Thanks, David / dhildenb