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

Re: [Xen-devel] [PATCH 1/1] xen/gnttab: print log at level XENLOG_ERR before panic



Hi Andrew,

On 04/23/2019 06:37 PM, Andrew Cooper wrote:
> On 22/04/2019 13:39, Dongli Zhang wrote:
>> Print log at level XENLOG_ERR (instead XENLOG_INFO) as domain_crash()
>> indicates there is fatal error.
>>
>> Signed-off-by: Dongli Zhang <dongli.zhang@xxxxxxxxxx>
>> ---
>>  xen/common/grant_table.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
>> index 80728ea..725c618 100644
>> --- a/xen/common/grant_table.c
>> +++ b/xen/common/grant_table.c
>> @@ -1282,7 +1282,7 @@ unmap_common(
>>      if ( unlikely((rd = rcu_lock_domain_by_id(dom)) == NULL) )
>>      {
>>          /* This can happen when a grant is implicitly unmapped. */
>> -        gdprintk(XENLOG_INFO, "Could not find domain %d\n", dom);
>> +        gdprintk(XENLOG_ERR, "Could not find domain %d\n", dom);
> 
> While I agree with the change in principle, what does this actually do? 
> The entire printk() is compiled out in release builds, and debug builds
> log all messages.

The objective is for below case.

If user sets "guest_loglvl=err", this line would not be printed. Once xen panic
by domain_crash, it would take effort to know the domid leading to the panic.

To verify if the vmcore analysis is correct, the user needs to set
"guest_loglvl=all" and wait for another panic again.

I agree it would be better to turn it into something like gprintk. If xen always
panic after a log, we should guarantee that the log is always printed to the
console in order to help analyze the root cause.

Dongli Zhang

> 
> ~Andrew
> 
>>          domain_crash(ld); /* naughty... */
>>          return;
>>      }
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/xen-devel
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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