From owner-svn-src-all@freebsd.org Mon May 27 20:15:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 204CC15A9E74; Mon, 27 May 2019 20:15:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com [IPv6:2607:f8b0:4864:20::a32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A15CC84022; Mon, 27 May 2019 20:15:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-vk1-xa32.google.com with SMTP id j124so4108209vkb.4; Mon, 27 May 2019 13:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=52Xo2NyJ03917p4ZCq6/SWuI+8bl5q8FD1FTExY5fgo=; b=vAf4//hTD9rLZtXoCMtYzVrKWESpw81PE+EYfn6UJ8nH70Up5+oQDmluZhVfGdAyjt FL+eL8tQcBHVxdMdRklJ8tqwFcifIwOpvQzgEkCe6EYcSZg3fk0wTn2oDd5HDg3R0mKf JGAFnNnGmb0NSP8rbT+81lEXC68AhGaPRmP9O2r4pgjHKazemhTbTlhzhUKK/kFTw8Ul BOMwJtIkZQWoBwZop6ZQGgcWQ/clcd2eb19Ggyh4QlKeN5Q4XvqcPZtpBkx4czxLZAKh uCDezDCvsfpfi9F4tWYzBOtsmFGTUlHvwWLBJsQSt2w59NZbmUfh0LKiDBESF7tAi1/X 14Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=52Xo2NyJ03917p4ZCq6/SWuI+8bl5q8FD1FTExY5fgo=; b=OBoXNTN0SuwjpRTcw1ZVvaYY8DnET84WmZrHIOvfkzO27KUQ/USGwING4BJAqeYsJR 0FgJi/tUeGnUEWaLpTUOtVJfiKbBZR9SnHBHweoloUFJEJfPbCk/mUnMlT/5AY/hwyln Sx8Jgd1suOu48Ulq0eTdsv3JUW8SeyFXhlx4ckns5PiFkQ0+IxVQWLsPnA9EohEIRA+2 evJkIyS+W84Lnp6HfgBSmIOG/ZUkCD3swMDV32xKo7C2XIwVPN/6UKLEMB1M8EqTYw9+ 4jRi1LIU7Y+npsU52uH9zyPUYNv4BEuWAeZhIPDQ+BUr9lZJC+ZTOjgG2s8R7/3sp3QR HyIA== X-Gm-Message-State: APjAAAWz2/SgSLk5Fb71YIxKji7H6Wjqr0C3rL6SMjt1hbfLvzk50eJ5 8t6SRkjVQZcVqOnGSY5DnMhgwsFK X-Google-Smtp-Source: APXvYqzARvxEKaL03Rntx3yp2UN8hCSyt3lQsvj0Llh+NYjqzuRLrd+fyIFZi2YFy8Amyt1PKmK2Vg== X-Received: by 2002:a1f:8146:: with SMTP id c67mr16347609vkd.30.1558988103543; Mon, 27 May 2019 13:15:03 -0700 (PDT) Received: from raichu (toroon0560w-lp130-12-70-50-22-99.dsl.bell.ca. [70.50.22.99]) by smtp.gmail.com with ESMTPSA id o66sm6436843vke.17.2019.05.27.13.15.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 27 May 2019 13:15:02 -0700 (PDT) Sender: Mark Johnston Date: Mon, 27 May 2019 16:15:00 -0400 From: Mark Johnston To: Kirk McKusick Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348300 - head/sys/ufs/ffs Message-ID: <20190527201500.GE82831@raichu> References: <201905270622.x4R6MiP3047706@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905270622.x4R6MiP3047706@repo.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: A15CC84022 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.986,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2019 20:15:05 -0000 On Mon, May 27, 2019 at 06:22:44AM +0000, Kirk McKusick wrote: > Author: mckusick > Date: Mon May 27 06:22:43 2019 > New Revision: 348300 > URL: https://svnweb.freebsd.org/changeset/base/348300 > > Log: > Add function name and line number debugging information to softupdates > worklist structures to help track their movement between work lists. > No functional change to the operation of soft updates intended. > > Modified: > head/sys/ufs/ffs/ffs_softdep.c > head/sys/ufs/ffs/softdep.h > > [...] > Modified: head/sys/ufs/ffs/softdep.h > ============================================================================== > --- head/sys/ufs/ffs/softdep.h Mon May 27 04:20:31 2019 (r348299) > +++ head/sys/ufs/ffs/softdep.h Mon May 27 06:22:43 2019 (r348300) > @@ -213,6 +213,10 @@ struct worklist { > struct mount *wk_mp; /* Mount we live in */ > unsigned int wk_type:8, /* type of request */ > wk_state:24; /* state flags */ > +#ifdef DEBUG > + const char *wk_func; /* func where added / removed */ > + int wk_line; /* line where added / removed */ > +#endif > }; > #define WK_DATA(wk) ((void *)(wk)) > #define WK_PAGEDEP(wk) ((struct pagedep *)(wk)) ffs_softdep.c defines DEBUG, while ffs_alloc.c (which includes softdep.h) does not. A result of this is that the kernel's type info used by DTrace contains two different definitions of struct worklist, which has a sort of snowball effect since we end up with two definitions of each structure containing a struct worklist *, and so on. Could we turn DEBUG into a proper kernel configuration option so that it's defined consistently everywhere, or just use INVARIANTS/DIAGNOSTIC instead? I am happy to do the work if we can agree on a direction. DEBUG is used only in the SU, snapshot and the block allocation code. In ffs_alloc.c it is used to enable some debug printfs (which are themselves conditionalized on a sysctl var). It is used similarly in ffs_snapshot.c. In ffs_softdep.c (which also has SUJ_DEBUG) it enables some consistency checking. INVARIANTS seems to me like a reasonable option to use in ffs_softdep.c, and perhaps the others as well.