Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp378242ybm; Thu, 28 May 2020 05:17:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjqEwo3JSVHUrZTdxeYpE8rm5Antz2q5YIM+XD3bAwSejXm+NIBPz/M9HROkYulpJMqZgI X-Received: by 2002:a17:907:11cb:: with SMTP id va11mr2855203ejb.515.1590668240525; Thu, 28 May 2020 05:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590668240; cv=none; d=google.com; s=arc-20160816; b=sS3NC1SlmLTNgbWpLu6NqSrm9v/Gi5mD+dhGJANvi+tUeVUghhYGhOLUttbhnS7kE3 ts/JzIt6bt7Zv+ItiVyi1BTpdXYhF1bPjZGEX9W2bLvbct4TgltwoyPR/dOpNXvkRrXp eScX4j8m2ji0JSQaE0gH/2ijAKk+l3vB4G9l5g+3ninZRKOJ64bjRlXGsG4XLA41EKbi b7vOpMnpXNWHJEgC4uUefosSn78l03No/iJUe65crJL3JaeUeX7tgnColChB7VM9DBdA rWvIvb+fTZ9NRnXcqTQ714XN1G6mzyopGTL/66Guzw7NBbkDujJp5qde92QyqIbZVAIZ ET6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XWZiv26mIhHMbhyWZg9N3fht8GPg13eE1FGZVqtYjW8=; b=GXggXPVcE0CNvZhDRdOM5kanDadzEkBP0KDTHKPI9/5ZZXjbV0rlSoJBt+MoSTBJkU EoAfPCHBl7EGp642ekitF5ilFEEKjxEBAQ+KDMrEMFhGh7qOSX3d6nOEf2jWHngtnK4H LgnBazChIRlIM7i73myrDAy90BEtn1ZKaE+AgSeCz25zw3NStCfNsIqFPH7uetrNmoAR /k947allIsKDCaZG8j7woGVDEbh54zxJ75W5c86Kpyp34Ft8R48hSzfAYWABgMO4kZ7H e+7sWzdrwCoR9BzmKuuN7S409W3VywOuEKBU5oDr3DSCC832FX/2MNGDk5FLUUtpC78h SgIA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si3735209edc.130.2020.05.28.05.16.56; Thu, 28 May 2020 05:17:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388661AbgE1MO7 (ORCPT + 99 others); Thu, 28 May 2020 08:14:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:48088 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388549AbgE1MO6 (ORCPT ); Thu, 28 May 2020 08:14:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4982BAC22; Thu, 28 May 2020 12:14:56 +0000 (UTC) Date: Thu, 28 May 2020 14:14:55 +0200 From: Petr Mladek To: Tetsuo Handa Cc: Sergey Senozhatsky , Andrew Morton , linux-kernel@vger.kernel.org, Dmitry Vyukov , Ondrej Mosnacek , Steven Rostedt Subject: Re: [PATCH] twist: allow converting pr_devel()/pr_debug() into printk(KERN_DEBUG) Message-ID: <20200528121455.GD11286@linux-b0ei> References: <20200524145034.10697-1-penguin-kernel@I-love.SAKURA.ne.jp> <20200525084218.GC5300@linux-b0ei> <20200525091157.GF755@jagdpanzerIV.localdomain> <20200527083747.GA27273@linux-b0ei> <35d76737-8d23-9fb2-8e55-507109317f44@i-love.sakura.ne.jp> <20200527155504.GD3529@linux-b0ei> <20200528105942.GB11286@linux-b0ei> <945213f4-a2c3-b25e-35e4-7c55f836e11c@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <945213f4-a2c3-b25e-35e4-7c55f836e11c@i-love.sakura.ne.jp> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2020-05-28 20:33:10, Tetsuo Handa wrote: > On 2020/05/28 19:59, Petr Mladek wrote: > > 2. Add twist into vprintk_store(). In the current, implementation > > it would do: > > > > #if TWIST > > return text_len; > > #endif > > > > return log_output(facility, level, lflags, > > dict, dictlen, text, text_len); > > This part could be possible. But > > > 1. Add twist into ddebug_add_module() and enable all newly added > > entries by default. For example, by calling > > ddebug_exec_query("*:+p", const char *modname) or what is the syntax. > > > > This will cause that any pr_devel() variant will always get called. > > how to handle > > >> #define no_printk(fmt, ...) \ > >> ({ \ > >> if (0) \ > >> printk(fmt, ##__VA_ARGS__); \ > >> 0; \ > >> }) > > part used by e.g. pr_devel() ? Since this macro is not using dynamic debug > interface, vprintk_store() will not be called from the beginning. Are you > suggesting that we should convert no_printk() to use dynamic debug interface ? OK, this is one more path that would need special handling. Two paths are much better than 15. > I don't know whether enabling only in linux-next makes sense. Since not all tests > are equally done on each git tree, available only in linux-next will not be able > to cover all callers. Just using CONFIG_TWIST_ALWAYS_EVALUATE_PRINTK_ARGUMENTS=y > and CONFIG_DYNAMIC_DEBUG=n is the simplest. I hope that tests done on linux-next would be enough to trigger some bugs. If you do not see problems in linux-next then this twist probably is not worth the effort and code complications. Best Regards, Petr