[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160215205030.GC10555@potion.brq.redhat.com>
Date: Mon, 15 Feb 2016 21:50:30 +0100
From: Radim Krcmar <rkrcmar@...hat.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Cathy Avery <cavery@...hat.com>
Subject: Re: [PATCH 1/4] Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED
messages
2016-02-12 16:42+0100, Vitaly Kuznetsov:
> We must handle HVMSG_TIMER_EXPIRED messages in the interrupt context
> and we offload all the rest to vmbus_on_msg_dpc() tasklet. This functions
> loops to see if there are new messages pending. In case we'll ever see
> HVMSG_TIMER_EXPIRED message there we're going to lose it as we can't
> handle it from there. Avoid looping in vmbus_on_msg_dpc(), we're OK
> with handling one message per interrupt.
We could loop as long as the message type is handleable in the tasklet,
which might increase performance, but the code nicer this way;
Reviewed-by: Radim Krčmář <rkrcmar@...hat.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> ---
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> @@ -716,51 +716,49 @@ static void vmbus_on_msg_dpc(unsigned long data)
> struct vmbus_channel_message_table_entry *entry;
> struct onmessage_work_context *ctx;
>
> - while (1) {
> - if (msg->header.message_type == HVMSG_NONE)
> - /* no msg */
> - break;
> + if (msg->header.message_type == HVMSG_NONE)
(This condition should never be true now.)
> + /* no msg */
> + return;
Btw. what is/are the other HVMSG_* that we get?
Powered by blists - more mailing lists