Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1002492ybk; Fri, 15 May 2020 20:57:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+qnmLRbniNVrOURWIZgmqJpwq4H34UIbPNXtlUsMOS9JeiO/0jt6SDbpEJEgKM2YpZzJZ X-Received: by 2002:a17:906:4ec1:: with SMTP id i1mr6135538ejv.56.1589601425105; Fri, 15 May 2020 20:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589601425; cv=none; d=google.com; s=arc-20160816; b=nvo1oGfxDp+jF/7YwSFy+/rsIDwKWSYTj5h11cRiUhdBi8Y8CWlpYs47hBzka1QVrg pHe9L36Z+8tSDimVJTPypgXv7IwT6qeA7eFC8x6j7OXKmSZuhYih3Q9HuZ0WbeUg/1qP udEoE77t/zxwa+3XdpydjTKRAgpK3KhFMRVbaqvjZHp/1UMSdSHrAkfZr1z7MPj+CMbJ y++jEuNgAk1c54XOYorz/GGz/1l6rJJT45Q6oRDYv03WyzbI7wLimzkTRUL0cDnM06NS RAGjDZA1CWz6gl3Q0uZwDBw8OwtgyOaN2htWN+Ukcyuuw68ULQdkBHDcSSJ9DwdXMEbx RKog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=r3DXHhYEfZ5XzGr6H4vE2RcXrCw+ttKCWZ1sjv6FRCQ=; b=pFt7SRzqibMhF4GYcSiey9RhKkbVctalU/ztOpvpKldQ6eesAXqVDpt0iPYgUH98Vy n97JbdZ6FEgZYbQwWKoyraU9ghKwDEKWlD4rijBcGNaktTpcQ/kkRqk+jAiPOZEa8h3t 4OymSilNlFp3l6/go/Fqlg4/zMlyhW8HBTGs/iE2DV1xlC4Mwr23JulOtV6rB3XSYoGY CxAEPiRSCifGnB/gf1HnMhG4ItYYHyqfrM8bxuuel1rquTENNbtPRhle313LzlhGX82o PaYIp1sZUXWQ6MzRaoZt8GBf6CPpCmeHtISvN0FGv6bNbcUTODoIMGWvLrdDnJLZ+uGV YgaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gNVh2skF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s1si2679974ejq.422.2020.05.15.20.56.41; Fri, 15 May 2020 20:57:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gNVh2skF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727983AbgEPDzT (ORCPT + 99 others); Fri, 15 May 2020 23:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726615AbgEPDzT (ORCPT ); Fri, 15 May 2020 23:55:19 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A08AAC061A0C; Fri, 15 May 2020 20:55:18 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id u15so4331348ljd.3; Fri, 15 May 2020 20:55:18 -0700 (PDT) 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=r3DXHhYEfZ5XzGr6H4vE2RcXrCw+ttKCWZ1sjv6FRCQ=; b=gNVh2skFKX/3K5VcJAPK6a1yLtTIAVJfXJuo3OCHJA7vdofoB0idsjK8Aqat9ufZg9 8Ww4NWrP00mhdhkfIKK9UJRhCRtZ5UgfUAKOe3AVA4N23o9hw0PrPLlxXQWpzMqqaksJ DiCRZ+YthHQSfwEcXq4h0/ujfBPAFoj1CGiU5LEoiD/Xs5FY/GW3j2ZlTla6MFARUD67 mqzANd5idIUC7UPHy6TCSXQJB7ouixBercj0ofPiNWNDsNKMi3qQZlhxoqa6suITs1aM DxFjc1mATIaVzDf5pc2GVp7Hfwp/seBYs6tP9mraKLmrhWVFxKLwzX1wdmjFwEKmX6rd CaEg== 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=r3DXHhYEfZ5XzGr6H4vE2RcXrCw+ttKCWZ1sjv6FRCQ=; b=Tew8uH7OSqpLTopxQniPnmGmJ+4NE6lCu3Dx7dNiUhRUBSl0l3q3bMVUbuhA+Z42Oo pSLK2uctw1hESHK2lxLxn8TIERl7hmNvobZ3NXuHWt4AXH8ff7ioEZSmdJnyuwQueCBp kMD/9oBTFwRyYAl6U5JiiLstF7T60FPL4Jnt8Uy5Gfqh2AjzSaOGDYCUwGHUA4wmhY3k UTwD0m+yz3vsNUMAVI+sdaQuUoOb4xtLKlT9358rC8SKaAixr+/ubBva/zAO+NsewcJ8 +UCEXlECNoEf22bC2Ewb4lTlzfDNHsW6jS68KuT23WycDLx9Red0Zl3r1JXulpqUKqB8 piCQ== X-Gm-Message-State: AOAM5305ycZw3IQGY0rQtjwRlmGWYbJu8zZ2ki5nKX/q7Xy67cj/ajB4 ag1vjSq8Q+0aFEKeP1Bqg0Pi9paRAHunLOMY8F4= X-Received: by 2002:a05:651c:c8:: with SMTP id 8mr3852678ljr.182.1589601316830; Fri, 15 May 2020 20:55:16 -0700 (PDT) MIME-Version: 1.0 References: <1587408228-10861-1-git-send-email-orson.unisoc@gmail.com> <20200420191014.GE121146@unreal> <20200422142552.GA492196@unreal> <20200515095501.GU17734@linux-b0ei> In-Reply-To: <20200515095501.GU17734@linux-b0ei> From: Orson Zhai Date: Sat, 16 May 2020 11:55:04 +0800 Message-ID: Subject: Re: [PATCH V2] dynamic_debug: Add an option to enable dynamic debug for modules only To: Petr Mladek Cc: Leon Romanovsky , Orson Zhai , Jason Baron , Randy Dunlap , Linux Kernel Mailing List , linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Jonathan Corbet , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , "David S . Miller" , Jakub Kicinski , Doug Ledford , Jason Gunthorpe , Andrew Morton , Android Kernel Team , Orson Zhai Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 5:55 PM Petr Mladek wrote: > > On Thu 2020-04-23 00:02:48, Orson Zhai wrote: > > On Wed, Apr 22, 2020 at 10:25 PM Leon Romanovsky wrote: > > > > > > On Wed, Apr 22, 2020 at 09:06:08PM +0800, Orson Zhai wrote: > > > > On Tue, Apr 21, 2020 at 3:10 AM Leon Romanovsky wrote: > > > > My motivation came from the concept of GKI (Generic Kernel Image) in Android. > > > > Google will release a common kernel image (binary) to all of the Android system > > > > vendors in the world instead of letting them to build their owns as before. > > > > Every SoC vendor's device drivers will be provided in kernel modules only. > > > > By my patch, the driver owners could debug their modules in field (say > > > > production releases) > > > > without having to enable dynamic debug for the whole GKI. > > > > > > Will Google release that binary with CONFIG_DYNAMIC_DEBUG_CORE disabled? > > > > > In Google's plan, there will be only one GKI (no debug version) for > > one Android version per kernel version per year. > > Are there plans to use modules with debug messages enabled on production > systems? Yes, but in a managed way. They are not being enabled directly to log buffer. Users / FAEs (Field Application Engineer) might control to open or close every single one on-the-fly. > > IMHO, the debug messages are primary needed during development and > when fixing bugs. I am sure that developers will want to enable many > more features that will help with debugging and which will be disabled > on production systems. I agree with you in general speaking. For real production build we usually keep a few critical debugging methods in case of some potential bugs which are extremely hard to be found in production test. Dynamic debug is one of these methods. I assume it is widely used for maintenance to PC or server because I can find it is enabled in some popular Linux distribution configs. Here is the search result from my PC with Ubuntu default installation. zhai@ThinkPad:/boot$ cat config-4.15.0-99-generic | grep DYNAMIC_DEBUG CONFIG_DYNAMIC_DEBUG=y > > I expect that Google will not release only the single binary. They > should release also the sources and build configuration. Then Yes, they have released the source and configuration which could be freely downloaded from Google's website. > developers might build their own versions with the needed debugging > features enabled. Yes, we do have the debug build for this. But as I mentioned above, it is a little bit different for my requirement. Actually my patch is to address the problem for embedded system where image size is needed to be considered when CONFIG_DYNAMIC_DEBUG is being enable globally. For a "make allyesconfig" build, 2,335,704 bytes will be increased by enabling CONFIG_DYNAMIC_DEBUG. It is trivial for PC or server but might matter for embedded product. So my patch is to give user an option to only enable dynamic debug for modules especially in this GKI case. Thanks Orson > > Best Regards, > Petr