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=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 5B434C56202 for ; Wed, 25 Nov 2020 21:23:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B79E5206B5 for ; Wed, 25 Nov 2020 21:23:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fvqjHiQg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B79E5206B5 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 393366B006E; Wed, 25 Nov 2020 16:23:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F28E6B0070; Wed, 25 Nov 2020 16:23:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 144326B0071; Wed, 25 Nov 2020 16:23:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id E94096B006E for ; Wed, 25 Nov 2020 16:23:30 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A7179181AEF30 for ; Wed, 25 Nov 2020 21:23:30 +0000 (UTC) X-FDA: 77524216980.09.chalk21_381834927379 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 8B372180AD807 for ; Wed, 25 Nov 2020 21:23:30 +0000 (UTC) X-HE-Tag: chalk21_381834927379 X-Filterd-Recvd-Size: 5536 Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Nov 2020 21:23:30 +0000 (UTC) Received: by mail-vk1-f193.google.com with SMTP id u16so27196vkb.1 for ; Wed, 25 Nov 2020 13:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h73/dF5vj6XnalyFbnJK6Lk3IaseF5CBAIr/8CD0T6Y=; b=fvqjHiQg70A9wBJ0T7oWmWhf6TgIPDGs1VO9bRjXmtLErOjTu0trejaPaK20zbUlM+ OvD/z3HfmvbBF+gyhd3kBX/Vgnl31bBL3YOkCItuVYWYcijXcgiyojOdvL/ec0VMdoaX 7mb2xzGRsydJxRtQL3Q/hZIogR/AQVAueIj3f40Fvyze4KOdW+sQpl6BnHgXMpqJuiuf eliSiImRVXm8nQLbYiFPU/6QZA3RNu45UdlJFRJQTMLMTtSszgdYpR1DwGzX2323i5V8 wDPvf6nNgc41lohPRXFAMOEjdDkEUFB/aVBFgbqwh6JD6y8Lm3fkYunIpRCj9OfM5V0n 7MNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h73/dF5vj6XnalyFbnJK6Lk3IaseF5CBAIr/8CD0T6Y=; b=RLOU9eBensC9yiL2+VZr9v2DZCejCcBGdFSCB2lyklhGCidy8TP7gNhijWYjNQhN4u dF6/OHBxrMRTVMXomH9mR3mwOjB+YOwLblDh6CuTfKFtlHQScq//6dg/fvXMBRLXMfxu 6hQ2ooNGuJ0gj8A6gJ/72QaYvzmsDBtzGyEneHOi/gscN7OnWz4KbxrQJ7CK72RSd4/G pzL65Njq2Cf18OvoOoonVDE1Y55D4k3zriZe2yYRfvUa4+69+pOfzqMoHh8OMoEW79mF glaCWGHYJacdJVblEBnDwKLvHG2P7jjIM1U9LzpbLO+uwDhacLOzdg3go1UYfoH6Z/c/ 4hiA== X-Gm-Message-State: AOAM531aHxZ4n2F7LsNFXoh2adkwMVvLbW4vEn/I+sdmnItjryQcUChr MR6yK5ZYIHEYgz8qxeX/i4nbdHf9c4TD3jUCrsE= X-Google-Smtp-Source: ABdhPJzSQ5m/nAStvigIkwpdO7RkLx+pfpB55Lc6GkFvRq9dG0ceJ9F4xVTT44vLSzMqIPfM07pYycYVrfL3Dq1TJoM= X-Received: by 2002:a1f:3658:: with SMTP id d85mr50774vka.10.1606339409256; Wed, 25 Nov 2020 13:23:29 -0800 (PST) MIME-Version: 1.0 References: <20201125193626.2266995-1-jim.cromie@gmail.com> <20201125193626.2266995-8-jim.cromie@gmail.com> In-Reply-To: From: jim.cromie@gmail.com Date: Wed, 25 Nov 2020 14:23:00 -0700 Message-ID: Subject: Re: [PATCH 7/7] dyndbg: enable 'cache' of active pr_debug callsites To: Jason Baron Cc: linux-mm@kvack.org, Greg KH , Rasmus Villemoes , LKML Content-Type: text/plain; charset="UTF-8" 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 Wed, Nov 25, 2020 at 1:54 PM Jason Baron 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 > > --- > > 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; > > } > >