linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com
To: Jason Baron <jbaron@akamai.com>
Cc: linux-mm@kvack.org, Greg KH <gregkh@linuxfoundation.org>,
	 Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/7] dyndbg: enable 'cache' of active pr_debug callsites
Date: Wed, 25 Nov 2020 14:23:00 -0700	[thread overview]
Message-ID: <CAJfuBxyE2De7gjoiv9Dnh4XK7+WjLMA+_x9h9-wOiN7NL6bWiA@mail.gmail.com> (raw)
In-Reply-To: <d57d4f39-b9d3-99f0-6fd0-b3f072895edd@akamai.com>

On Wed, Nov 25, 2020 at 1:54 PM Jason Baron <jbaron@akamai.com> wrote:
>
>
>
> On 11/25/20 2:36 PM, Jim Cromie wrote:
> > In ddebug_putsite(), dont zs_unmap the callsite if it is enabled for
> > printing.  This means that the next time this pr_debug callsite is
> > executed, the _getsite() will succeed quickly without remapping the
> > zrec.
> >
> > Once the callsite is disabled via >control, a following _putsite()
> > will see the flag cleared, and zs_unmap it.
> >
> > This changes the lifetime of our zs_mappings from brief (only for the
> > single printk) to as long as uptime (if a prdebug is enabled til
> > poweroff).  This appears to be triggering the ensuing mayhem.
> >
> > I am able to get through init, to root console, by disabling all
> > dynamic-debugs, including the ones that are enabled at compile.
> >
> > $ kruna --kopt \*.dyndbg=-p --kopt debug_locks_proceed=1
> >
> > but enabling any pr-debug crashes.
> > Plain old boot also panics, as pasted below.
> >
>
>
> Hi Jim,
>
> Looks like you've made a lot of progress with this series...but if I
> understand correctly there are still some unresolved issues (panic).
> So I think this series is more 'RFC' at this point?
>

yes, RFC.  WIP suggests I know whats needed next.

certainly Ive seen a variety of sleeping while atomic ... BUGs,



> I was also expecting to see updates to the actual printing functions
> to now use dp->site. But perhaps I missed those bits?

those bits were changed in patch 5
basically changes are ~ s/dp/dc/g, and in ddebug_getsite / _putsite

>
> Thanks,
>
> -Jason
>
> > $ kruna --kopt debug_locks_proceed=1
> >




 [    1.915768]  ? rest_init+0x24d/0x24d
> > [    1.916417]  kernel_init+0xaf/0x103
> > [    1.917038]  ret_from_fork+0x22/0x30
> > [    1.917726] Kernel Offset: disabled
> > [    1.918324] ---[ end Kernel panic - not syncing: Requested init /bin/sh failed (error -14). ]---
> > QEMU 5.1.0 monitor - type 'help' for more information
> >
> > Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> > ---
> >  lib/dynamic_debug.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> > index 534d73e45844..0c69aa52395d 100644
> > --- a/lib/dynamic_debug.c
> > +++ b/lib/dynamic_debug.c
> > @@ -165,7 +165,9 @@ static void ddebug_putsite(struct _ddebug *dp)
> >               /* need to keep site until zmap backing exists */
> >               return;
> >
> > -     /* always unmap for now. if !pr-debug has locking issues */
> > +     if (dp->flags & _DPRINTK_FLAGS_PRINT)
> > +             return; /* keep maps of enabled pr_debugs */
> > +
> >       zs_unmap_object(dd_callsite_zpool, dp->zhandle);
> >       dp->site = NULL;
> >  }
> >


      reply	other threads:[~2020-11-25 21:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 19:36 [PATCH 0/7] WIP dyndbg diet plan, paging Dr Zram Jim Cromie
2020-11-25 19:36 ` [PATCH 1/7] dyndbg: move struct _ddebug's display fields to new _ddebug_callsite Jim Cromie
2020-11-25 19:36 ` [PATCH 2/7] dyndbg: count repetition in __dyndbg_callsite fields Jim Cromie
2020-11-25 19:36 ` [PATCH 3/7] dyndbg: add some code to see alignments of linkage data Jim Cromie
2020-11-25 19:36 ` [PATCH 4/7] dyndbg: select ZPOOL,ZS_MALLOC in Kconfig.debug DYNAMIC_DEBUG_CORE Jim Cromie
2020-11-25 19:36 ` [PATCH 5/7] dyndbg: replace __dyndbg_callsite section with a zs-pool copy Jim Cromie
2020-11-25 19:36 ` [PATCH 6/7] dyndbg: add locking around zpool-add loop in zpool-init Jim Cromie
2020-11-25 19:36 ` [PATCH 7/7] dyndbg: enable 'cache' of active pr_debug callsites Jim Cromie
2020-11-25 20:54   ` Jason Baron
2020-11-25 21:23     ` jim.cromie [this message]

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=CAJfuBxyE2De7gjoiv9Dnh4XK7+WjLMA+_x9h9-wOiN7NL6bWiA@mail.gmail.com \
    --to=jim.cromie@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbaron@akamai.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@rasmusvillemoes.dk \
    /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