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

Re: [PATCH v4 2/2] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32


  • To: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx
  • From: Dongli Zhang <dongli.zhang@xxxxxxxxxx>
  • Date: Wed, 2 Mar 2022 19:08:11 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=0JKAGs3MiNxef5GYhfLD8+bmnlGOpcQDgUTuRCZOkVk=; b=g9vZ60U9ynTe6fB6dYOjiy59KGaPYx3vJB2sgsBQpVKkXKfYv67Yjf7jJG7DxRU9jvKsAM7FAQqmLDEMVIFKqo29mi6OLKT1rYr3vFAw2aeWS+zXz3WaHQ6DSQqyiiD4TxjsS3ZT6Va6XqcU5yDHg8R00jXIlGI1jLY4HgXG5FJ2eoQq1lqXp+seRkLIpirMesi7SUl6BllLD9ozfrkTNbwC7C78+NVRUU1Qr1j6UrMtDzhPr6Gn9laMpnBn49+0ZWLohzPu3r6uOQW67J1w5A82bIs3mg4dsVaAKbQzOqPR8qKPQg5H6xQlqbUtYD+Obs/ZsOESbTZKDi1sy7KPkA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dQUfFNJgq+r4bL4YenYyxXOEwMsqlAX83ZK052o1N+lKF8WbxUAA/5OXcZUx7kLxrfGiUQmrKDeOLrAgeZskPGEXnG7Dtz0Px4qRCdGNCHqmEMOay0QQKeIKzIAHjyR4CwyMCeZXf5off2/aClgYrIlvh63V3c2gvymFynXtnMlBVrlGJzw1LlmkueMUEnXDNd4Jn4V82cChJ1fdoGSkboHyyvdM8NVO9wRNxvbwD70kLohaIWnla59uT/aHsgEzQ5TMSozjkY5zQthi+ZxwuubTJeNovYFWlFkJbmLXqIoNaYJedZy7yqkbb1NR4V7okmv1CDD1iakNnrtH+nVZvA==
  • Cc: linux-kernel@xxxxxxxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, joe.jin@xxxxxxxxxx
  • Delivery-date: Thu, 03 Mar 2022 03:08:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Boris,

On 3/2/22 6:11 PM, Boris Ostrovsky wrote:
> 
> On 3/2/22 7:31 PM, Dongli Zhang wrote:
>> Hi Boris,
>>
>> On 3/2/22 4:20 PM, Boris Ostrovsky wrote:
>>> On 3/2/22 11:40 AM, Dongli Zhang wrote:
>>>>    void __init xen_hvm_init_time_ops(void)
>>>>    {
>>>> +    static bool hvm_time_initialized;
>>>> +
>>>> +    if (hvm_time_initialized)
>>>> +        return;
>>>> +
>>>>        /*
>>>>         * vector callback is needed otherwise we cannot receive interrupts
>>>>         * on cpu > 0 and at this point we don't know how many cpus are
>>>>         * available.
>>>>         */
>>>>        if (!xen_have_vector_callback)
>>>> -        return;
>>>> +        goto exit;
>>>
>>> Why not just return? Do we expect the value of xen_have_vector_callback to
>>> change?
>> I just want to keep above sync with ....
>>
>>>
>>> -boris
>>>
>>>
>>>>          if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
>>>>            pr_info("Xen doesn't support pvclock on HVM, disable pv timer");
>>>> +        goto exit;
>>>> +    }
>> ... here.
>>
>> That is, I want the main logic of xen_hvm_init_time_ops() to run for at most
>> once. Both of above two if statements will "go to exit".
> 
> 
> I didn't notice this actually.
> 
> 
> I think both of them should return early, there is no reason to set
> hvm_time_initialized to true when, in fact, we have not initialized anything.
> And to avoid printing the warning twice we can just replace it with 
> pr_info_once().
> 
> 
> I can fix it up when committing so no need to resend. So unless you disagree

Thank you very much for fixing it during committing.

Dongli Zhang



 


Rackspace

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