[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [for-4.17] xen/arm: domain_build: Do not use dprintk unconditionally


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 16 Sep 2022 10:59:47 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rY/6OmsKQbsi3UUQuOxOs7Xe6uWtQ1Xlr23tnbdD/8U=; b=GfztoJ75w8hkka6geGPqw4Fg1reaLqdVNix/cLtxvaiWeIBtv8ZKkQqgkvUeTB6K1FAKbh2dVp0jE/AQ9A9JmZVJsoDSQyDYlbgilhh43NWDYe8ccg9AoJlfvlTz9p3D+i9kdmDvtO0934O53E0ZMEmj7t1I3xVxznW2vvQjUA7Jy9FPgLZVYIo7CLR5P61yepYv7jBTjRuB1nvPJVEeRTz5irbjUMRuGkIfEU0zWHzSmZYLdOyNpwG9NjZGiiPGAL5xntpqWnD6lRNzAW3Szx7WSMxnM+0ySWr96k5T1t3BEDOPKc4DQgWyf5VMRdLo7YgeJxXHXrz5riY6qXmWFA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UDx5LZ9AirpOeCX2Om55/FQD55WBNYmuIPkD+jLCPmCfreMFR7rVL9MbHy3cW6i08NhIeWqCqP21cxy/6guQ0XH9QmASaCEnNe8PS58FVlLWRP6NqG7DqXch8oQZm073kZ3hF9386obwzXrdzZWlXZB+OlIzL27TuDKMARHRu43aimssVcRr7e+kruFNW8oW90OnLZU+YC6FgdmQAjkuQCSn39CwVK85P8WYL/Q5556KHhdA5rFjn9steyuD9YbWHDMnlDAv8HEeikRw635RyM+nXe3jBxk65TEFy+oOSe0dIuPakNvIo4yTAmYo9S6uix8o+nfnd3UEaHEmUH+9Qg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 16 Sep 2022 09:00:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.09.2022 10:32, Michal Orzel wrote:
> On 16/09/2022 10:08, Julien Grall wrote:
>> On 16/09/2022 08:19, Michal Orzel wrote:
>>> Using dprintk results in printing additionally file name and line
>>> number. This is something we do not want when printing regular
>>> information unconditionally as it looks like as if there was some issue.
>> I am OK if you want to switch to a printk() but I disagree with this
>> argument. dprintk() is not about error, it is about anything that
>> doesn't matter in release build.
> 
> In the vast majority of cases, dprintk is used conditionally. That is why
> in the debug build you cannot spot a single line of log starting with
> a file name + line number. That is why I assume this behaviorto be abnormal
> compared to all the other logs.
> 
> If someone adds a printk starting with e.g. "$$$" this is also not a bad
> usage of printk but would result in an inconsistent behavior.
> 
>>
>> I don't think we should just switch to printk() because dprintk() add
>> the line/file. There are message we don't necessarily want to have in
>> release build. So dprintk(XENLOG_INFO, ...) would be right for them.
> 
> I think this is a matter of being consistent.
> We do not have a helper to add printk only for a debug build but without 
> adding
> filename/line number. That is why almost all the dprintks are used 
> conditionally.

FWIW I agree with Julien and I don't view the "conditional" aspect as
relevant to decide whether to use printk() or dprintk().

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.