linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: Shivank Garg <shivankgarg98@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	gregkh@linuxfoundation.org,  sergey.senozhatsky@gmail.com,
	pmladek@suse.com,  David Hildenbrand <david@redhat.com>
Subject: Re: Profiling execution time for __alloc_pages_nodemask
Date: Mon, 10 May 2021 17:00:22 -0700	[thread overview]
Message-ID: <CAHbLzko8rHfE-3k=e+fdW2+S1Cc0his8-=Ch08HuMMmf=RJsDg@mail.gmail.com> (raw)
In-Reply-To: <CAOVCmzGX54u4VLUSLt_yEM4E8MQNLwW4VTkNVurPXbCuQX6d_g@mail.gmail.com>

On Mon, May 10, 2021 at 7:57 AM Shivank Garg <shivankgarg98@gmail.com> 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.
> 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 there any reason that prevents you from using some advanced tools,
i.e. perf, bcc/bpftrace, etc? They are much simpler than adding
instrumentation in kernel.

>
> 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
>


  parent reply	other threads:[~2021-05-11  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 14:57 Shivank Garg
2021-05-10 15:01 ` David Hildenbrand
2021-05-11  0:00 ` Yang Shi [this message]
2021-05-11  5:31   ` Shivank Garg
2021-05-12  3:56     ` Yang Shi
2021-05-12 17:39       ` Shivank Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHbLzko8rHfE-3k=e+fdW2+S1Cc0his8-=Ch08HuMMmf=RJsDg@mail.gmail.com' \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pmladek@suse.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=shivankgarg98@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox