lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 May 2021 20:56:45 -0700
From:   Yang Shi <shy828301@...il.com>
To:     Shivank Garg <shivankgarg98@...il.com>
Cc:     David Hildenbrand <david@...hat.com>,
        Linux MM <linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        gregkh@...uxfoundation.org, sergey.senozhatsky@...il.com,
        pmladek@...e.com
Subject: Re: Profiling execution time for __alloc_pages_nodemask

On Mon, May 10, 2021 at 10:31 PM Shivank Garg <shivankgarg98@...il.com> wrote:
>
> >Are you maybe calling ktime_get() too early during boot, where some
> >subsystems are just about to be brought up?
>
> Thanks David, I guess this is the issue.
>
> >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.
>
> Actually, I want to record the arguments for the memory allocator and
> filter out the calls I don't need (which are creating noise).
> For instance, I'm only interested in particular order and flags.

BPF can do so too. You can either attach to kprobe or tracepoint, then
filter out the calls by the function's parameters or tracepoint's
fields.

>
> This is the reason I added my custom tracepoint, which theoretically
> looked easy to implement without adding much overhead.
>
> Thanks,
> Shivank
>
> On Tue, May 11, 2021 at 5:30 AM Yang Shi <shy828301@...il.com> wrote:
> >
> > On Mon, May 10, 2021 at 7:57 AM Shivank Garg <shivankgarg98@...il.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
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ