Re: [PATCH 1/4] Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED messages

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

 



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@xxxxxxxxxx>

> Signed-off-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
> ---
> 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?
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux